Portal Home > Knowledgebase > Articles Database > Everyday at midnight, my server load goes high for 30mins....whats causing it?


Everyday at midnight, my server load goes high for 30mins....whats causing it?




Posted by awaisuk, 08-25-2011, 12:50 AM
Hey. Everyday at midnight, my server load goes high for 30mins....whats causing it? I cant seem to find whats causing it! There are no crons or backups scheduled. Here is top: What is this kswapd0 ? Someone know whats wrong, or what the server is trying to do every midnight for this high server loads? Thanks.

Posted by Purevoltage, 08-25-2011, 12:52 AM
Do you have any cron's setup for midnight? That could do it if it's doing some type of backup on your box.

Posted by awaisuk, 08-25-2011, 01:09 AM
I dont think so, this is a new server, running Plesk on it. Now loads are above 100+

Posted by samy, 08-25-2011, 01:16 AM
kswapd0 is a process of allowing the swap. So that means that a program is running at midnight, the enormous needs resourches.

Posted by bvsonline, 08-25-2011, 01:29 AM
It seems to be heavy usage of mysql resource by one of your databases. We could see from the above result, mysql is using about 166.2% of CPU . Tuning the mysql and apache servers should yield a good result. Also you should verify the free memory available in the server. It can be some software applications in any of your domain's cronjobs that is using the database.

Posted by Isaac Newton, 08-25-2011, 01:33 AM
You seem to have set you swap too low. ----------------------------------------- Swap: 1052248k total, 1052248k used, 0k free, ------------------------------------------

Posted by awaisuk, 08-25-2011, 02:11 AM
hmmm, how would I change that? And to what value is good?

Posted by Isaac Newton, 08-25-2011, 02:21 AM
Setting swap is something that is done when the server is built, but no worries you can create a swapfile which will act as the swap-space for your server. Ideally swap = 1.5 to 2 times your RAM, but since your RAM is 7GB, I don't think a swap of 1.5 times 7gb is required. Try increasing the swap to 4GBs. The following commands will help you create a swapfile of 3GB (since you already have 1GB) (this assumes you have a free space of more than 3GB on your '/' partition. This will create a swapfile '/swapfile' which will act as the extra 3GB swap on your machine. Wait till tonight 12, if you don't see the load going up, then you can edit your /etc/fstab to make this change permanent. You can create this file with any name or at any location that you wish to Last edited by Isaac Newton; 08-25-2011 at 02:24 AM. Reason: typo

Posted by anythingss, 08-25-2011, 11:46 AM
It does sound like a cron. check /var/log/cron ? Yes the swap is small, but I dont think increasing the swap space will help. The system is running slow because its started to rely on swap. likely that stuff is failing due to the lack of ram, meaning the load goes down again. increasing the amount of swap may actually exaggerate and extend the problem. swap is in use because you've used more than 8gb of ram with something, you should find what that is first. check "ps auxww" next time it happens and look for those using your ram. note, unless censored it may not be safe to post the results here



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
hspere,plesk or ??? (Views: 640)