Re: Optimal number of WorkerThreads
Re: Optimal number of WorkerThreads
- Subject: Re: Optimal number of WorkerThreads
- From: Chuck Hill <email@hidden>
- Date: Thu, 24 Mar 2011 12:22:59 -0700
Hi Rafal,
On Mar 24, 2011, at 7:50 AM, Rafal Szczepanski wrote: I would like to ask you about the optimal number of WorkerThreads (application settings: WOWorkerThreadCountMin & WOWorkerThreadCount).
That depends. :-) I would say that a min of 4 is reasonable and that max should not be high enough to allow the instance to get backlogged with requests. How many instances are you running? Are they spread over multiple servers? Is concurrent request handling enabled? How much heap space are you allocating to each instance? Are the app servers swapping?
One of the my applications is serving sometimes more than 2000 pages per hour. The current setting is 16 WorkerThreads but I noticed that from time to time this number is not enough and the server is creating more WorkerThreads which is freezing for a while the application.
I think the more likely interpretation of this is that your app froze (was slow to process requests), so it created more worker threads to record the unprocessed requests waiting in line. WorkerThreads are created in response to slowness, creating them does not cause slowness.
Do you know if the number of WorkerThreads affects application’s performance? If not then perhaps I should start with 256 right from the beginning….
It does not affect performance directly, controls how many requests can be queued up in an application before wotaskd considers it too full to send more requests to. Making more workerthreads just means that the app will queue up more pending requests. This is usually a Bad Thing (tm) as it will take so long to process them and return a response that the user will click stop or click the link again, thus using another worker thread and making things worse. Find out what is making the app slow and fix that.
I’ve got also another question do you know some real life examples of applications built in WebObjects that are serving huge number of requests/heavy load?
The iTunes music store is the classic example, as well as the Apple Store. There are lots of others around that process a heavy load. You just need to optimize for your specific case.
Chuck
-- Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
|
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden