Operating System - HP-UX
1748158 Members
4199 Online
108758 Solutions
New Discussion юеВ

Re: Cpu Scheduling problem

 
SOLVED
Go to solution
gigiz
Valued Contributor

Cpu Scheduling problem

Hi guys,
i have a system with 12 cpu.
When i start my application it assign a cpu0.
The problem is that if i start another istance of my application, the sistem assign the cpu0 although it have idle 0% with other cpu with 100% idle.
Is it correct ?
Can i change it ?
Is it a kernel parameter or patch for Cpu scheduling ?
many point at all good response
6 REPLIES 6
Steven E. Protter
Exalted Contributor
Solution

Re: Cpu Scheduling problem

Shalom,

This depends how the application is written.

If its single threaded and uses one CPU at a time there is nothing you can do save re-write the application.

This is not a problem with the OS as much as probably a problem with the application code.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
gigiz
Valued Contributor

Re: Cpu Scheduling problem

The application is multi-thread .
I launch several process .
This process go in processor 0 and then fork a process that go in other processor.
Dennis Handly
Acclaimed Contributor

Re: Cpu Scheduling problem

>The application is multi-thread. I launch several process.

Are you talking about threads?

>then fork a process that go in other processor.

Are you talking about processes now, or pthread_create

>Can I change it?

Why do you think there is a problem? How are you determining which CPU? You should be using glance not top.
gigiz
Valued Contributor

Re: Cpu Scheduling problem

Excuse my little english,
I have this scenario :
Load averages: 0.18, 0.18, 0.18
211 processes: 180 sleeping, 30 running, 1 zombie
Cpu states:
CPU LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS
0 2.04 0.0% 98.2% 1.8% 0.0% 0.0% 0.0% 0.0% 0.0%
5 0.08 0.0% 8.3% 0.0% 91.7% 0.0% 0.0% 0.0% 0.0%
6 0.01 0.0% 0.0% 0.0% 100.0% 0.0% 0.0% 0.0% 0.0%
7 0.03 0.0% 0.0% 0.0% 100.0% 0.0% 0.0% 0.0% 0.0%
8 0.04 0.0% 0.0% 0.0% 100.0% 0.0% 0.0% 0.0% 0.0%
9 0.06 0.0% 10.1% 0.6% 89.3% 0.0% 0.0% 0.0% 0.0%
10 0.04 0.0% 9.9% 0.8% 89.3% 0.0% 0.0% 0.0% 0.0%
11 0.04 0.0% 8.3% 0.4% 91.3% 0.0% 0.0% 0.0% 0.0%
12 0.05 0.0% 1.4% 0.2% 98.4% 0.0% 0.0% 0.0% 0.0%
13 0.05 0.0% 1.4% 0.0% 98.6% 0.0% 0.0% 0.0% 0.0%
14 0.08 0.0% 2.4% 0.2% 97.4% 0.0% 0.0% 0.0% 0.0%
15 0.07 0.0% 11.1% 0.4% 88.5% 0.0% 0.0% 0.0% 0.0%
16 0.08 0.0% 2.4% 0.0% 97.6% 0.0% 0.0% 0.0% 0.0%
17 0.07 0.0% 10.9% 0.4% 88.7% 0.0% 0.0% 0.0% 0.0%
18 0.03 0.0% 0.0% 0.2% 99.8% 0.0% 0.0% 0.0% 0.0%
19 0.06 0.0% 0.0% 0.6% 99.4% 0.0% 0.0% 0.0% 0.0%
--- ---- ----- ----- ----- ----- ----- ----- ----- -----
avg 0.18 0.0% 10.3% 0.4% 89.3% 0.0% 0.0% 0.0% 0.0%

Memory: 2092048K (1296640K) real, 3584468K (2529252K) virtual, 15638644K free Page# 1/10

CPU TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND
0 ? 1934 qoe 241 24 124M 3304K run 181:34 50.43 50.34 qoloader
0 ? 28405 qoe 152 24 125M 3336K run 1279:49 49.72 49.63 qoloader
13 ? 1946 qoe 152 24 228M 17196K run 139:43 38.26 38.19 qoloader
15 ? 28429 qoe 152 24 228M 20656K run 948:05 35.69 35.63 qoloader
5 ? 1976 qoe 168 24 33136K 14900K sleep 16:32 4.55 4.54 qoloader
5 ? 28433 qoe 168 24 30448K 12180K sleep 115:16 4.39 4.39 qoloader

If i start another qoloader it start to CPU number 0 although cpu 0 was in 0% IDLE. Why?
Why this process not start in a cpu with 100%IDLE?
HELP ME
Dennis Handly
Acclaimed Contributor

Re: Cpu Scheduling problem

>If I start another qoloader it start to CPU number 0 although cpu 0 was in 0% IDLE. Why?
>Why this process not start in a CPU with 100% IDLE?

I would simply ignore what top(1) is telling you as inaccurate. If you can run glance, you can trust that.
(That's assuming that goloader isn't doing tricky stuff like processor sets or using PRM.)
gigiz
Valued Contributor

Re: Cpu Scheduling problem

ok