Server cpu wayyy too high - 3 proxies on a dedicated server

Discussion in 'Site & Server Administration' started by walesalex, Jan 16, 2007.

  1. #1
    cpsrvdup (green)
    named (9.2.4)up (green)
    Server Load4.95 (1 cpu) (red)
    Memory Used50.8 % (green)
    Swap Used0.00 %(green)
    Disk hda3 (/) DMA+7 % (green)
    Disk hda1 (/boot) DMA+12 % (green)

    My server has a 2.8GHz CPU, 1 gig of ram, 80gb harddrive. I opened up 3 proxy sites on this dedicated server last night, they've had almost 5,000 unique hits in the past 2 days between them all and the server has gone crazy. 2 sites are using CGIProxy and one is using PHProxy 0.4, any idea why the CPU usage is so high?
     
    walesalex, Jan 16, 2007 IP
  2. shade88

    shade88 Peon

    Messages:
    138
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    CGIProxy with that many unique will crushed your server, nothing unusual. You need dual xeon dual core with lots of ram to handle it and still have some room to grow or your user will leave because of slow response.
     
    shade88, Jan 16, 2007 IP
  3. powerspike

    powerspike Peon

    Messages:
    312
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #3
    it wasn't in your post, so i'll say it now, install MOD PERL, it'll drop the resource usage of cgiproxy alot.

    also look on their website, they have suggestions to speed things up.

    Also check the traffic that is coming thought your proxy, if you have 1 person requesting 100,000 files, firewall them off from the server (yes this isn't the best solution, but one person accounting for full % points of usage is going to drive up costs)
     
    powerspike, Jan 17, 2007 IP
  4. tanfwc

    tanfwc Peon

    Messages:
    579
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #4
    What web server software you are using? Did you tweak your conf file?
     
    tanfwc, Jan 17, 2007 IP
  5. login

    login Notable Member

    Messages:
    8,849
    Likes Received:
    349
    Best Answers:
    0
    Trophy Points:
    280
    #5
    Check your real bandwith usage at the customer portal also. You should block file sharing/upload sites.
     
    login, Jan 17, 2007 IP
  6. walesalex

    walesalex Peon

    Messages:
    552
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Nobody has used more than 50mb of bandwidth according to awstats. Still been super high usage throughout today. :(

    I haven't tweaked any conf files or anything, this is the first server I've owned, I've just been on crappy shared plans before. I'll install MOD PERL now thanks. :)
     
    walesalex, Jan 17, 2007 IP
  7. login

    login Notable Member

    Messages:
    8,849
    Likes Received:
    349
    Best Answers:
    0
    Trophy Points:
    280
    #7
    Dont check the bandwith usage at awstats, any stats in cPanel, cPanel or whm. They will not count leechers. You have to check it at a place that shows all in and out traffic. If you have a customer page at the company who you rent the server from there should be something there. If you dont find it there ask your host, this is important, the bandwith usage can be many, many times higher than the cPanel shows you. You can get an ugly surprise in paying over usage. I did.


    ??? When I load this page here I get a box telling me to log in to whm at 216.32.80.74 ???

    walesalex, you have pasted some code in your message!!!
     
    login, Jan 17, 2007 IP
  8. sarahk

    sarahk iTamer Staff

    Messages:
    28,814
    Likes Received:
    4,535
    Best Answers:
    123
    Trophy Points:
    665
    #8
    He put images in his post from his stats package, only you have to be logged into his stats package to see them. We've probably all made similar newbie errors in the past. No harm done, freaky though when you don't know what it is.
     
    sarahk, Jan 17, 2007 IP
  9. Spacey

    Spacey Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    What version of cgi proxy are you running? 2.01 doesnt suck up as much as the beta15 does.
     
    Spacey, Jan 17, 2007 IP
  10. rednimer

    rednimer Well-Known Member

    Messages:
    455
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    120
    #10
    cgi proxy is a beast, and really needs to be optimized to not kill your server.

    with a little tweaking you should be able to keep it under control.

    a good test is to load a couple instances myspace in your browser at once, and watch your server load.
     
    rednimer, Jan 17, 2007 IP
  11. walesalex

    walesalex Peon

    Messages:
    552
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Ah right, I just copied it straight from my WHM so yeah I suppose with the images hosted there you'd need to log in, sorry all, why did nobody say sooner? :p

    I'm using the beta15 I think Spacey, I'll have a look at changing them to 2.01, thanks.

    Login, I'll be emailing the people my server is with now and ask them, I can't see anything in my customer control panel with them, thanks.

    Rednimer, I also will be trying that now, I suspect it's something to do with my not optimizing at all. :(
     
    walesalex, Jan 18, 2007 IP
  12. tanfwc

    tanfwc Peon

    Messages:
    579
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #12
    to see the real bandwidth coming in/out of the server, you might want to install MRTG on it. :)
     
    tanfwc, Jan 18, 2007 IP
  13. walesalex

    walesalex Peon

    Messages:
    552
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #13
    walesalex, Jan 18, 2007 IP
  14. Zulu

    Zulu Guest

    Messages:
    83
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #14
    All optimizations aside, its Server Load, not CPU Usage, that seems to be high. And, actually its not that high at all in my opinion. Server load states the value of Load average. CPU usage can be lower than 50% for 10+ load average, and it can be 99% for a load average as low as 1. It depends on the type of application thats running.

    For a 2.8GHz cpu with proxy sites, server load (load average) of around 10 is common. It can go over 50 without any problems on dual xeons at peak hours. It is roughly a measure of the number of simultaneos processes running at that time.

    - Zulu
     
    Zulu, Jan 18, 2007 IP
  15. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #15
    mod_perl isn't compatible with php ( when php is in apache module mode at least, not sure about the cgi version ), also, the description of the load average above isn't great, if your load average is at 2.0 then your server needs to be 200% faster to keep up with it's average workload at the time, load averages are calculated every minute and so are pretty up to date, you should take notice it wouldnt turn red if there wasn't something wrong.
     
    krakjoe, Jan 18, 2007 IP
  16. sgugal

    sgugal Peon

    Messages:
    183
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #16
    I would recommend you to upgrade RAM on your server . Make it atleast 4 GB to distribute multiple instances of proxy at a time .
     
    sgugal, Jan 18, 2007 IP
  17. tanfwc

    tanfwc Peon

    Messages:
    579
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #17
    tanfwc, Jan 18, 2007 IP
  18. crazyryan

    crazyryan Well-Known Member

    Messages:
    3,087
    Likes Received:
    165
    Best Answers:
    0
    Trophy Points:
    175
    #18
    I installed mod_perl on mine and alex's server and things seem to be going a little better.
     
    crazyryan, Jan 20, 2007 IP
  19. maiahost

    maiahost Guest

    Messages:
    664
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #19
    What difference would that make when it comes to CPU ?
     
    maiahost, Jan 21, 2007 IP