Re: Semaphore limitations
- From: jetan@xxxxxxxxxxxxxxxxxxxx ("Jeffrey Tan[MSFT]")
- Date: Thu, 01 Mar 2007 08:38:45 GMT
Hi,
Besides Kevin and Arnaud's information, I have some other comment below:
Basically what I am doing is queing requests (threads) for an object on aDo you spawn a thread per user to serivce the request? So do you may have
per user basis
1000 threads waiting in the ISAPI extension? If so, it may have much
performance hint on the server. The real concurrent threads are the number
of CPUs on the server. So if you have 4 CPUs, there are 4 threads can be
executed at the same time. Most of the 1000 threads are in the sleep status
while costing a lot of memory for persisting their state and data
structure.
You may consider to implement some type of thread pooling and thread
reusing. Normally, I/O completion port is very suitable for this task. The
idea is after one thread has finished the previous work, it can be reused
to service the later user request, so we really should use a smal amount of
threads to service large number of requests. Also, due to the reduce of the
threads count, your design may need fewer mutex or critical sections.
I highly recommend you to read the second chapter of book <Programming
Server-Side Applications for MS Windows 2000> written by Jeffrey Richter.
It contains valuable insight and sample regarding how to construct thread
pool and I/O completion port to developing a high-scalable server
application.
Hope this helps.
Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
.
- Follow-Ups:
- Re: Semaphore limitations
- From: adebaene
- Re: Semaphore limitations
- References:
- Re: Semaphore limitations
- From: Kevin
- Re: Semaphore limitations
- Prev by Date: RE: FaxSendDocument blocking
- Next by Date: Re: Get path from dir handle
- Previous by thread: Re: Semaphore limitations
- Next by thread: Re: Semaphore limitations
- Index(es):
Relevant Pages
|