Re: Processor Affinity
Posted in 1999
Mike Segel wrote: > Processor Affinity isn't a good idea. > It defeats the purpose of SMP and while some may say its the greatest > thing since sliced bread, its like stored proceedures. Use it when > necessary. > The question is really one of scheduling. > Does SunOS (Solaris) give a scheduling preference to a process thats > been assigned to a specific processor? Sorry Mikey but the gains from processor affinity have more to do with cache coherency than processor scheduling. We have done the benchmarks on Solaris and there are BIG gains to be had from pinning a process to a CPU. Even more so if you have taken advantage of the kernel config parameters I mentioned a few months ago to reduce the system timeslice period and task reschedule period in Solaris. Seems that as CPUs got faster noone ever though that 1/10sec was a H**L of a long time for a process timeslice at 300+MHZ. We have adjusted the slice to 10ms and suddenly the machine was able to achieve >60% utilization (98% actually). More was getting done faster. Then we tried affinity and gained additional throughput as the processes would tend to be rescheduled to the same CPU and its cache image was intact. On Numa architecture machines, like most Intel boxes with >8 CPUs, there are additional issues having to do with which CPU owns what pages of physical memory, as I mentioned in my TechNotes article. But that does not affect Sun. > Bob Davis wrote: > > > In article <79urbk$u0i$1@nnrp1.dejanews.com>, > > f_testa@yahoo.com wrote: > > > Does anyone have any experience and recommendations regarding > > > the use of processor affinity for a multi-cpu Sun E6500 > > > database server supporting a high traffic web site running > > > IDS 7.30UC3. I have heard arguments for and against its use > > > where I am attempting to reduce or eliminate occasional 27001 > > > connection errors. This is a dedicated database server and I > > > have accounted for more than enough connections with the NETTYPE > > > entry in the $ONCONFIG file. > > I believe that you should always use processor affinity if your platform > > supports it. I think that Informix recommends the same. The general rule of > > thumb is to affinitize all but one processor on a dedicated server. This, of > > course, is really driven by how "dedicated" the server is. > > I would be interested to know what arguments you have heard against using > > processor affinity. Art S. Kagel