All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] Why get low latency while running stress command?
@ 2018-06-13  8:51 Kiwamu Okabe
  2018-06-13 10:47 ` Lange Norbert
  0 siblings, 1 reply; 3+ messages in thread
From: Kiwamu Okabe @ 2018-06-13  8:51 UTC (permalink / raw)
  To: xenomai

Dear all,

I build Xenomai kernel on Debian GNU/Linux Stretch (amd64) with attached config.
It runs on Intel(R) Celeron(R) CPU J3355 @ 2.00GHz.

But the latency is not good:

```
$ sudo /usr/lib/xenomai/testsuite/latency
== Sampling period: 100 us
== Test mode: periodic user-mode task
== All results in microseconds
warming up...
RTT|  00:00:01  (periodic user-mode task, 100 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD|      0.912|      6.856|    414.649|     104|     0|      0.912|    414.649
RTD|      6.065|     10.102|    120.338|     109|     0|      0.912|    414.649
RTD|      5.473|     10.465|    124.834|     116|     0|      0.912|    414.649
RTD|      6.224|     10.215|    137.833|     125|     0|      0.912|    414.649
RTD|      6.058|     10.392|    126.856|     131|     0|      0.912|    414.649
RTD|      1.126|      8.278|    239.556|     145|     0|      0.912|    414.649
RTD|      4.789|      9.966|    122.924|     149|     0|      0.912|    414.649
RTD|      5.228|     10.289|    126.303|     157|     0|      0.912|    414.649
RTD|      5.470|     10.273|    126.994|     165|     0|      0.912|    414.649
RTD|      5.624|     10.391|    127.353|     171|     0|      0.912|    414.649
RTD|      1.128|     10.766|    429.696|     245|     0|      0.912|    429.696
RTD|      5.568|     10.557|    123.488|     249|     0|      0.912|    429.696
RTD|      2.113|      8.890|    253.340|     282|     0|      0.912|    429.696
RTD|      6.056|     10.301|    126.958|     285|     0|      0.912|    429.696
RTD|      6.230|     10.411|    127.802|     293|     0|      0.912|    429.696
RTD|      5.787|     10.447|    124.719|     299|     0|      0.912|    429.696
RTD|      6.143|     10.307|    126.947|     301|     0|      0.912|    429.696
RTD|      6.250|     10.391|    124.367|     303|     0|      0.912|    429.696
RTD|      5.861|     10.367|    126.357|     309|     0|      0.912|    429.696
```

Strangely the result gets better while running stress command:

```
$ stress -v -c 8 -i 10 -d 8 &
$ sudo /usr/lib/xenomai/testsuite/latency
== Sampling period: 100 us
== Test mode: periodic user-mode task
== All results in microseconds
warming up...
RTT|  00:00:01  (periodic user-mode task, 100 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD|      2.744|      4.108|      8.634|       0|     0|      2.744|      8.634
RTD|      2.872|      4.225|      8.670|       0|     0|      2.744|      8.670
RTD|      3.147|      4.250|      8.538|       0|     0|      2.744|      8.670
RTD|      2.767|      4.271|     10.512|       0|     0|      2.744|     10.512
RTD|      2.867|      4.239|      8.502|       0|     0|      2.744|     10.512
RTD|      2.826|      4.262|      9.819|       0|     0|      2.744|     10.512
RTD|      2.930|      4.222|      9.128|       0|     0|      2.744|     10.512
RTD|      2.840|      4.159|      8.984|       0|     0|      2.744|     10.512
RTD|      2.841|      4.112|      8.608|       0|     0|      2.744|     10.512
RTD|      2.828|      4.112|      8.557|       0|     0|      2.744|     10.512
RTD|      2.875|      4.124|      8.662|       0|     0|      2.744|     10.512
RTD|      2.795|      4.109|      9.112|       0|     0|      2.744|     10.512
RTD|      2.939|      4.103|      8.677|       0|     0|      2.744|     10.512
RTD|      2.867|      4.123|      8.686|       0|     0|      2.744|     10.512
RTD|      2.808|      4.106|      8.728|       0|     0|      2.744|     10.512
RTD|      2.940|      4.113|      8.488|       0|     0|      2.744|     10.512
RTD|      2.873|      4.132|      8.703|       0|     0|      2.744|     10.512
RTD|      2.994|      4.107|      8.479|       0|     0|      2.744|     10.512
RTD|      2.983|      4.147|      8.642|       0|     0|      2.744|     10.512
```

What's wrong? Should I set some kernel settings?

Best regards,
-- 
Kiwamu Okabe at METASEPI DESIGN
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config-4.9.90-xenomai
Type: application/octet-stream
Size: 187638 bytes
Desc: not available
URL: <http://xenomai.org/pipermail/xenomai/attachments/20180613/ed742ae0/attachment.obj>

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

* Re: [Xenomai] Why get low latency while running stress command?
  2018-06-13  8:51 [Xenomai] Why get low latency while running stress command? Kiwamu Okabe
@ 2018-06-13 10:47 ` Lange Norbert
  2018-06-14  5:42   ` Kiwamu Okabe
  0 siblings, 1 reply; 3+ messages in thread
From: Lange Norbert @ 2018-06-13 10:47 UTC (permalink / raw)
  To: Kiwamu Okabe, xenomai

Hi,

I guess what happens is, that the CPU will be put to sleep and/or lower frequency and voltage between calls,
These transitions are rather slow and will then have to happen on wake-up
Disable any kind of powersaving features in Linux and possibly BIOS (C-States).

Kind regards,
Norbert

-----Original Message-----
From: Xenomai <xenomai-bounces@xenomai.org> On Behalf Of Kiwamu Okabe
Sent: Mittwoch, 13. Juni 2018 10:51
To: xenomai@xenomai.org
Subject: [Xenomai] Why get low latency while running stress command?

E-MAIL FROM A NON-ANDRITZ SOURCE: AS A SECURITY MEASURE, PLEASE EXERCISE CAUTION WITH E-MAIL CONTENT AND ANY LINKS OR ATTACHMENTS.


Dear all,

I build Xenomai kernel on Debian GNU/Linux Stretch (amd64) with attached config.
It runs on Intel(R) Celeron(R) CPU J3355 @ 2.00GHz.

But the latency is not good:

```
$ sudo /usr/lib/xenomai/testsuite/latency
== Sampling period: 100 us
== Test mode: periodic user-mode task
== All results in microseconds
warming up...
RTT|  00:00:01  (periodic user-mode task, 100 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD|      0.912|      6.856|    414.649|     104|     0|      0.912|    414.649
RTD|      6.065|     10.102|    120.338|     109|     0|      0.912|    414.649
RTD|      5.473|     10.465|    124.834|     116|     0|      0.912|    414.649
RTD|      6.224|     10.215|    137.833|     125|     0|      0.912|    414.649
RTD|      6.058|     10.392|    126.856|     131|     0|      0.912|    414.649
RTD|      1.126|      8.278|    239.556|     145|     0|      0.912|    414.649
RTD|      4.789|      9.966|    122.924|     149|     0|      0.912|    414.649
RTD|      5.228|     10.289|    126.303|     157|     0|      0.912|    414.649
RTD|      5.470|     10.273|    126.994|     165|     0|      0.912|    414.649
RTD|      5.624|     10.391|    127.353|     171|     0|      0.912|    414.649
RTD|      1.128|     10.766|    429.696|     245|     0|      0.912|    429.696
RTD|      5.568|     10.557|    123.488|     249|     0|      0.912|    429.696
RTD|      2.113|      8.890|    253.340|     282|     0|      0.912|    429.696
RTD|      6.056|     10.301|    126.958|     285|     0|      0.912|    429.696
RTD|      6.230|     10.411|    127.802|     293|     0|      0.912|    429.696
RTD|      5.787|     10.447|    124.719|     299|     0|      0.912|    429.696
RTD|      6.143|     10.307|    126.947|     301|     0|      0.912|    429.696
RTD|      6.250|     10.391|    124.367|     303|     0|      0.912|    429.696
RTD|      5.861|     10.367|    126.357|     309|     0|      0.912|    429.696
```

Strangely the result gets better while running stress command:

```
$ stress -v -c 8 -i 10 -d 8 &
$ sudo /usr/lib/xenomai/testsuite/latency
== Sampling period: 100 us
== Test mode: periodic user-mode task
== All results in microseconds
warming up...
RTT|  00:00:01  (periodic user-mode task, 100 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD|      2.744|      4.108|      8.634|       0|     0|      2.744|      8.634
RTD|      2.872|      4.225|      8.670|       0|     0|      2.744|      8.670
RTD|      3.147|      4.250|      8.538|       0|     0|      2.744|      8.670
RTD|      2.767|      4.271|     10.512|       0|     0|      2.744|     10.512
RTD|      2.867|      4.239|      8.502|       0|     0|      2.744|     10.512
RTD|      2.826|      4.262|      9.819|       0|     0|      2.744|     10.512
RTD|      2.930|      4.222|      9.128|       0|     0|      2.744|     10.512
RTD|      2.840|      4.159|      8.984|       0|     0|      2.744|     10.512
RTD|      2.841|      4.112|      8.608|       0|     0|      2.744|     10.512
RTD|      2.828|      4.112|      8.557|       0|     0|      2.744|     10.512
RTD|      2.875|      4.124|      8.662|       0|     0|      2.744|     10.512
RTD|      2.795|      4.109|      9.112|       0|     0|      2.744|     10.512
RTD|      2.939|      4.103|      8.677|       0|     0|      2.744|     10.512
RTD|      2.867|      4.123|      8.686|       0|     0|      2.744|     10.512
RTD|      2.808|      4.106|      8.728|       0|     0|      2.744|     10.512
RTD|      2.940|      4.113|      8.488|       0|     0|      2.744|     10.512
RTD|      2.873|      4.132|      8.703|       0|     0|      2.744|     10.512
RTD|      2.994|      4.107|      8.479|       0|     0|      2.744|     10.512
RTD|      2.983|      4.147|      8.642|       0|     0|      2.744|     10.512
```

What's wrong? Should I set some kernel settings?

Best regards,
--
Kiwamu Okabe at METASEPI DESIGN
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config-4.9.90-xenomai
Type: application/octet-stream
Size: 187638 bytes
Desc: not available
URL: <http://xenomai.org/pipermail/xenomai/attachments/20180613/ed742ae0/attachment.obj>
_______________________________________________
Xenomai mailing list
Xenomai@xenomai.org
https://xenomai.org/mailman/listinfo/xenomai
________________________________

This message and any attachments are solely for the use of the intended recipients. They may contain privileged and/or confidential information or other information protected from disclosure. If you are not an intended recipient, you are hereby notified that you received this email in error and that any review, dissemination, distribution or copying of this email and any attachment is strictly prohibited. If you have received this email in error, please contact the sender and delete the message and any attachment from your system.

ANDRITZ HYDRO GmbH


Rechtsform/ Legal form: Gesellschaft mit beschränkter Haftung / Corporation

Firmensitz/ Registered seat: Wien

Firmenbuchgericht/ Court of registry: Handelsgericht Wien

Firmenbuchnummer/ Company registration: FN 61833 g

DVR: 0605077

UID-Nr.: ATU14756806


Thank You
________________________________


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

* Re: [Xenomai] Why get low latency while running stress command?
  2018-06-13 10:47 ` Lange Norbert
@ 2018-06-14  5:42   ` Kiwamu Okabe
  0 siblings, 0 replies; 3+ messages in thread
From: Kiwamu Okabe @ 2018-06-14  5:42 UTC (permalink / raw)
  To: xenomai

Dear Lange,

On Wed, Jun 13, 2018 at 7:47 PM, Lange Norbert
<norbert.lange@andritz.com> wrote:
> I guess what happens is, that the CPU will be put to sleep and/or lower frequency and voltage between calls,
> These transitions are rather slow and will then have to happen on wake-up
> Disable any kind of powersaving features in Linux and possibly BIOS (C-States).

Thanks for your reply.

After read following:

* https://www.thomas-krenn.com/en/wiki/Processor_P-states_and_C-states
* https://gist.github.com/wmealing/2dd2b543c4d3cff6cab7
* https://wiki.archlinux.org/index.php/CPU_frequency_scaling#Scaling_governors
* https://wiki.debian.org/HowTo/CpuFrequencyScaling

I set up some parameters:

```
$ sudo vi /etc/default/grub
--snip--
GRUB_CMDLINE_LINUX_DEFAULT="quiet processor.max_cstate=1
intel_idle.max_cstate=0"
--snip--
$ sudo update-grub
$ sudo apt install cpufrequtils
$ sudo vi /etc/default/cpufrequtils
GOVERNOR="performance"
$ sudo reboot
```

Then I have better latency:

```
$ sudo /usr/lib/xenomai/testsuite/latency
== Sampling period: 100 us
== Test mode: periodic user-mode task
== All results in microseconds
warming up...
RTT|  00:00:01  (periodic user-mode task, 100 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD|      0.417|      2.658|      4.211|       0|     0|      0.417|      4.211
RTD|      0.843|      2.718|      4.780|       0|     0|      0.417|      4.780
RTD|      0.726|      2.689|      4.456|       0|     0|      0.417|      4.780
RTD|      0.923|      2.731|      5.068|       0|     0|      0.417|      5.068
RTD|      0.908|      2.676|      4.906|       0|     0|      0.417|      5.068
RTD|      0.402|      2.686|      4.784|       0|     0|      0.402|      5.068
RTD|      0.907|      2.617|      4.501|       0|     0|      0.402|      5.068
RTD|      0.928|      2.615|      5.730|       0|     0|      0.402|      5.730
RTD|      0.538|      2.630|      4.245|       0|     0|      0.402|      5.730
RTD|      0.399|      2.638|      4.607|       0|     0|      0.399|      5.730
RTD|      0.414|      2.613|      4.114|       0|     0|      0.399|      5.730
RTD|      0.502|      2.620|      4.486|       0|     0|      0.399|      5.730
RTD|      0.694|      2.625|      4.292|       0|     0|      0.399|      5.730
RTD|      0.618|      2.641|      4.847|       0|     0|      0.399|      5.730
```

Thanks a lot!
-- 
Kiwamu Okabe at METASEPI DESIGN


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

end of thread, other threads:[~2018-06-14  5:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-13  8:51 [Xenomai] Why get low latency while running stress command? Kiwamu Okabe
2018-06-13 10:47 ` Lange Norbert
2018-06-14  5:42   ` Kiwamu Okabe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.