Skip to contentSkip to conversation

CPUFREQ Governer and system usage

DISCUSSION [email protected] 2 participants 2 messages May 1, 2007 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hello,

I was carrying out some tests on the ondemand governor in relation to latency benchmarks using LMBench.

The current governors seem to only check the USR space for CPU usage in determining if the system clock rate should be increased. This can be replicated by using lmbench and the bw_pipe test. Bw_pipe will flood a pipe to get MAX bandwidth.

While this might not be a problem in the real world, it may cause some issues with processes that require a lot of SYS space without a lot of userspace interaction.

Here were the results(which are directly proportional to the CPUSPEED as shown through the current_speed)

WITH MAXPERFORMANCE
--------------------------
$VAR1 = 'bw_pipe';
$VAR2 = '1788.75';
$VAR3 = 'bw_mem';

$VAR4 = {
          'fcp' => '2609.97',
          'cp' => '3834.97',
          'frd' => '5351.96',
          'rdwr' => '5781.82',
          'fwr' => '4949.31',
          'wr' => '7846.35',
          'bzero' => '4885.64',
          'rd' => '7697.91',
          'bcopy' => '2642.06'
        };
$VAR5 = 'lat_proc';
$VAR6 = {
          'fork' => '203.1852',
          'exec' => '217.9231'
        };

$VAR7 = 'lat_pipe';
$VAR8 = '10.7427';

------------------------------------------------------------
WITH ONDEMAND
------------------------------------------------------------

$VAR1 = 'bw_pipe';
$VAR2 = '1251.39';
$VAR3 = 'bw_mem';

$VAR4 = {
          'fcp' => '2621.93',
          'cp' => '3823.16',
          'frd' => '5352.27',
          'rdwr' => '5730.40',
          'fwr' => '4895.74',
          'wr' => '7826.72',
          'bzero' => '4886.47',
          'rd' => '7679.71',
          'bcopy' => '2641.58'
        };
$VAR5 = 'lat_proc';
$VAR6 = {
          'fork' => '211.2593',
          'exec' => '216.2222'
        };

$VAR7 = 'lat_pipe';
$VAR8 = '9.1837';

Chris
Visit our website at http://www.ubs.com

This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.

E-mails are not encrypted and cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments.

#2 lore raw
Quoted 16 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of [email protected]
Sent: Tuesday, May 01, 2007 9:21 AM
To: [email protected]
Subject: CPUFREQ Governer and system usage

Hello,

I was carrying out some tests on the ondemand governor in relation to latency benchmarks using LMBench.

Quoted 9 lines

The current governors seem to only check the USR space for CPU usage in determining if the system clock rate should be increased. This can be replicated by using lmbench and the bw_pipe test. Bw_pipe will flood a pipe to get MAX bandwidth.

While this might not be a problem in the real world, it may cause some issues with processes that require a lot of SYS space without a lot of userspace interaction.

What is the kernel version that you are using?
With current ondemand (2.6.21) I see idle time adds in idle and iowait and all rest of CPU times
(user+sys+nice) will be counted as busy time.

Quoted 51 lines

Here were the results(which are directly proportional to the CPUSPEED as
shown through the current_speed)

WITH MAXPERFORMANCE
--------------------------
$VAR1 = 'bw_pipe';
$VAR2 = '1788.75';
$VAR3 = 'bw_mem';

$VAR4 = {
         'fcp' => '2609.97',
         'cp' => '3834.97',
         'frd' => '5351.96',
         'rdwr' => '5781.82',
         'fwr' => '4949.31',
         'wr' => '7846.35',
         'bzero' => '4885.64',
         'rd' => '7697.91',
         'bcopy' => '2642.06'
       };
$VAR5 = 'lat_proc';
$VAR6 = {
         'fork' => '203.1852',
         'exec' => '217.9231'
       };

$VAR7 = 'lat_pipe';
$VAR8 = '10.7427';

------------------------------------------------------------
WITH ONDEMAND
------------------------------------------------------------

$VAR1 = 'bw_pipe';
$VAR2 = '1251.39';
$VAR3 = 'bw_mem';

$VAR4 = {
         'fcp' => '2621.93',
         'cp' => '3823.16',
         'frd' => '5352.27',
         'rdwr' => '5730.40',
         'fwr' => '4895.74',
         'wr' => '7826.72',
         'bzero' => '4886.47',
         'rd' => '7679.71',
         'bcopy' => '2641.58'
       };
$VAR5 = 'lat_proc';
$VAR6 = {
         'fork' => '211.2593',
         'exec' => '216.2222'
       };
Quoted 3 lines

$VAR7 = 'lat_pipe';
$VAR8 = '9.1837';

What does CPU utilication look like when running pipe. 1 thread or two thread?

I guess the problem is due to the load running on two logical CPUs with each logical CPU being idle for 50% of the time. And hence end up running slower.

Thanks,
Venki