Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Server overload?

  1. #11
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Sounds like a fairly specific thing. How many users do you forsee simultaneously uploading? I doubt it'll overlap more than two at a time very frequently.

    Let's say your site is really popular... let's say.... 720 uploads per day. That's 21,600 in a month... 259,200 in a year! Congrats
    That's an average of 30 per hour. Let's say that they all take 1 minute. Then, there's an average of 1 every two minutes in the hour, with half of that time used for processing, the rest resting.
    In other words, the serving is working half the time.
    And, sure, it would overlap, but I doubt you'd get more than 3-4 at a time very often. 2 at a time? Sure. 3? sometimes. 4? rarely. 10? hardly ever. more? maaaaybe once in a while.

    And, really, many servers have a 30 second limit on the PHP script processing, so that would be even less time busy, assuming all of the processing were under 30 seconds (or you have something bigger to deal with).

    In the end, this means that, sure, once in a while, you'll come across a time when multiple people are uploading. They'll get a slight delay. ...so?
    I've had slight delays on many pro sites (my connection? Theirs? both?), but it's to be expected. Once in a while something loads slowly. The end. And it would be back up full speed soon enough.
    Last edited by djr33; 04-12-2007 at 05:19 AM.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  2. #12
    Join Date
    Aug 2005
    Posts
    971
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Twey
    No it won't... the server handles each script in a different thread, otherwise everybody who wanted to view a page would have to wait until everybody else had done downloading it before s/he was allowed a look.
    Oh yes, I completely forgot that shell_exec opens a new shell each time it's called.

    Quote Originally Posted by Twey
    Those two scripts deal with graphics processing, and will probably take up quite a lot of resources.
    Will using GhostScript take up a lot of resources as well?

    [QUOTE=Twey]You can set limits to the maximum amount of memory and CPU time per user (/etc/security/limits.conf on my distro). Create a new user, give it some sane limits, and have the shell commands run under that user instead of the one you usually use for PHP scripts.

    I guess I should do that.

    Quote Originally Posted by drj33
    Sounds like a fairly specific thing. How many users do you forsee simultaneously uploading? I doubt it'll overlap more than two at a time very frequently.
    No clue, this application I am building is just in it's developmental state.

    Quote Originally Posted by drj33
    In the end, this means that, sure, once in a while, you'll come across a time when multiple people are uploading. They'll get a slight delay. ...so?
    I've had slight delays on many pro sites (my connection? Theirs? both?), but it's to be expected. Once in a while something loads slowly. The end. And it would be back up full speed soon enough.
    So, I shouldn't worry about overloading the server or wasting unwanted bandwidth?

    Thank you all for your kind replies.

  3. #13
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    If you want perfection, sure, worry about it.
    In a real life situation? Likely could be ok.
    I'm not sure on specifics, but I'd say fix it if it becomes a problem.
    Do what you can now; doesn't hurt, but don't over stress.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  4. #14
    Join Date
    Aug 2005
    Posts
    971
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ok, Thanks everyone!!

Bookmarks

Posting Permissions

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