Portal Home > Knowledgebase > Articles Database > Is there any room for optimization on this server?


Is there any room for optimization on this server?




Posted by Gary4gar, 06-24-2009, 06:32 PM
Hi All, the server is constantly under high load and sometimes it reaches 100%.the server is running a imagehosting site. script is from http://yabsoft.com. I was wondering if there any room to optimize the server or hardware upgrade is only solution. Server Specs: Intel ATOM 330 2GB RAM 500GB HDD Centos with Cpanel Server Stats: Mem info No of connections how to get the load down? Last edited by Gary4gar; 06-24-2009 at 06:36 PM.

Posted by WHR-Abner, 06-24-2009, 07:01 PM
You pasted the 'top' command's result when the server's load average was normal. But I still see some CPU cycles taken by your webserver 'Apache'. Your 'sda3' has a lot of read/write cycles, I think it is your database location ('/var'?). There is a lot of illegitimate traffic to your server (probably a DOS/DDOS attack) which might be overloading your webserver and hence the server. Have you verified the 'netstat' results filtering the source and the destination IPs? If not, try the below commands and let me know the results: netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n|tail -n 20 netstat -ntu | awk '{print $4}' | cut -d: -f1 | sort | uniq -c | sort -n|tail -n 5 If you need an admin's help in mitigating the DOS/DDOS attack, PM me..

Posted by Gary4gar, 06-24-2009, 07:06 PM
here is some more info about apache status

Posted by Gary4gar, 06-24-2009, 07:09 PM
what makes you say this is a DDOS attack?

Posted by WaferVPS, 06-24-2009, 07:14 PM
You seem to be at the limit of your RAM, you might be swapping. Have you tried reducing your memory footprint?

Posted by Gary4gar, 06-24-2009, 07:21 PM
Because sda3 is main partition. sda1 = /boot sda2 = swap

Posted by Beast5, 06-24-2009, 08:06 PM
I like to see servers that work like that , shows that your site is a popular one :-) does not look like a ddos affect, at all. just a busy website. the first thing i would suggest is getting rid of un-needed apache modules as a start. reconfigure your system swap priority. remove un needed services from the init, remove un-used kernel modules. change the mount options a bit for more preformance. then ( ho i must say it .. ) reboot. another thing, you can configure your cpanel to use less ram ( give that memory hog 96mb .. it will work ). if any of this did not help, try switching to nginx httpd webserver insted of apache (awsome preformance for static pages). after you done all of these steps ( nginx is not mandatory ), and still you feel your server is working too hard, i recommend you to consider looking at some better hardware.

Posted by WHR-Abner, 06-24-2009, 08:29 PM
There is a lot of access from "67.159.20.206" ip. Is this a trusted one? It seems to DOS your webserver. I told the other connections to be illegitimate since only 191 connections out of 2605 connections were in 'ESTABLISHED' state (3 way handshaking). Other requests aren't synced. Can you check the status of other connections? Check if they are in TIME_WAIT or in SYN. If your webpages have bots then most likely that should be the cause (if it is SYN_SENT).

Posted by Gary4gar, 06-25-2009, 02:00 AM
The server load if high now. and it is seriously lagging behind I have replaced apache with Litespeed, but it looks like it does not make much difference. I believe this be because of php script that the site is running on. its poorly coded to be resource intensive. But I don't think its a DDOS attack.

Posted by Gary4gar, 06-25-2009, 02:39 AM
Its in TIME_WAIT state. check the above post

Posted by HD Fanatic, 06-25-2009, 03:34 PM
What are your litespeed settings: http://www.litespeedtech.com/how-tos.html#qa_dos Paste the lsphp5 settings. Also, you might want to ask for help in the official litespeed forums.

Posted by bostjan, 06-25-2009, 06:26 PM
Are you using some sort of PHP opcode caching module? I recommend eAccelerator. b.

Posted by elas, 09-03-2009, 06:00 AM
Are you still running yabsoft script on atom 330? Did it actually worked or you had to upgrade to more powerful hardware?



Was this answer helpful?

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

Also Read