Proxy CPU too high! Help!

Discussion in 'General Business' started by ethanwa, Sep 11, 2007.

  1. #1
    Hi everyone. I'm running PHProxy on my Windows 2003 server with IIS6, PHP5 and when my proxy is in use by just 10+ people my CPU jumps to 100%!

    Has anyone else had CPU proxy problems? Is this a PHProxy issue? Or maybe the way my web server is set up?

    Advice needed! It's slowing my entire server and lossing money for my other sites.

    Ethan
     
    ethanwa, Sep 11, 2007 IP
  2. easterwolf

    easterwolf Well-Known Member

    Messages:
    608
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    108
    #2
    Are you on a dedicated box? If so it really shouldn't be that bad! If you are on a VPS, it may be a case of over-sell hosting and they are skewing the resource usage to try and get you to upgrade. I actually know nothing about Windows servers, but that still seems odd for sure.
     
    easterwolf, Sep 11, 2007 IP
  3. thewird

    thewird Peon

    Messages:
    647
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You shouldn't be hosting proxies on a Windows server.

    thewird
     
    thewird, Sep 11, 2007 IP
  4. WatchOut

    WatchOut Guest

    Messages:
    1,359
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #4
    VPS or Ded.Ser?

    I agree with thewird, I prefer hosting proxies on Linux based servers.
     
    WatchOut, Sep 11, 2007 IP
  5. Kagato

    Kagato Banned

    Messages:
    1,228
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Hosting them on Linux normally works well :D
     
    Kagato, Sep 11, 2007 IP
  6. grandy

    grandy Banned

    Messages:
    239
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Actually, there isn't any matter with the Operating system till you get enough resources available in the server to feed your proxies. Perhaps, his server got low memory to expose the load and http requests of the proxies. Even more, processor speed should come in concern.

    Regards
     
    grandy, Sep 11, 2007 IP
  7. mbfootball47

    mbfootball47 Well-Known Member

    Messages:
    1,705
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    140
    #7
    switch to linux quickly
     
    mbfootball47, Sep 11, 2007 IP
  8. thewird

    thewird Peon

    Messages:
    647
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #8
    No, Windows sucks for hosting. I've done benchmarks with proxies when I was starting 2 years ago. Its like 60-80% performance loss.

    note: exaggerating but there really is a big performance loss.

    thewird
     
    thewird, Sep 11, 2007 IP
  9. grandy

    grandy Banned

    Messages:
    239
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I m not interested to get into an arguement with you thewird. ;) But please look what i have written in my reply more carefully :)

    Good Luck.
    Regards
     
    grandy, Sep 11, 2007 IP
  10. thewird

    thewird Peon

    Messages:
    647
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #10
    I can't read, I'm illiterate, I can only argue in english :D. Anyway, the thread started hasn't provided enough information to go by except for the Windows hosting.

    thewird
     
    thewird, Sep 11, 2007 IP
  11. Anteros

    Anteros Peon

    Messages:
    631
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    0
    #11
    What cpu it is? a low end cpu will max it's capacity very soon. Even more if you don't have too much ram.
     
    Anteros, Sep 11, 2007 IP
  12. ethanwa

    ethanwa Peon

    Messages:
    349
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Guys, I am not asking my question to get a Windows vs. Linux hosting debate going. I am asking for help.

    Basically, my box is a DEDICATED Pentium 4 with 2GB RAM, 1.5TB hard drive, etc. It's hosted at a data center in Texas. It's more than fine. I don't know if it's something wrong with the PHP, or what.

    The site also runs about 20+ other sites (many of which are also PHP), and when I turn off my Proxy site the CPU goes back to normal.

    In PHProxy is there any calls that may take up large amounts of CPU, like hashing a webpage or anything like that?

    Ethan
     
    ethanwa, Sep 11, 2007 IP
  13. D'Godown

    D'Godown Well-Known Member

    Messages:
    1,093
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    140
    #13
    wot thewird says is 100% true.

    @grandy the more the resources it will perform better, but read what OP says, he is in problem and want a solution, not expense.
     
    D'Godown, Sep 11, 2007 IP
  14. Anteros

    Anteros Peon

    Messages:
    631
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    0
    #14
    phproxy has to iterate many times using preg_match and preg_replace to proxify it. that's cpu consuming.
     
    Anteros, Sep 11, 2007 IP
  15. abdussamad

    abdussamad Active Member

    Messages:
    543
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    60
    #15
    Actually it doesn't really make sense. Surely ten proxy users can't bring a p4 to its knees? Have you checked whether you have hotlink prevention enabled in phproxy? Also try to set a reasonable max file size. Say 512 KB.
     
    abdussamad, Sep 11, 2007 IP
  16. Anteros

    Anteros Peon

    Messages:
    631
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    0
    #16
    are you using something like geo ip, extras?
     
    Anteros, Sep 11, 2007 IP
  17. ForgottenCreature

    ForgottenCreature Notable Member

    Messages:
    7,473
    Likes Received:
    173
    Best Answers:
    0
    Trophy Points:
    260
    #17
    Try switching to a linux server and let us know what happens.
     
    ForgottenCreature, Sep 11, 2007 IP
  18. thewird

    thewird Peon

    Messages:
    647
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #18
    Agreed.

    thewird
     
    thewird, Sep 11, 2007 IP
  19. ethanwa

    ethanwa Peon

    Messages:
    349
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #19
    Thanks for the tips everyone, I will try them.

    ForgottenCreature and thewird: Bite me.
     
    ethanwa, Sep 11, 2007 IP
  20. thewird

    thewird Peon

    Messages:
    647
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #20
    We are trying to help you... Windows sucks for hosting. Always has, probably always will.

    thewird
     
    thewird, Sep 11, 2007 IP