Haig Didizian wrote:
  Hi there,

Is there any wisdom in this community about whether it's better to let
these threads run forever, or whether it makes more sense to kill them
off after they process a number of connections?

As others mentioned, the downside of letting a thread run forever is that a memory leak could cause the server to grow, so killing off the threads after some number of requests is a reasonable safety precaution. The downside of killing off the threads is that it takes a nontrivial amount of time to start up a new thread; letting the thread server multiple requests amortizes this startup time across all the requests. So it's a trade-off between performance and safety.

Naturally, the best way to find good values is to do the benchmarking yourself. From what I recall the last time I did my own benchmarking there was very little additional performance to be had once you're serving 1000 requests per thread, although this could be higher if you have lots of library code.

Interesting side note: while lowering the number of conns per thread would seem to increase safety/stability at the cost of performance, I've found that lowering it too much (i.e., to 1 or 2 requests per thread) makes the server very unstable, often segfaulting after a handful of requests in quick succession. Raising it to 15 or more requests per thread and I haven't seen any problems no matter how hard I hit the server. This surely points to some kind of race condition, but I haven't figured out what it is. I suspect it's just the server slapping an admin intentionally trying to cripple it :/

-J


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
<lists...@listserv.aol.com> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to