My machine appears to be swapping excessively, degrading performance.
Note the high load average, combined with the mostly idle CPU and a
lot of swap space being used.
3:11am up 47 days, 2:13, 12 users, load average: 6.06, 4.79, 3.19
482 processes: 480 sleeping, 1 running, 1 zombie, 0 stopped
CPU states: 1.7% user, 3.5% system, 0.0% nice, 94.6% idle
Mem: 1031204K av, 1010340K used, 20864K free, 0K shrd, 76084K buff
Swap: 1020116K av, 397720K used, 622396K free 424652K cached
I looked at "top" sorted by memory usage, and saw dozens of mysqld
processes at the top (each with size 35492, RSS 23M, share 1240). So
it appears that mysqld is taking up a lot of memory.
How can I reduce memory consumption?
sql table query