Do not Increase Per-Connection Buffers!
Not all buffers in my.cnf are allocated only once for the server instance. Some buffers are allocated for each connection. Please see more information at https://haydenjames.io/my-cnf-tuning-avoid-this-common-pitfall/ :
Buffers such as join_buffer_size, sort_buffer_size, read_buffer_size and read_rnd_buffer_size are allocated per connection. Therefore a setting of read_buffer_size=1M and max_connections=150 is asking MySQL to allocate – from startup – 1MB per connection x 150 connections. For more than a decade the default remains at 128K. Increasing the default is not only a waste of server memory, but often does not help performance. In nearly all cases its best to use the defaults by removing or commenting out these four buffer config lines. For a more gradual approach, reduce them in half to free up wasted RAM, keep reducing them towards default values over time. I’ve actually seen improved throughput by reducing these buffers. But there’s really no performance gains from increasing these buffers except in cases of very high traffic and/or other special circumstances. Avoid arbitrarily increasing these!
The Speed of Memory Access
Contrary to the common logic, access to memory is not O(1).
More RAM you have, slower is the access to any data in this RAM.
So, using less RAM may actually provide faster access to the RAM - this is a general rule, not only applies to MySQL. Please see The Myth of RAM - why a random memory read is O(√N)
Now let us get back to the MySQL join_buffer_size.
Tuning MySQL join_buffer_size
The join_buffer_size is allocated for each full join between two tables. From MySQL’s documentation the join_buffer_size is described as: “The minimum size of the buffer that is used for plain index scans, range index scans, and joins that do not use indexes and thus perform full table scans.” It goes on to say: “Memory allocation time can cause substantial performance drops if the global size is larger than needed by most queries that use it.” The join buffer is allocated to cache table rows when the join can’t use an index. If your database(s) suffer from many joins performed without indexes it cannot be solved by just increasing join_buffer_size. The problem is “joins performed without indexes” and thus the solution for faster joins is to add indexes.
Change the MySQL config to log queries without indexes, so you will be able to find such queries and add indexes and/or modify the application that sends generates such ill queries. You should enable "log-queries-not-using-indexes"
Then look for non-indexed joins in the slow query log.