MYSQL Memory Usage
I am running a MySQL server, and i noticed that 80% of the server memory (8GB Total) is being used by mysqld processes.
Here is an image of the HTOP
http :// tinypic.com/view.php?pic=r1lvyu&s=5
by the way, mysql> SHOW PROCESSLIST; displays only 4 users on "Sleep" command.
What can be the issue?
Probably no issue.
The server is just waiting for the next time it is going to be "harassed" with a load of heavy queries.
It all depends on the server configuration.
In the configuration you specify how much RAM you allow MySQL to use for index/data cache and how many threads that it should be kept in cache for future use. In fact if you have a dedicated SQL server you very often let it use about 80% of the RAM on the machine and this is not something that is returned just because it doesn't have something to do just now. Because the database server can't know if it in about 1 ms might get hit with 1000 heavy queries. So it will keep all data it's allowed to have in memory to be able to answer the upcoming queries as fast as possible.