Re: Semaphore limitations



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 a
per user basis
Do you spawn a thread per user to serivce the request? So do you may have
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.

.



Relevant Pages

  • Re: Can SSAS 2005 work in Novell network?
    ... windows account which was used to log on to the local machine. ... the server to the relevant OLAP roles you should be good to go. ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.sqlserver.olap)
  • Re: SBS2000 server BSOD when local machine uses Citrix Client
    ... The links you posted often had specific drivers attached to the errors. ... MS debugging tools on a production server? ... > pageable memory at a process internal request level that was too ... A suggestion would be to contact Microsoft Customer Support Services ...
    (microsoft.public.windows.server.sbs)
  • RE: Server Response 550 5.7.1 Message Rejected even though we auth
    ... > whether the problem is caused by SMTP virtual server or not. ... > It is always recommended to keep Exchange running with the latest update. ... > sometimes need to request logon credentials, ... > Microsoft Online Partner Support ...
    (microsoft.public.exchange2000.admin)
  • RE: .net 3.5 Web Service in IIS on XP PRO SP2
    ... running in IIS server, correct? ... Microsoft MSDN Online Support Lead ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • RE: Problems with Code Coverage and Team Build
    ... How do you clear locks on files on the build server. ... It is capable of finding out the process that locks a certain file. ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.vsnet.enterprise.tools)