Increase processs priority and affinity in Solaris


 
Thread Tools Search this Thread
Operating Systems Solaris Increase processs priority and affinity in Solaris
# 1  
Old 10-01-2010
Java Increase processs priority and affinity in Solaris

I want to know how can in Solaris i can:
>Set Process priority to maximum
>Set Process Affinity.

Linke in windows task manager we can set process priority to following levels:
Low, Below Normal,Normal , Above Normal , High , Realtime
And we can set process affinity to run on all processors.

I am also interested to know how can i check process affinity in Solaris?
> Means on which processors , a process is running?Smilie
# 2  
Old 10-01-2010
pbind sets "affinity" - in Solaris it is called binding
psradm -F undoes binding

renice lets you change process priority of an existing process. BE CAREFUL. Do not use real time priorities or the system can become unusable. AND. Be sure to read the "nice man pages" - nice is a command and it explains what thpriority numbers mean. They are backwards from what you think now, I'm sure.
# 3  
Old 10-01-2010
Quote:
Originally Posted by jim mcnamara
pbind sets "affinity" - in Solaris it is called binding
psradm -F undoes binding
"psradm -F" undoes the binding when a CPU is put in off-line or spare state but I wouldn't recommend doing it that way.

To bind a process:
Code:
pbind -b cpu pid

To undo this binding:
Code:
pbind -u pid

These kind of binds are shared, i.e. the affected CPUs are still usable by other processes.

You can also create sets of cpus with psrset and bind/unbind processes to theses sets. Unlike those create with pbind, these bindings are exclusive meaning only bounded processes can use the CPUs in a set.
# 4  
Old 10-02-2010
A better question would be what problem are you trying to sovle?

Binding to a specific processor almost certainly isn't going to gain you much if any performance, and even then it's only likely to gain you performance if you're running on a NUMA machine and have taken steps to ensure the memory used by your process is local to the CPU(s) you bind to.

And the only way raising the priority of the process is going to help is if it's fighting with other processes for CPU time. If you process is already getting 100% CPU utilization or close to it (use prstat), upping the priority won't help a bit.
# 5  
Old 10-04-2010
Quote:
Originally Posted by achenle
Binding to a specific processor almost certainly isn't going to gain you much if any performance, and even then it's only likely to gain you performance if you're running on a NUMA machine and have taken steps to ensure the memory used by your process is local to the CPU(s) you bind to.
If many processes are fighting for CPUs, exclusive binding to a processor set might still help.
Quote:
And the only way raising the priority of the process is going to help is if it's fighting with other processes for CPU time. If you process is already getting 100% CPU utilization or close to it (use prstat), upping the priority won't help a bit.
A single process can be efficiently prioritized when the fair share scheduler is used instead of the usual time sharing one. This is certainly a better approach than processor binding.
# 6  
Old 02-03-2011
Thanks everyone
I have a new Question in same context

I can increase process priority with nice command but still it takes too much time
And CPU is still 93% idle.
CPU states: 93.6% idle, 5.9% user, 0.3% kernel, 0.3% iowait, 0.0% swap
Memory: 32.0G real, 17.6G free, 9.5G swap in use, 17.0G swap free

PID USERNAME THR PR NCE SIZE RES STATE TIME FLTS CPU COMMAND
20995 root 1 57 -19 958M 854M cpu18 10:34 0 5.91% sort

I binded it to one cpu22 but still it is taking alot of time
how can i also increse PR value?
PID USERNAME THR PR NCE SIZE RES STATE TIME FLTS CPU COMMAND
20995 root 1 59 -19 1.3G 853M cpu22 14:34 0 5.97% sort

Last edited by kashif_islam; 02-03-2011 at 07:15 PM..
# 7  
Old 02-03-2011
If your process tops at 6% CPU while there is still CPU available, there is nothing you can do using CPU binding or process priorities. Your process is just not enough multi-threaded to better make use of your CPUs.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

How to increase the size of rpool in Solaris 11?

Hi Please let me know how to increase the size of rpool in solaris 11 in ldom. I know how to map the new LUN to LDOM after that please let me know the procedure to increase the rpool and how to identify new disk in OBP level of ldom as I need to set the new/lun to be my new boot device. (5 Replies)
Discussion started by: hb00
5 Replies

2. Solaris

Solaris 10- DHCP lease time increase

HI Admins, can anyone tell me how can I increase the lease time in Solaris 10. I want to use that dhcp address for 4 weeks. (2 Replies)
Discussion started by: snchaudhari2
2 Replies

3. UNIX for Dummies Questions & Answers

Is there a way to temporarily increase the priority of cron's batch queue?

I run an application where some component periodically submits jobs into cron's batch queue via the 'batch' command. Each of these jobs perfoms a query to retrieve some data from a database, builds up an openoffice document with that data, and submits it to a headless openoffice server to have... (3 Replies)
Discussion started by: jsandeo
3 Replies

4. Solaris

How to activate "high" priority queues for codine (Sun Grid Engine) under solaris 10

How to activate "high" priority queues for codine (Sun Grid Engine) under solaris 10? What are the steps? (0 Replies)
Discussion started by: ionrivera
0 Replies

5. Solaris

how to increase file size in solaris 10 os

hi, let me know how to increase file size in solaris 10 OS (4 Replies)
Discussion started by: meet2muneer
4 Replies

6. Solaris

How to increase Inode numbers in Solaris 10

Hi guys, need your help on this since i dont know much about solaris. the problem is i need to increase inodes space on /export/home/ root@BRF-DANCCM1 # /usr/ucb/df -i Filesystem iused ifree %iused Mounted on /dev/vx/dsk/bootdg/rootvol 53026 1162206 ... (7 Replies)
Discussion started by: ichiko
7 Replies

7. Solaris

understanding the processs

i have a process with the question mark and started on 22 jan.. does this mean it is a zombie process. there are no connecting or child processes... oracle 17546 1 0 Jan 22 ? 0:00 oracleprod2 (LOCAL=NO) please help.. (1 Reply)
Discussion started by: sudhiroracle
1 Replies

8. Solaris

What is the command to increase filesystem on solaris

I wanted to know what is the process or command to increase a filesystem on solaris. For example the /tmp directory. (3 Replies)
Discussion started by: strikelit
3 Replies

9. UNIX for Advanced & Expert Users

getting processs name

hi, by getpid() i will get the pid of the current process. but how do get the name of this process... or instead from pid how do i get process name... is there any way... thanks in advance.... (2 Replies)
Discussion started by: vishallbansal
2 Replies
Login or Register to Ask a Question