2

Running a high traffic lemp web server on Centos 7 platform using nginx and mariadb. The server is running very nicely and load avg and cup usage is acceptable but from what I know it should not be. I have been monitoring the server for the last several months and noticed that memory and swap usage has been slowly increasing. I checked this morning and noticed the following htop output:

load average: 0.18, 0.18, 0.22
Mem: 7.64G Available, 7.22G Used
Swp: 7.87G Available, 7.87G Used

I would assume at this point the server would be running at a snails pace but it is not... it is running incredibly fast as it always has been.

Could anyone shed any light on this phenomena?

Some notes: An in memory table is being run in mariadb, but the records are truncated every half hour or so and there are usually no more than about 2000 records in this table.

Mariadb is set to log slow queries. I have noticed that the slow query log has grown to be very high in size over the last couple of months. It's currently at about 40GB. I will actually be disabling the slow query logging soon and removing the big log file.

Other details below:

PHP Version: 5.4.16
Server API: FPM/FastCGI
MariaDB (MySQL): 5.5.52-MariaDB
nginx version: nginx/1.10.2

nginx.conf has the standard (I think?)
events {
worker_connections 1024;
}

Some php-fpm configuration details:
pm = dynamic
pm.max_children = 50
pm.start_servers = 5
pm.min_spare_servers = 5
pm.max_spare_servers = 35

The server is running as a guest on VMware configured with a single CPU and 8GB of ram.

  • linuxatemyram.com – Patrick Apr 29 '18 at 18:54
  • Note that a large amount of swap usage has little to do with speed or stability. It is the pressure to swap pages back in and others out that typically brings a machine to a crawl. Memory usage by process would need to be known in order to address your specific circumstances. – Michael - sqlbot Apr 29 '18 at 19:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.