Results 1 to 10 of 10
  1. #1
    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.

  2. #2
    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.

  3. #3
    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.

  4. #4
    Join Date
    Dec 2001
    Location
    Franklin, TN, USA
    Posts
    1,322
    Linux Problems Solved. | Built for the Hosting Industry
    Server Management. Node Management. Helpdesk Management.
    ( AcuNett, Est. 15 Years, RateLobby 5 Stars )

  5. #5
    Join Date
    Jul 2001
    Posts
    256
    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,
    Old man of the hosting world..

  6. #6
    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.

  7. #7
    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

  8. #8
    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)

  9. #9
    Originally posted by Deahost
    Try this in your cnf file. This is what I use on:

    1.7 Mhz
    1 GB Ram

    etc
    ...
    I'm amazed that you can even run a webserver on a 1.7 MHz processor . But I guess the 1 GB of RAM does help

  10. #10
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •