How 2 Optimize / Tune Servers (HTTP/FTP/SSH/PHP/MYSQL)
Hi guys,I have been searching all day on this forum and catching up on what's hot and what's not on server security.
I have TWO servers I need to speed up / optimize, completely.
If someone were to help me out I would greatly appreciate it.
First server is in USA,
Specs #1 (USA SERVER):
AMD Sempron 2400
512MB RAM
80GB HDD 7200 RPM
100Mbit port (Unmetered Bandwidth)
Unmetered transfer
Burstable bandwidth
CPANEL + WHM + Fedora Core 2
AMD Sempron 2400
512MB RAM
80GB HDD 7200 RPM
100Mbit port (Unmetered Bandwidth)
Unmetered transfer
Burstable bandwidth
CPANEL + WHM + Fedora Core 2
PHP.INI
safe_mode = Off
safe_mode_exec_dir = /home/
safe_mode_include_dir = /home/
safe_mode_allowed_env_vars = PHP_ ; Setting certain environment variables
open_basedir = /home/
disabled_functions = exec,system,dl,cmd,backtick,escapeshellcmd,passthru
max_execution_time = 30 ; Maximum execution time of each script, in seconds
memory_limit = 4M ; Maximum amount of memory a script may consume (8MB)
file_uploads = Off ; Whether to allow HTTP file uploads
;upload_tmp_dir = ; temporary directory for HTTP uploaded files (will use system default if not specified)
upload_max_filesize = 2M ; Maximum allowed size for uploaded files
allow_url_fopen = Off
HTTPD.CONF:
Timeout 30
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 7
MinSpareServers 15
MaxSpareServers 30
StartServers 15
MaxClients 1024
MaxRequestsPerChild 0
safe_mode = Off
safe_mode_exec_dir = /home/
safe_mode_include_dir = /home/
safe_mode_allowed_env_vars = PHP_ ; Setting certain environment variables
open_basedir = /home/
disabled_functions = exec,system,dl,cmd,backtick,escapeshellcmd,passthru
max_execution_time = 30 ; Maximum execution time of each script, in seconds
memory_limit = 4M ; Maximum amount of memory a script may consume (8MB)
file_uploads = Off ; Whether to allow HTTP file uploads
;upload_tmp_dir = ; temporary directory for HTTP uploaded files (will use system default if not specified)
upload_max_filesize = 2M ; Maximum allowed size for uploaded files
allow_url_fopen = Off
HTTPD.CONF:
Timeout 30
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 7
MinSpareServers 15
MaxSpareServers 30
StartServers 15
MaxClients 1024
MaxRequestsPerChild 0
top - 17:19:44 up 39 days, 3:50, 1 user, load average: 0.19, 0.44, 0.65
Tasks: 128 total, 1 running, 126 sleeping, 0 stopped, 1 zombie
Cpu(s): 20.7% us, 7.0% sy, 0.0% ni, 70.7% id, 1.3% wa, 0.3% hi, 0.0% si
Mem: 483576k total, 463604k used, 19972k free, 31332k buffers
Swap: 982792k total, 221888k used, 760904k free, 133844k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
29232 nobody 17 0 22328 9104 3508 S 2.0 1.9 1:15.60 httpd
29255 nobody 15 0 22448 9256 3560 S 2.0 1.9 1:17.62 httpd
29284 nobody 15 0 22300 9048 3532 S 2.0 1.9 1:10.73 httpd
29489 nobody 15 0 22236 9020 3536 S 2.0 1.9 1:19.69 httpd
29226 nobody 15 0 22780 9432 3524 S 1.7 2.0 1:27.64 httpd
29229 nobody 15 0 22288 9068 3568 S 1.7 1.9 1:13.71 httpd
29231 nobody 15 0 22260 9100 3580 S 1.7 1.9 1:10.05 httpd
29250 nobody 15 0 22584 9392 3552 S 1.7 1.9 1:20.43 httpd
29248 nobody 15 0 22232 8908 3412 S 1.3 1.8 1:11.00 httpd
29223 nobody 16 0 22444 9216 3548 S 1.0 1.9 1:23.66 httpd
29238 nobody 15 0 22524 9264 3516 S 1.0 1.9 1:07.68 httpd
29245 nobody 15 0 22456 9228 3532 S 1.0 1.9 1:11.00 httpd
29246 nobody 15 0 22468 9208 3524 S 1.0 1.9 1:11.70 httpd
29431 nobody 16 0 22252 8948 3440 S 1.0 1.9 1:08.05 httpd
29488 nobody 15 0 22216 8860 3400 S 1.0 1.8 1:18.25 httpd
29227 nobody 16 0 22048 8852 3556 S 0.3 1.8 1:16.68 httpd
29233 nobody 15 0 22344 9144 3536 S 0.3 1.9 1:19.80 httpd
Tasks: 128 total, 1 running, 126 sleeping, 0 stopped, 1 zombie
Cpu(s): 20.7% us, 7.0% sy, 0.0% ni, 70.7% id, 1.3% wa, 0.3% hi, 0.0% si
Mem: 483576k total, 463604k used, 19972k free, 31332k buffers
Swap: 982792k total, 221888k used, 760904k free, 133844k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
29232 nobody 17 0 22328 9104 3508 S 2.0 1.9 1:15.60 httpd
29255 nobody 15 0 22448 9256 3560 S 2.0 1.9 1:17.62 httpd
29284 nobody 15 0 22300 9048 3532 S 2.0 1.9 1:10.73 httpd
29489 nobody 15 0 22236 9020 3536 S 2.0 1.9 1:19.69 httpd
29226 nobody 15 0 22780 9432 3524 S 1.7 2.0 1:27.64 httpd
29229 nobody 15 0 22288 9068 3568 S 1.7 1.9 1:13.71 httpd
29231 nobody 15 0 22260 9100 3580 S 1.7 1.9 1:10.05 httpd
29250 nobody 15 0 22584 9392 3552 S 1.7 1.9 1:20.43 httpd
29248 nobody 15 0 22232 8908 3412 S 1.3 1.8 1:11.00 httpd
29223 nobody 16 0 22444 9216 3548 S 1.0 1.9 1:23.66 httpd
29238 nobody 15 0 22524 9264 3516 S 1.0 1.9 1:07.68 httpd
29245 nobody 15 0 22456 9228 3532 S 1.0 1.9 1:11.00 httpd
29246 nobody 15 0 22468 9208 3524 S 1.0 1.9 1:11.70 httpd
29431 nobody 16 0 22252 8948 3440 S 1.0 1.9 1:08.05 httpd
29488 nobody 15 0 22216 8860 3400 S 1.0 1.8 1:18.25 httpd
29227 nobody 16 0 22048 8852 3556 S 0.3 1.8 1:16.68 httpd
29233 nobody 15 0 22344 9144 3536 S 0.3 1.9 1:19.80 httpd
Please note, right now the load was very low, but the average load for this pc is around 8-10, and it goes up into 30-40 a few times a day, and few weeks ago it was above 100, yet was still online ( I have no clue how, it was very slow however ).
IS there any mods or tweaks I can do to these settings to make the box faster and process easier, so the load doesn't go sky high and crash.
Specs #2 (Server located in China)
AMD Sempron 2400
512MB RAM
80GB HDD 7200 RPM
100Mbit port (Unmetered Bandwidth)
Unmetered transfer
Burstable bandwidth
NO CONTROL PANEL, YET. Server is brand new fresh install of Fedora Core 4
Thank you kindly and I appreciate the help I hope to recieve. Both boxes are single processors just btw.