My PHP script takes approximately 7 secs to operate because it brings and prcess data from various sources within the web. How's this connected with the amount of demands I'm able to process per second?

It is dependent on which assets your script uses.

Essentially, advertising media are from CPU, disk I/O, memory in your script's server, or in your database server, or on the servers that you simply fetch data from, or hit 3rd party API request limits, the overall game has ended.

This generally has related to concurrent demands instead of demands per second - the number of demands can, simultaneously, access the assets they might require in the pool open to all demands. This really is really much more complicated in tangible existence, since demands access different assets at various areas of their lifecycle, and you also will normally handle demands for various scripts on a single server, each having a different mixture of resource needs.

Lengthy-running demands come with an interesting interaction with demands per second. Usually, demands will require, say, 200ms. If you're able to handle 50 concurrent demands, which means you can handle something similar to 250 demands per second. Presuming you are able to only handle 50 concurrent demands, you are able to only handle 7 demands per second.

Within the first second, you'll have 7 running scripts. Within the second, 14. As much as 49 within the seventh. Then, within the eighth, 7 will release because of completion, and 7 is going to be added from new demands.

You might encounter Apache configuration issues way prior to running into actual resource usage issues - you will have to up the amount of servers/employees because you've got a somewhat non-standard use-situation (ie, most demands are handled in under another). For the way complicated your processing is, you might have the ability to handle hundreds of concurrent scripts if more often than not they're doing network I/O.

Benchmarking along with other performance analysis is the only method to have more accurate details about demands per second and/or concurrent connections.