Re: AppDomains and sharing threadpool



"Shawn B." <leabre@xxxxxxxx> wrote
Ultimately, I am trying to achieve a few important things:

1) I want the services to be able to shut themselves down, restart, or
update themselves without having to shut down the service from the Windows
Service Manager. The reason for this is because I am implementing
autonomic computing (self-healing) logic; if our own service manager
detects the services are in a condition that isn't healthy, it'll perform
steps to remedy the situation (the same way our human administrators
currently do but it is nearly a full-time job for what can very easily be
automated).

It almost sounds like you want want a service - you want your own Service
Host (and, as you already know) a bunch of App Domains withing that Host.

I would be leery of this for long-running Server Processes - especially on
x86 systems. You may overly fragment the heap, especially on multi-processor
boxes.

Have you given any though to hosting your stuff in COM+? That might be a
viable option.

2) Currently, the services we use follow the 16 or 32 threads per
processor rule for optimal performance.

What rule is this? I know lots of threading rules, and haven't heard of this
one. I've been under the (obviously mistaken) impression that 1 thread per
processor core was ideal, and you should try your hardest to trend towards
this.

What I'd like to do have them share a single thread pool (custom
threadpool for reasons I don't want to get into during this message) and
also for tracking.

What you want is to tie your Thread Pool to an I/O Completion Port. This
will allow any number of your AppDomains (and Processes) to be smart about
thread scheduling. Jeff Richter, in his Power Threading library, already has
written exactly such a thread pool. I would strongly recommend you go read
up on IOCP real quick, as it sure sounds like what you're looking for. It's
a big topic to learn, and will likley take you the better part of a day to
read the relevant literature...

--
Chris Mullins, MCSD.NET, MCPD:Enterprise, Microsoft C# MVP
http://www.coversant.com/blogs/cmullins


.



Relevant Pages

  • Re: Working on howl port
    ... software needs to work as if it has no control over network allocation, ... the host does not have knowledge of what IPv4 Link- ... these modifications reduce the reliability of the DHCP service. ... is not sufficient reason to unconfigure a valid DHCP ...
    (freebsd-net)
  • Re: AppDomains and sharing threadpool
    ... Host a bunch of App Domains withing that Host. ... reasons I'm not aware of. ... What you want is to tie your Thread Pool to an I/O Completion Port. ... that "sleep" between processing). ...
    (microsoft.public.dotnet.framework.clr)
  • Re: BSDstats Project v2.0 ...
    ... You use hostname and IP as a unique identifier for each host. ... For that reason, I have not submitted any of our systems. ... Again, don't know if they're legit or not, but keeping up with that stuff is going to require eyes-on type manual labor. ...
    (freebsd-questions)
  • Re: SQL Server 100MB
    ... you'll never need as much as 100MB, unless you have a reason to ... retain large amounts of historical data. ... Hosting is very much more different. ... I changed host last month ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: SQL Server 100MB
    ... you'll never need as much as 100MB, unless you have a reason to retain ... large amounts of historical data. ... Hosting is very much more different. ... I changed host last month because the original host made ...
    (microsoft.public.dotnet.framework.aspnet)

Quantcast