A
A
Aramaki2013-03-31 01:47:50
System administration
Aramaki, 2013-03-31 01:47:50

How to determine which site is loading the Unix server?

there is a Debian server in the Selectel cloud , daily consumption periodically jumps by 4 times, of which 90% of the consumption goes to the

disk, namely by articles

Disk: read requests 50%
Disk: write requests 22%
Disk: read volume 24%

ISPmanager is installed on the server - bandwidth limits do not give a hint

According to the results, I sin on the swap, but how to determine the source of the problems? at least to the folder, ideally to the script...


[email protected]:~# free
total used free shared buffers cached
Mem: 262144 259424 2720 0 3588 29024
-/+ buffers/cache: 226812 35332
Swap: 524284 149628 374656

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
Dzen_Marketing, 2013-03-31
@Dzen_Marketing

If the disk sags, then with a high degree of probability this is working with the database, but YouTube is not hosted by you?
Since the database is MySQL in most cases, then install Percona, where the stat shows which user gives which load.
But I would first look at iotop and others like them in order to localize the disk-eating service

S
Stormix, 2013-04-01
@Stormix

If swap is used, it kills performance to hell forever.
If you suspect “something else”, then you can try to split the pools of script processor processes for each of the sites (by pool per site or in batches, using the halving method, for example. Depending on how quickly you need to find the culprit and how you have a lot of resources) and use the same iotop to monitor the load.
Of course, it will not be very interesting for you to constantly look at iotop, so you can stick it into Cacti or Zabbix (we use Cacti, we are happy). In a day, you will see the culprit on the chart.
How to separate pools depends very much on what programming language you have and how the script is run. For example, in the nginx + php5-fpm bundle, it is enough to separate the fpm pools, and configure the nginx upstreams for each of the sites, respectively.

E
EugeneOZ, 2013-03-31
@EugeneOZ

NewRelic can show the culprit (namely, the script and the request). I'm not sure if this is in the free version, but to solve the problem, as an option, you can buy a paid plan for a month.
Well, or you can enable mysql slow query log for free, and then parsing with your hands is not the most pleasant pastime.

S
Swartalf, 2014-10-17
@Swartalf

atop/iotop/htop will help you find the process itself.
if it is mysql, then using mytop(my_top|mtop in different distributions in different ways) it will be possible to specify the query/function/procedure itself

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question