Aug 302016

A recent conversation I had about real time and embedded systems reminded me of a problem we encountered at my company not too long ago. Namely, cpu throttling and kernel page caching having negative side effects.

With cpu throttling, a daemon called cpuspeed will try to optimize performance and on real time applications this might actually be an inhibitor. Depending on your flavour of Linux, this daemon may or may not be installed and the location of the configuration file might change. For example, on minimal installations of Redhat the daemon is not installed. On desktop installations it is and it’s not configured for optimal performance. On Redhat you can try:

If it’s there, you can either remove it or change it’s governor to performance in /etc/sysctl.conf from, for example “ondemand” to “performance”.

Kernel page caching essentially tries to cache anything that’s read from or written to disk in RAM. If you have an application that needs an abundant amount of memory but the kernel has tied most of it up in caching, it might take too long for the kernel to relinquish that memory. In more recent versions of the Linux kernel, there is a setting that only allows the kernel a certain amount of memory to cache from. For example, to ensure the kernel leaves at least 10gb of memory available. You can can edit/etc/sysctl.conf with the following setting.



 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">