[...] > I have noticed that the scheduler often throw around > a thread among different processors. An improvement > would be to make the thread stay at the processor it > was first assigned to, but I don't know how to > achieve this. I've heard about pbind, but to my > understanding that only restricts the _process_ to a > certain processor set, not the _threads_, right?
AFAIK, there is a reasonable effort to keep threads on the same CPU (keep from thrashing the cache, or whatever), as well as to keep them somewhere that can access their memory efficiently on a NUMA system. OTOH, it's also desirable to have separate threads on separate hardware threads and/or cores, to get more work done overall. See for example http://blogs.sun.com/saurabh_mishra/entry/latency_lgroup_in_solaris_on http://developers.sun.com/solaris/articles/scalable/ http://blogs.sun.com/sistare/entry/the_ultrasparc_t2_processor_and Anyway, what's "best" looks like it's not strictly simple or obvious, and probably isn't best for every situation. But I would guess that if you can come up with a situation that's pathological _and_ more likely to be common rather than contrived, there might well be folks interested in seeing a reasonably minimal example that would re-create the problem, so that they could take it into account next time they're into rejiggering the scheduling algorithms. Not that I speak for anyone but myself of course, which is why I said "guess". :-) This message posted from opensolaris.org _______________________________________________ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code