Horribly vague question on apache performance

Discussion in 'Apache' started by m0nkeymafia, Aug 29, 2007.

  1. #1
    I have a site, it gets about 10k hits a day, so a decent amount but not overwhelming.

    I currently have it running on a VPS with 256mb RAM, my hosting says the server keeps crashing because it needs more RAM than it has and as such canes the swap file until the file system crashes.

    Should a fairly decent CMS with 10k visitors a day be able to run on 256mb RAM? I thought so but perhaps I'm wrong.

    Cheers
     
    m0nkeymafia, Aug 29, 2007 IP
  2. just-4-teens

    just-4-teens Peon

    Messages:
    3,967
    Likes Received:
    168
    Best Answers:
    0
    Trophy Points:
    0
    #2
    would depend on a lot of things, if it was a plain static page site then i would say yes, but a cms usually involves php and mysql.

    if the mysql queries are not optimised it could cause that extra load to the server.

    also what cpu u got?
     
    just-4-teens, Aug 29, 2007 IP
  3. m0nkeymafia

    m0nkeymafia Well-Known Member

    Messages:
    399
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    125
    #3
    its a single core of a quad core xenon processor, 3ghz i think
    the sql is heavy but optimised, i think, fairly well

    ta for reply btw
     
    m0nkeymafia, Aug 29, 2007 IP
  4. just-4-teens

    just-4-teens Peon

    Messages:
    3,967
    Likes Received:
    168
    Best Answers:
    0
    Trophy Points:
    0
    #4
    just-4-teens, Aug 29, 2007 IP
  5. m0nkeymafia

    m0nkeymafia Well-Known Member

    Messages:
    399
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    125
    #5
    thanks teens ill have a read !
     
    m0nkeymafia, Aug 30, 2007 IP
  6. greys

    greys Peon

    Messages:
    49
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Generally you should be fine, but it depends on the nature of your traffic as well. The reason your system crashes is not directly related to the 10k hits, but has more to do with the number of simultaneous connections (very simply put, visitors to your website). My 256Mb VPS is enough for 12-15 simultaneous connections before it starts swapping, because each Apache process wants around 10M.

    I suggest you get MRTG configured to constantly monitor your system using the free command - I monitor the overall amount of free memory, the free memory without cache, and the number of currently running Apache processes. They obviously correlate, and it's very easy to then see how each additional Apache process affects your available RAM.
     
    greys, Aug 31, 2007 IP
  7. noppid

    noppid gunnin' for the quota

    Messages:
    4,246
    Likes Received:
    232
    Best Answers:
    0
    Trophy Points:
    135
    #7
    I just went through the same thing, exactly. 256MB is not enough even though they sell it. The techs I worked with even kinda wondered why they have um. Almost every one they sell is over loaded.

    Anyway, I went up to the 512 and got a kick ass tune up by the engineers. The VPS runs at about 300 to 310 MB ram now. Before it ran at about the same constantly breaking out of the 256 and bursting into the spare gig and beyond often and crashing apache. It was ugly in the logs. :(

    Look for a free app called vpsinfo.php and install it. You can see the things I told you about and that others have mentioned like ram, paging, sql usage, running processes and so on.

    I have 2 forums and about 16 other php automated sites. I am glad I found that vpsinfo tool and that I have good host engineers. I don't think you'll regret the upgrade when you can see what's happening and how much improvement you gain on the upgrade if you use vpsinfo to analyze the situation.

    Just to add one thing, CPU was not an issue. RAM for apache was. CPU only became an issue when apache ran away.
     
    noppid, Aug 31, 2007 IP
  8. m0nkeymafia

    m0nkeymafia Well-Known Member

    Messages:
    399
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    125
    #8
    Thanks guys very interesting reading
    Really appreciate your help!
     
    m0nkeymafia, Aug 31, 2007 IP