Linux / UNIX Tech Support Forum
This is a discussion on how to control process at RHEL within the CentOS / RHEL / Fedora forums, part of the Linux Distribution category; Hi, I had a strange problem with my RHEL 5. RHEL installed at Blade 460C with Quad Core. with kernel-PAE-2.6.18-92.1.18.el5.i686.rpm ...
|
Register free or login to your existing account and remove all advertisements. |
|
|||||||
| CentOS / RHEL / Fedora Discussion about Redhat Enterprise Linux or CentOS or Fedora Linux related problems. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi,
I had a strange problem with my RHEL 5. RHEL installed at Blade 460C with Quad Core. with kernel-PAE-2.6.18-92.1.18.el5.i686.rpm installed. This server attached with a SAN storage (MSA1000) with 2 fiber cable. SAN storage divided into 2 partition (part A and part B) Then, I try to simulate workload process. I copied some files (around 10 files, each has 150 MB size). I run this process with 5 console instantly ( 5 consoles with copying process) capture from top -------------------------------------------------------------------- Tasks: 458 total, 1 running, 457 sleeping, 0 stopped, 0 zombie Cpu0 : 1.3%us, 26.9%sy, 0.0%ni, 0.0%id, 71.4%wa, 0.0%hi, 0.3%si, 0.0%st Cpu1 : 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu2 : 0.3%us, 0.3%sy, 0.0%ni, 99.3%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu3 : 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu4 : 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu5 : 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu6 : 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu7 : 1.3%us, 4.0%sy, 0.0%ni, 94.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 8309944k total, 8130192k used, 179752k free, 274168k buffers Swap: 16777208k total, 100k used, 16777108k free, 7362092k cached -------------------------------------------------------------------- CPU0 has 0% idle, then this condition jumps to CPU6 then CPU 2, and so on.. My questions, How to bind workload to all processor (distributed workload across the 8 CPUs), so idle 0% at one of the CPU is not happening again. Thanks for you idea/comment... BR, b4ndit |
| Sponsored Links | ||
|
|
|
||||
|
Linux kernel will pickup CPU randomly or ideal CPU. You can override the kernel's process scheduling and bind a certain process to a specific CPU or all cpu using a command called taskset. See:
__________________
Vivek Gite Linux Evangelist |
|
|||
|
Thanks, great info.
Since this machine will mostly used its resource to accessing the SAN storage, could I dedicate some CPU or CPUss) for this task? Another question comes to my mind, Can we set a lower threshold for %idle at each processor? My aim is to transfer processes at every CPU if its reach a certain %idle value. Example: if CPU0 reach %idle value of 20, then (CPU1) or (CPU1 and CPU2) will help CPU0. Many thanks... Last edited by b4ndit; 03-20-2009 at 08:59 PM. |
|
||||
|
Usually, CPU only dedicated to server such as XEN, VMWARE, Oracle database and so on. In case SAN, disk I/O handled by SAN and not by your Linux server. So I do not see any specific issue here..
Quote:
__________________
Vivek Gite Linux Evangelist |
|
|||
|
They (my supervisors) don't really satisfied with this one...
![]() What They expect is the workload of every processor are nearly similar. In linux affinity, we can set some process to some CPU. They want to bind processes to all CPUs (8 CPUs we had acting as one group of a processor). So, all of CPU %user,%system and other value nearly the same. (if we compare it to M$ Task Manager, the green lines of every cpu shows the same workload) comments are very apprecited... Thanks. |
|
|||
|
Hi,
The Kernel (Linux or others) on SMP architecture will automatically distribute the load across processors if there is a load to distribute... - if multiple process are running and runnable (not waiting for I/O) then they will be dispatched across all available processor queues (if processor sets are not implemented) - if a single process is running and runnable, it will be dispatched to single processor queue unless the process is multi-threaded. - if the process is multi-threaded, it will be able to use entire cpu power (dispatched on all cpu queues) only if there are more runnable threads than cpu queues Lastly, you do want process/cpu affinity: it avoid transferring cpu registers data from one processing queue to the other and improve performance... Thus what your supervisor is asking for does not make sense ! Good day! |
|
|||
|
I see, that's why processes always jumped to another CPU..
I wonder, are there any possibilities that we could make those 8 CPU acting as one unity? so they could share same load ? Like this one, I've read this...but I don't really understand to use it.. ![]() ![]() links: Scheduling domains [LWN.net] Again, comments are very...very...appreciated.. Thanks. |
|
||||
|
For Scheduling domains you need a kernel patch. Currently, only SGI (and may few other HPS provider got such patch). However, RHEL 6 and Suse 11 will support Scheduling domains. You need to wait some time or get patches from SGI or kernel.org.
HTH
__________________
Vivek Gite Linux Evangelist |
|
||||
|
I just did a little more research. The default is to run a process on all CPUs, giving a mask of
Code:
0xf for all 4 CPUs
0xff for all 8 CPUs
Code:
schedtool -a 0xff <PID> schedtool -a 0xff -e /path/to/app arg1 arg2 argN HTH
__________________
Vivek Gite Linux Evangelist |
![]() |
| Tags |
| linux cpu scheduling , rhel , rhel taskset , schedtool , taskset |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to control bandwidth in Fedora? | nishithv | Networking, Firewalls and Security | 0 | 11-24-2008 04:21 PM |
| Killing of a process and send a mail if the process doesnot come up within 2 minutes | Prince89 | Shell scripting | 1 | 02-11-2008 01:39 PM |
| Bandwidth Control software | zafar466 | Linux software | 1 | 06-21-2007 01:42 PM |
| script who will control user processess | darknet | Shell scripting | 2 | 01-02-2007 11:40 PM |
| Control Panel In Linux | vin6384 | Linux software | 2 | 02-10-2006 04:22 AM |