[Zope] Win2k Processor Affinity

Jim Washington jwashin at vt.edu
Wed Feb 4 08:22:32 EST 2004


Answering my own question after experimenting :)

> My production machine is a dual-processor machine running Windows 2000 
> Server with zope running as a service.
> I understand from previous posts that setting processor affinity, 
> i.e., making python/zope run on only one of the processors, may be a 
> good thing.  Since this is my production machine, I would rather not 
> experiment too much.
>
> What I have is the imagecfg.exe program from 
> http://www.robpol86.com/tutorials/imagecfg.php, and the instructions 
> are to run
>
> imagecfg -u file.exe
> imagecfg -a 0x1 file.exe
>
> on the executable file I would wish to set affinity to processor 1 on.
>
> I see that in Task Manager, I cannot set processor affinity manually 
> on my python process.  I get "access denied."
>
> I am running what I presume is the stock win32 install of zope-2.6.2.  
> It began as 2.6.0, but has been upgraded.
>
> So, now for the question:
>
> Has anyone done this?  

Yes.

> Is the above procedure the correct way to do this?  

Yes.  Even though I could not set processor affinity manually through 
task manager.

> Which executable(s) should be imagecfg'd?  Is it the python.exe in 
> [zope]/bin?  Or the .exe that starts the service?  or a .dll or two?
>
It's the python.exe in [zope]/bin .  I made a renamed backup copy of it 
just in case of failure.

Results:

It works.  I stopped Zope in the service manager, did the above, and 
then started Zope again.  It took a total of about two minutes.  I have 
not done any special performance testing, but visually in the task 
manager, zope is indeed running on a single processor, and my "zen" is 
that it seems a bit peppier.  It's been running fine in this state for a 
few days now. 

This of course allows a proper future experiment with ZEO --> server on 
one processor, client on the other.

--Jim Washington



More information about the Zope mailing list