[Mongrel] Processor Affinity for Services!

Luis Lavena luislavena at gmail.com
Sun Feb 26 21:46:04 EST 2006

I was playing with a dualcore opteron at office this week.

Thinking at because ruby Thread nature is no native (OS) Threads,
multithreading actually means nothing to ruby, right?

But after I saw the cluster-howto of Zed, thought a bit and do a
research... service clustering even in the same machine?

Because we truly have 2 cpus, bind a ruby interpreter to each one is
no problem (because there isn't communication between them).

That way, we could take maximum CPU availability for each
interpreter... get the picture?

Oh, almost forgot, just add --cpu N when installing the service
(number range from 1 to 8).
Don't have a 4-way machine here to test grather values than CPU 2 :-D

This week I'll investigate what is needed to "gracefully crash" your
service and make Windows Service Monitoring automatically restart
it... like a "service guardian", sounds cool doesn't?

BTW, now services stop OK, again was ruby threading nature which
conflict with native (OS) ones.


More information about the Mongrel-users mailing list