13

I am trying to improve performance on my server. I have a few processes that need low jitter (less than 10ms variance).

I have a load average of 4 maximum on an i7-920 (4 physical cores, 8 with HT). There are about 10 processes ranging from 40% to 90% of a core user mode. System usage is 3% total. Total CPU usage is 80% max.

Will setting the kernel from 100hz to 1000hz improve the jitter if tickless and high resolution timers are already set?

This page seems to indicate it still does something. https://lkml.org/lkml/2009/4/28/401

How about changing from voluntary (PREEMPT_VOLUNTARY) to preemptible (PREEMPT)?

Bob
  • 185
  • 2
  • 2
  • 8
  • OS distribution details/version? – ewwhite Apr 09 '12 at 21:44
  • Ubuntu 11.10 64bit server Linux 3.3 kernel. – Bob Apr 09 '12 at 21:47
  • You have plenty of user mode load; system time is comparatively negligible. I wouldn't suggest to dance around kernel tunables there. Or obtaining realtime-like scheduling is what you hope to achive? – yrk Apr 10 '12 at 08:40
  • So are you saying if the system usage is low, none of this makes a difference on responsiveness? – Bob Apr 10 '12 at 20:21

3 Answers3

4

If low jitter is important to you, yes, you may want to use both 1000hz and PREEMPT.

If those processes are really time-sensitive, thought, you will probably need some more realtime-oriented patches/kernels, or at least some process-level scheduling parameters, like rtprio.

Typical uses are audio servers, see for example advice from jackaudio

koollman
  • 131
  • 2
4

I am trying to improve performance on my server. I have a few processes that need low jitter (less than 10ms variance).

Any real time won't improve performance, it'd make the whole system running smoother but a bit slower, in fact. In other words, it's throughput vs. latency. If it's really what you need, then several options:

  • Use 300 Hz or even 1KHz, PREEMPT, and don't use tickless
  • Use nice, schedtool to assign proper priorities/classes according to your needs
  • Give a try to RT or BFS
poige
  • 9,171
  • 2
  • 24
  • 50
  • What's wrong with using tickless? – Bob Apr 11 '12 at 22:19
  • 1
    @Bob, It's good for powersaving, but in case you care about latency, it's recommended to be off, for e. g. http://ck.kolivas.org/patches/bfs/bfs-configuration-faq.txt – poige Apr 12 '12 at 01:16
3

1) Don't use tickless, it's still highly experimental and not recommended to anyone but developers working on it, it is also meant to help to powersave.

2) Fully preemtible system is supposed to increase responsiveness of desktor, while voluntary preemptible is for general use (mix of responsiveness and troughput). If your server got SMP (multiple cores), you should probably go for non-preemptible, since most work will be executed on their cores and without interrupts, which generally 1) take time 2) trash cache

3) 1000Hz is desktop value which introduces overhead, but allows to for example play games and stuff. 300 hz is value that is recommended for video (so stuff can reschedule and you still won't miss frames), while 100Hz provides best troughput (though not geared for lowlatency network stuff).

If you want to go as stable as it gets (without using RT patches), you should go: periodic ticks (stability) non-preemptible (stability) timer-frequency (up to you, 1000 for best responsiveness and low latiencies, 100 for best troughput but 10ms resolution on timer, e.g. stuff will run at least 10ms)

Hope this somewhat helps.