HTTP server benchmarking/load testing in Python

Thomas Passin list1 at tompassin.net
Wed Jan 25 23:02:33 EST 2023


On 1/25/2023 8:36 PM, Chris Angelico wrote:
> On Thu, 26 Jan 2023 at 12:06, Thomas Passin <list1 at tompassin.net> wrote:
>>
>> On 1/25/2023 7:38 PM, Peter J. Holzer wrote:
>>> On 2023-01-25 16:30:56 -0500, Thomas Passin wrote:
>>>> Great!  Don't forget what I said about potential overheating if you
>>>> hit the server with as many requests as it can handle.
>>>
>>> Frankly, if you can overheat a server by hitting it with HTTP requests,
>>> get better hardware and/or put it into a place with better airflow.
>>>
>>
>> Frankly, if you have a server-grade machine then well and good but if
>> you are running a nice quiet consumer grade laptop - my development
>> machine - you need to be careful.  We don't know what hardware the OP is
>> using.  And it's not servicing the requests per se that's the issue,
>> it's the heavy computing load that has to be done for each request.  The
>> CPU is generally pegged at 100% for most or all of the test.
> 
> If you have to worry about thermals because of CPU load, then worry
> about thermals because of CPU load. The HTTP request testing is
> completely separate.
> 
> Load testing means putting a system under load. I'm not sure why you'd
> be concerned about one specific possible consequence, rather than, I
> dunno, just put the system under load and see how it performs?

This is not that hard, folks!  I needed to know the throughput of this 
system if it were hit with a great many queries at once, as if it were a 
busy help desk, for instance.  The intent is not to bring the server to 
its knees as a load test for the server, it's to measure the maximum 
throughput for independent queries.  It happens that each query takes a 
lot of processing, so the system is not IO bound, it's CPU bound.  The 
result is a large CPU load and a large amount of heat generated.

"just put the system under load and see how it performs" This is exactly 
what was happening, but not in the service of stressing the computer, 
but in finding the throughput for this particular Tomcat app with 
representative queries.  As a byproduct, I noticed very high CPU 
temperatures, which probably wouldn't have occurred in a datacenter 
server with much better cooling.  I didn't care about that except for 
protecting my own laptop.

And this is way OT for the OP's question.


More information about the Python-list mailing list