Results 1 to 10 of 10
-
06-07-2002, 04:21 PM #1WHT Addict
- Join Date
- Jun 2002
- Location
- Arcadia, CA
- Posts
- 148
Old Server Fine - New Server Overload! Good tweaks?
Hi, I've lurked these forums for a while and finally decided to post...Anyway, hopefully you guys can help, I really need it! I've got a web page that gets about 100,000 requests per day (that is total requests, not hits). I was on a friend's server (it used Plesk), but I decided to move to my own server since I was taking up so much of his resources and bandwidth. My friend's server had a half gig of RAM.
My new server has a full gig of RAM. It started out with Ensim on it, but I took it off (by deleting all the Ensim rpm's). So it is now Red Hat 7.1 with my own custom installation of Apache (with mod_php) and MySQL. This server is DYING, and it has more processing power, which means it must be my config. The RAM is being eaten up badly, and I can't figure out why. What are some good server tweaks I can do to Apache and MySQL to make them less hurtful on the RAM?
Here is what I've got on Apache (not ALL default, some of my own settings):
Timeout 120
MaxKeepAliveRequests 200
KeepAliveTimeout 10
MinSpareServers 10
MaxSpareServers 20
StartServers 5
MaxClients 200
MaxRequestsPerChild 100
ThreadsPerChild 100
And MySQL (taken from my-medium.cnf - again, with a few of my own settings)
key_buffer=16M
max_allowed_packet=1M
table_cache=64
sort_buffer=512K
net_buffer_length=8K
myisam_sort_buffer_size=8M
max_connections=300
interactive_timeout=180
wait_timeout=180
Any help at all would be great! Please help me config it properly! Thanks a lot.Last edited by ccole; 06-07-2002 at 04:29 PM.
-
06-07-2002, 04:40 PM #2Web Hosting Master
- Join Date
- Feb 2002
- Posts
- 1,926
Can't really comment on the settings, but was it running ok when it had Ensim on it? Removing Ensim is supposed to be par with finding the Holy Grale, so I hope you got all of it and didn't cause any damage there. Probably would have been a far better idea to have the disk formatted and start clean.
-
06-07-2002, 05:14 PM #3WHT Addict
- Join Date
- Jun 2002
- Location
- Arcadia, CA
- Posts
- 148
I asked them to do that, but they wouldn't. So I read a few tutorials and some posts on this website and did it myself. It seemed to work out all right, I really don't think that's my problem.
-
06-07-2002, 05:24 PM #4Linux Problems Solved.
- Join Date
- Dec 2001
- Location
- Los Angeles, CA
- Posts
- 1,337
Ronny Fang
Linux Problems Solved. | Built for the Hosting Industry
Server Management. Node Management. Helpdesk Management.
( AcuNett, Est. 15 Years, RateLobby 5 Stars )
-
06-10-2002, 12:34 AM #5Web Hosting Guru
- Join Date
- Jul 2001
- Posts
- 305
Personally, if your dedicated company refused to format the system and put a fresh OS on, I would move elseware. If they expect a small fee that would be reasonable, however.
Good luck,
-
06-10-2002, 06:57 AM #6Web Hosting Master
- Join Date
- Jun 2001
- Posts
- 960
ccole, please try to set the KeepAliveTimeout to 0. This would significantly help reducing zombie processes in a server with high traffics.
-
06-10-2002, 08:10 AM #7Disabled
- Join Date
- May 2002
- Posts
- 71
Try this in your cnf file. This is what I use on:
1.7 Mhz
1 GB Ram
etc
[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
set-variable = max_connections=400
set-variable = key_buffer=16M
set-variable = table_cache=1024
set-variable = sort_buffer=4M
set-variable = join_buffer=3M
set-variable = record_buffer=3M
set-variable = myisam_sort_buffer_size=64M
set-variable = thread_cache=512
set-variable = wait_timeout=3600
set-variable = connect_timeout=10
set-variable = thread_concurrency=2
[mysql]
no-auto-rehash
[mysqldump]
quick
set-variable = max_allowed_packet=128M
[safe_mysqld]
open-files-limit=8192
[isamchk]
set-variable = key_buffer=128M
set-variable = sort_buffer=128M
set-variable = read_buffer=2M
set-variable = write_buffer=2M
[myisamchk]
set-variable = key_buffer=128M
set-variable = sort_buffer=128M
set-variable = read_buffer=16M
set-variable = write_buffer=16M
[mysqlhotcopy]
interactive-timeout
regards,
Brian
-
06-10-2002, 08:45 AM #8Web Hosting Master
- Join Date
- Feb 2002
- Posts
- 956
I suggest you snip your apache down to Apache/1.3.xx PHP/4.x.x (Which means get rid of all modules but php)
-
06-10-2002, 09:13 AM #9WHT Addict
- Join Date
- Aug 2000
- Posts
- 111
Originally posted by Deahost
Try this in your cnf file. This is what I use on:
1.7 Mhz
1 GB Ram
etc
...
-
06-11-2002, 01:39 AM #10WHT Addict
- Join Date
- Apr 2001
- Posts
- 127
are you sure you are really lacking RAM? The only sure way I know of knowing this is when your swap space is starting to be used.
Linux uses much of the free extra RAM for caching.