Tuesday 17 April 2012

Binding Solaris processes

Sometimes you may need to bind a particular process to a CPU so it gets all the resources it needs. This is done two simple commands:

psradm -i 1

First we disable interrupts on the above process and makes it available for LWP handling. Since the CPU will be needed only for the particular process we assign it we don't need to worry about network or I/O interrupts.

pbind -b 1 2222

Here we bind process ID 2222 to CPU 1.

To view current bindings use:

pbind -q

And finally to unbind any specific process:

pbind -u <PID>  (pbind -u 2222 for our process above)




No comments:

Post a Comment