public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Measuring impact on interactive tasks
@ 2002-12-27  1:39 scott thomason
  2002-12-27  1:51 ` Andrew McGregor
  0 siblings, 1 reply; 2+ messages in thread
From: scott thomason @ 2002-12-27  1:39 UTC (permalink / raw)
  To: Linux Kernel Mailing List

It crossed my mind while load testing some scheduler tunable settings 
that completely subjective monitoring of X jerkiness perhaps wasn't 
the most scientific way of measuring the interactive impact of the 
tunables. I'm no Evil Scientist, but I whipped up a perl script that 
I think accomplishes something close to capturing those statistics. 
It captures 1000 samples of what should be a precise .2 second delay 
(on an idle system it is, with a tiny bit of noise). 

Here's the script, along with some output produced while the system 
was under considerable load (around 13). Would something like this be 
worth developing further to help rigorously measure the interactive 
impact of the tunables? Or is there a flaw in the approach? (Jokes 
about Perl are considered below the belt...)
---scott


#!/usr/bin/perl

use strict;
use warnings;

use Time::HiRes qw/sleep time/;

my %pause = ();

for (my $x = 0; $x < 1000; $x++) {
  my $start = time();
  sleep(.2);
  my $stop = time();
  my $elapsed = $stop - $start;

  $pause{sprintf('%01.3f', $elapsed)}++;
}

foreach (sort(keys(%pause))) {
  print "$_:  $pause{$_}\n";
}

exit 0;


Sample output

time ./int_resp_timer.pl 
0.192:  1
0.199:  1
0.200:  10
0.201:  201
0.202:  53
0.203:  25
0.204:  22
0.205:  21
0.206:  34
0.207:  29
0.208:  29
0.209:  100
0.210:  250
0.211:  120
0.212:  35
0.213:  16
0.214:  17
0.215:  14
0.216:  9
0.217:  1
0.218:  3
0.219:  3
0.220:  1
0.222:  1
0.233:  1
0.303:  1
0.304:  1
0.385:  1

real    3m28.568s
user    0m0.329s
sys     0m1.260s


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Measuring impact on interactive tasks
  2002-12-27  1:39 Measuring impact on interactive tasks scott thomason
@ 2002-12-27  1:51 ` Andrew McGregor
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew McGregor @ 2002-12-27  1:51 UTC (permalink / raw)
  To: scott, Linux Kernel Mailing List

That sounds pretty reasonable; it might be interesting if it also touched 
quite a bit of memory each iteration too.

Andrew

--On Thursday, December 26, 2002 19:39:09 -0600 scott thomason 
<scott@thomasons.org> wrote:

> It crossed my mind while load testing some scheduler tunable settings
> that completely subjective monitoring of X jerkiness perhaps wasn't
> the most scientific way of measuring the interactive impact of the
> tunables. I'm no Evil Scientist, but I whipped up a perl script that
> I think accomplishes something close to capturing those statistics.
> It captures 1000 samples of what should be a precise .2 second delay
> (on an idle system it is, with a tiny bit of noise).
>
> Here's the script, along with some output produced while the system
> was under considerable load (around 13). Would something like this be
> worth developing further to help rigorously measure the interactive
> impact of the tunables? Or is there a flaw in the approach? (Jokes
> about Perl are considered below the belt...)
> ---scott
>
>
># !/usr/bin/perl
>
> use strict;
> use warnings;
>
> use Time::HiRes qw/sleep time/;
>
> my %pause = ();
>
> for (my $x = 0; $x < 1000; $x++) {
>   my $start = time();
>   sleep(.2);
>   my $stop = time();
>   my $elapsed = $stop - $start;
>
>   $pause{sprintf('%01.3f', $elapsed)}++;
> }
>
> foreach (sort(keys(%pause))) {
>   print "$_:  $pause{$_}\n";
> }
>
> exit 0;
>
>
> Sample output
>
> time ./int_resp_timer.pl
> 0.192:  1
> 0.199:  1
> 0.200:  10
> 0.201:  201
> 0.202:  53
> 0.203:  25
> 0.204:  22
> 0.205:  21
> 0.206:  34
> 0.207:  29
> 0.208:  29
> 0.209:  100
> 0.210:  250
> 0.211:  120
> 0.212:  35
> 0.213:  16
> 0.214:  17
> 0.215:  14
> 0.216:  9
> 0.217:  1
> 0.218:  3
> 0.219:  3
> 0.220:  1
> 0.222:  1
> 0.233:  1
> 0.303:  1
> 0.304:  1
> 0.385:  1
>
> real    3m28.568s
> user    0m0.329s
> sys     0m1.260s
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>
>



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-12-27  1:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-27  1:39 Measuring impact on interactive tasks scott thomason
2002-12-27  1:51 ` Andrew McGregor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox