Menu

Massive Load

Help
2003-06-27
2003-07-06
  • Nobody/Anonymous

    When I run this script through a browser, I get massive (99%) apache resources being used. Whats all this 0.01% stuff about? tried with and without real sockets!

     
    • Mirco Bauer

      Mirco Bauer - 2003-06-27

      which script did you try? (maybe an example script)
      the 0.01% I got on a P3 1ghz under Linux with the socket extension,
      99% is not possible, SmartIRC has routines that slows the script down, with socket extension under linux its the best, with windows without socket extension the worst, the reason is windows don't know usleep() and throttleing through socket extension is only possible if its  used. If you got windows and no socket extension then there is no way of throtteling, change OS or load socket extension and activate it in SmartIRC... Also try the last version from CVS, it has alot improvements with socket extension loading etc...

       
    • Nobody/Anonymous

      I got it sorted by changing usleep() to sleep(1) the reactions are a little slow, but at least it works. Im developing on Windows atm, once its sorted and running on the server, Ill change it back to usleep() :)

       
    • Paul Querna

      Paul Querna - 2003-07-06

      You could just add a stream_select call if you are in PHP 4.3.0 or newer on windows. It should give you instant response times, and nearly 0 load.

       
      • Mirco Bauer

        Mirco Bauer - 2003-07-06

        I can use stream_select on file handles? If yes, this woulb be real cool, then I can get rid of the usleep() hack for fsocks...

         

Log in to post a comment.