Results 1 to 14 of 14
  1. #1

    Question upgrading, not sure if its a good idea??

    I am planning to upgrade my dedicated server next week, but not sure it will fix my problem.

    Currently I have: 8 sites on it, 2 of which are phpbb boards. Those are with most traffic and resource consuming. My 2 boards have usually around 40 people online each, but at peek hours they get 60-70 people online each (that's including guests and bots).

    My 3rd site is not mysql driven, only shtml pages. This site gets about 40-50 people online simultaniously.

    The rest of my sites have very little traffic (1-2 people online).

    Currently I have a CentOs server running 1 GB of ram and Pentium 4 2.8Ghz (that's what I always had, but now my webhost is saying I am having two P4s??)

    Actually, my sites were always running fine on this configuration, but some time ago my server got rooted, and my webhost upgarded php, Apache and installed Mod_secure for Apache. I suspect it is a resource hog. Ever since, my CPU is extremly high. "Top" command shows about 25-30% of CPU being consumed by mysql and the rest is httpd. During the peek hours my sites are extremly slow, php pages produce 500 errors, etc.. Server runs really bad. At the same time, I want to keep Mod_secure.

    So, I am trying to upgrade to 4GB of Ram and Intel Xeon 3040 (Dual Core). My webhost says they can even set up a special RAM drive, just for mysql queres.

    Do you think this upgrade will solve my problems and sites will run fine again, even at peek hours? Don't want to pay extra $50 per month in vain, just to discover my sites are still slow.

  2. #2
    Join Date
    Jan 2007
    Location
    /dev/null
    Posts
    3,696
    Well, what are the errors caused by?

  3. #3
    phpbb pages occasionally cause this error. Any phpbb page, but only when the server is very slow. The php error log has a few of these: Lost connection to MySQL server. No other php errors are recorded in logs.

    I also notice quite a few php<defunct> in top command. It only started after upgrade to a new php and apache.

  4. #4
    Simply upgrading won't necessarily fix your problem; you still need to optimize Apache and MySQL configs.
    478east
    High Bandwidth Servers
    Custom Hosting Solutions

  5. #5
    Join Date
    Feb 2008
    Location
    Houston, Texas, USA
    Posts
    2,955
    Quote Originally Posted by MariG View Post
    phpbb pages occasionally cause this error. Any phpbb page, but only when the server is very slow. The php error log has a few of these: Lost connection to MySQL server. No other php errors are recorded in logs.

    Maybe it's a good idea to configure phpbb to use persistent mysql connections.

    Quote Originally Posted by MariG View Post
    I also notice quite a few php<defunct> in top command. It only started after upgrade to a new php and apache.
    Defunct is when the php process is done executing but it doesn't exit cleanly so it goes into this funky defunct state. It becomes a problem if the process hasn't really finished executing and it goes into defunct state. If the latter is true, you're going to be getting either blank pages or 500 errors.

    I would ask for a memory upgrade to 2GB before you move on to the more expensive server. Increase mysql query cache size so queries are cached in-memory. It'll drop CPU usage by quite a bit. You could configure this yourself.

    Regards
    UNIXy - Fully Managed Servers and Clusters - Established in 2006
    [ cPanel Varnish Nginx Plugin ] - Enhance LiteSpeed and Apache Performance
    www.unixy.net - Los Angeles | Houston | Atlanta | Rotterdam
    Love to help pro bono (time permitting). joe > unixy.net

  6. #6
    thank you very much for your suggestions. I dunno if my webhost will increase my memory to 2 GB, as my current hosting plan doesn't suggest it, but I would like to try and increase mysql memory cache. I see these lines in my.conf:

    query_cache_limit=1M
    query_cache_size=32M ## 32MB for every 1GB of RAM
    query_cache_type=1

    what should I increase it to?

  7. #7
    Join Date
    Mar 2003
    Location
    WebHostingTalk
    Posts
    16,966
    It seems that your server is not properly optimized after the php/apache upgrades.

    Check also the rules of your modsec as it can make a site go slow if there are too much rules on it.
    Specially 4 You
    .
    JoneSolutions.Com ( Jones.Solutions ) is on the net 24/7 providing stable and reliable web hosting solutions and services since 2001

  8. #8
    Join Date
    Mar 2009
    Posts
    254
    You should consider upgrading, P4s are really ancient machines in the server market now and you'll definitely find a better server with the price you are currently paying. There is only so much optimisation can do and I suspect your server is already at its limit. Once you reach 20% CPU, mysql tends to choke a lot and slow down.

    My advice? Get a new server AND optimise. It won't cost you any different from what you are paying.

  9. #9
    Join Date
    Feb 2008
    Location
    Houston, Texas, USA
    Posts
    2,955
    Quote Originally Posted by MariG View Post
    thank you very much for your suggestions. I dunno if my webhost will increase my memory to 2 GB, as my current hosting plan doesn't suggest it, but I would like to try and increase mysql memory cache. I see these lines in my.conf:

    query_cache_limit=1M
    query_cache_size=32M ## 32MB for every 1GB of RAM
    query_cache_type=1

    what should I increase it to?
    It depends on how much free memory you have available. Please provide the output of the command:
    free -m
    Best
    UNIXy - Fully Managed Servers and Clusters - Established in 2006
    [ cPanel Varnish Nginx Plugin ] - Enhance LiteSpeed and Apache Performance
    www.unixy.net - Los Angeles | Houston | Atlanta | Rotterdam
    Love to help pro bono (time permitting). joe > unixy.net

  10. #10
    Join Date
    Jun 2009
    Location
    San Francisco, CA
    Posts
    17
    If the system suddenly got slow after getting rooted, I'd suspect you're still rooted. Was the system completely refreshed after the compromise? You or your host needs to do a complete re-install of the OS.

    If the re-install happened already and you're seeing slowness, perhaps you're running up against resource issues. The 1GB of memory is not enough for a server with some traffic. Increasing the memory may solve your problem. A P4 really isn't that slow unless you have some heavy PHP scripts. When your server gets busy, it sounds like it's doing some swapping.

    Cheers,
    Ed

  11. #11
    Join Date
    Mar 2009
    Location
    Israel
    Posts
    1,204
    Quote Originally Posted by lemeneid View Post
    You should consider upgrading, P4s are really ancient machines in the server market now and you'll definitely find a better server with the price you are currently paying. There is only so much optimisation can do and I suspect your server is already at its limit. Once you reach 20% CPU, mysql tends to choke a lot and slow down.

    My advice? Get a new server AND optimise. It won't cost you any different from what you are paying.
    I Agree, P4 are ancient machines

    you can get even a simple dual core / core 2 duo server for just the same price with twice as much ram(at least), and make sure your host optimizes your server and secure it properly.

    what about backups?, do you backup your SQL databases? -what happens to your server CPU Load? ( when u run sqldump to extract the databases? )
    beast5.com - Managed Hosting Solutions 2004 - 2016

  12. #12
    Quote Originally Posted by ebuck View Post
    If the system suddenly got slow after getting rooted, I'd suspect you're still rooted. Was the system completely refreshed after the compromise? You or your host needs to do a complete re-install of the OS.
    Actually, it went slow after they upgarded it, not after rooting. Yeah, they completely erased and re-installed the whole OS. Before everything was just so ancient on this server (maybe that's why I got rooted): old Centos 4, php4, old apache (still version 1.x), old mysql. I got this server 2 years ago, and it was never upgraded. With all that ancient soft and no mod_sec it was running fine. But with the new soft (and probably not optimized, like you all say), plus mod_sec, the system started choking.

    Thanks guys, after reading your feedback, I found another host on this board, in dedicated servers section, they will give me much more for even less price (8GB, QuadCore). Moving my stuff to a new home now. My old host was not bad, but I guess they are outdated. 2 years ago they were one of the best, but times change.

  13. #13
    Join Date
    Mar 2009
    Location
    Israel
    Posts
    1,204

    Smile

    Quote Originally Posted by MariG View Post
    Actually, it went slow after they upgarded it, not after rooting. Yeah, they completely erased and re-installed the whole OS. Before everything was just so ancient on this server (maybe that's why I got rooted): old Centos 4, php4, old apache (still version 1.x), old mysql. I got this server 2 years ago, and it was never upgraded. With all that ancient soft and no mod_sec it was running fine. But with the new soft (and probably not optimized, like you all say), plus mod_sec, the system started choking.

    Thanks guys, after reading your feedback, I found another host on this board, in dedicated servers section, they will give me much more for even less price (8GB, QuadCore). Moving my stuff to a new home now. My old host was not bad, but I guess they are outdated. 2 years ago they were one of the best, but times change.
    Good luck!, we are glad to hear you have found a solution.
    beast5.com - Managed Hosting Solutions 2004 - 2016

  14. #14
    Quote Originally Posted by MariG View Post
    Do you think this upgrade will solve my problems and sites will run fine again, even at peek hours? Don't want to pay extra $50 per month in vain, just to discover my sites are still slow.
    I think yes, acting in such a way you will manage to solve all these problems.

Posting Permissions

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