The server runs XAMPP (Apache and MySQL mainly). Lately the concurrent user count has increased, and the server crawls and sputters during peak load. It only has 4GB RAM though. So, my question is will increasing RAM make a difference?
-
This machine is showing three fourths of its RAM "available". That is not a machine that is experiencing memory pressure. To confirm this, you could look at the page fault rates - especially the hard fault rate. If these are low, adding RAM will not help. CPU usage does not appear to be a problem either.– Jamie HanrahanApr 6, 2016 at 8:59
1 Answer
Increasing MySQL max connection has a direct effect on RAM, as it increases the number of file descriptors that mysqld requires
max_connections = (Available RAM - Global Buffers) / Thread Buffers
To get the global and thread buffers
SHOW VARIABLES LIKE '%buffer%';
Just have a look in the number of opened tables
mysqladmin status
SHOW GLOBAL STATUS LIKE 'Opened_tables';
Note: It is always better to have separate servers for Apache and MySQL. Increasing RAM will definitely help