There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".
In a multithreaded environment where multiple threads are fighting for the CPU cycles, which in turn are the causes for things like switch context, thread migration and thereby causing latency. Assigning critical process or thread within a process to a set of dedicated CPU's improves the performance of the given application. It is because the set of dedicated CPU's is not shared by any other application. I have also observed that not only the process or application but critical thread within the process or application if it is bind to a CPU then that too improves performance.
Background Post Solaris 10 when a user thread is created, LWP (light weight process) is simultaneously created which maps user thread to kernel thread. Light weight process is a layer between user thread and kernel thread. LWP is present because user thread cannot directly interact with kernel thread. A program will create a set of these processes running on Solaris and in turn consuming (competing for, waiting for) resources.
#psrset -b <Processor Set ID(1)> <PID of Application>
#psrset -b <Processor Set ID(2)> <PID of Application/LWP(Decimal vlaue of NID)>
#psrset -b <Processor Set ID(3)> <PID of Application/LWP(Decimal vlaue of NID)>
Comments (0)