Processor affinity windows server 2003
Feedback will be sent to Microsoft: By pressing the submit button, your feedback will be used to improve Microsoft products and services. Privacy policy. For more information, see Thread Security and Access Rights. On a system with more than 64 processors, the affinity mask must specify processors in the thread's current processor group.
If the function fails, the return value is zero. To get extended error information, call GetLastError. A thread affinity mask is a bit vector in which each bit represents a logical processor that a thread is allowed to run on. A thread affinity mask must be a subset of the process affinity mask for the containing process of a thread.
This would allow the spooler to work concurrently if there are larger spooling jobs so that the server can release smaller jobs while spooling larger jobs.
Example 1 user prints a page report while other 1-page reports is being printed, the server will spool the page job that may take 30 min for example but it will also use the pooled queues to process the 1-page reports. For the spooler, I'm not sure, you could possibly do the same but as a start-up file, however i don't know the impact if it's already running. This powershell script in combination with a scheduled task will also take care of it.
Playing with affinity is rather a workaround, and I highly doubt it will resolve the problem for you. Find out the root cause of the problem, be it a software issue AV, Bitlocker, other services hogging the resources or a hardware problem slow storage, overprovisioned CPU or RAM , and fix it properly.
Adrian has outlined some excellent suggestions about how to proceed in the comment above. Get answers from your peers along with millions of IT pros who visit Spiceworks. The server is a VM with 4 processors running at 2. Best Answer. I would want to set the affinity, and keep this setting across reboots so manually changing the affinity after starting the service will not work for me. Some services, such as IIS, are built with the ability to read a bitmask from the registry and use that to set their own CPU affinity when they start, but that is not a feature of every service.
I would probably create a task that is set to fire on an event, and the event would be "MyService service is started" The task would then run this Powershell code:. Powershell already has this ability built in to it by simply doing:. A bitmask means that a decimal value 1 means "the first CPU only," a decimal value of 2 binary 10 means "the second CPU only," a decimal value of 3 binary 11 means "CPUs 1 and 2," and so on and so forth.
Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. Is it possible to set the processor affinity of a service, and persist this affinity across reboots? Ask Question.
0コメント