LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 02-27-2012, 04:43 AM   #1
jjthomas
Member
 
Registered: Jan 2004
Location: Tacoma, WA
Distribution: Slackware 14
Posts: 242
Blog Entries: 2

Rep: Reputation: 28
Question Are there any risks to running a real time kernel?


In the thread "Sound inspired distro?" here Jim makes reference to http://slackermedia.info/ where I found a way to turn Slackware into a MultiMedia workstation. Something I have been wanting to do for quite awhile. One of the suggestions in the documentation is that one should run a real time kernel. I currently have Slackware64 13.37 running with 4G of RAM. It runs a couple of Vboxes, http with a blogging program, DNS, Nut, NTP and is a proxy, media and file server. Both hard drives are encrypted though LUKES with LVM. It is used at home.

My question is what happens if I install a Real Time Kernel? What will be effected and how bad?

Or would I be better not putting a Real Time Kernel on a Server?

-JJ
 
Old 02-27-2012, 06:07 AM   #2
Mark Pettit
Member
 
Registered: Dec 2008
Location: Cape Town, South Africa
Distribution: Slackware 14.1 64 Multi-Lib
Posts: 425

Rep: Reputation: 123Reputation: 123
For Joe Average, the only perceived benefit of a real-time kernel would be with audio. But then you'd have to be a really really fussy audiophile. While it's true that the eye can be easily fooled, the ear is a different matter. We can pickup the slightest aberration in the stream and it sounds "funny", or maybe "not-so-funny" . So we do want the stream to be fluent. But all that means is that whatever is generating the stream (eg mp3 player) is able to fill up the buffer to your sound card, and make sure it never gets empty. And on any PC made in the last 5 (or even 10) years that's easily possible.

I often listen to mp3's while I work - and sometimes I'll hammer my box with a big kernel compile, or a dvdrip - and the playback is invariable fine - especially under Slackware where there's no other nonsense going on under the hood.

Recording music from live microphone feeds : well here it may (!) be useful to have a real-time kernel. Certainly if you have a whole bunch of microphones it would be a requirement.

And do note that real-time does NOT equate to better performance. In fact the opposite is more likely true. Realt-time just means that a small number of critical processes get better cpu scheduling than others. The "others" may well suffer.

Summary : don't bother unless you're recording live sound.
 
Old 02-27-2012, 08:31 AM   #3
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
I agree with Mark Pettit. You need to balance latency and responsiveness. You should only use a real time kernel if you are recording sound, and it may need to be a dedicated machine. If it is just a multimedia workstation, you don't need low latency. A server might need low latency, but only a major server serving to many clients. I would use voluntary kernel preemption or Preemptible kernel and 1000 Hz for most applications. For major servers you would use no preemption and less Hz.
 
Old 02-28-2012, 11:39 AM   #4
nass
Member
 
Registered: Apr 2006
Location: Athens, Greece
Distribution: slack(64|32)_v(13.37|14.0), debian6, ubuntu
Posts: 630

Rep: Reputation: 36
Quote:
I would use voluntary kernel preemption or Preemptible kernel and 1000 Hz for most applications. For major servers you would use no preemption and less Hz.
I am actually interest in running an audio workstation, for recording,fx and general jack server. So i am interested in the real-time kernel. How should I go about it? the 'voluntary kernel preemption ' option is enough? what's the 1000hz you are talking about? where do I get to choose that option (in the kernel config) ?

Thank you
 
Old 02-28-2012, 12:14 PM   #5
Phorize
Member
 
Registered: Sep 2005
Location: UK
Distribution: Slackware
Posts: 217

Rep: Reputation: 23
Quote:
Originally Posted by nass View Post
I am actually interest in running an audio workstation, for recording,fx and general jack server. So i am interested in the real-time kernel. How should I go about it? the 'voluntary kernel preemption ' option is enough? what's the 1000hz you are talking about? where do I get to choose that option (in the kernel config) ?

Thank you
You might want to drop by the #opensourcemusicians channel on freenode. There are alot of people there who run gnu/linux for pro audio work and should be able to give you a steer. They ware very helpful when I was scoping our recording hardware.
 
Old 02-28-2012, 12:32 PM   #6
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Quote:
Originally Posted by nass View Post
I am actually interest in running an audio workstation, for recording,fx and general jack server. So i am interested in the real-time kernel. How should I go about it? the 'voluntary kernel preemption ' option is enough? what's the 1000hz you are talking about? where do I get to choose that option (in the kernel config) ?

Thank you
In that case you would want as low-latency as possible = as real time as possible.

I would enable:
Processor type and features ->
Preemption model -> Preemptible kernel
Timer frequency -> 300Hz (video and multimedia) or 1000Hz (high responsiveness, I chose this for desktops)
High Resolution Timer

Also see and search:
http://www.alsa-project.org/main/ind..._latency_howto
http://www.linuxjournal.com/video/hy...al-time-kernel
http://apps.linuxaudio.org/wiki/real_time_info

P.S.
If you were configuring a server (not multimedia) you would select No preemption and less than 300 Hz.

Last edited by H_TeXMeX_H; 02-28-2012 at 12:35 PM.
 
1 members found this post helpful.
Old 02-28-2012, 05:22 PM   #7
Martinus2u
Member
 
Registered: Apr 2010
Distribution: Slackware
Posts: 345

Rep: Reputation: 56
Quote:
Originally Posted by nass View Post
I am actually interest in running an audio workstation, for recording,fx and general jack server. So i am interested in the real-time kernel. How should I go about it? the 'voluntary kernel preemption ' option is enough? what's the 1000hz you are talking about? where do I get to choose that option (in the kernel config) ?

Thank you
if you want lower latencies and better system responsiveness, ie. better sound and desktop experience you should look at the CK patch. you get additional scheduling classes for (semi) real time and idle scheduling. note it is YOU (the user/admin) who decides which application runs in which scheduling class at what priority. refer to the manual page of schedtool for more detail. this is infinitely superior to group schedulers and other automagic scheduling policies as your sound problems attest.

As for kernel config, you'd want "pre-emptible kernel" and by all means 1000 Hz.

http://ck-hack.blogspot.com/

a "real" real time kernel is yet a different beast and i am not sure it's what you need. but hey, why don't you try all options and write about your findings.
 
Old 02-28-2012, 07:33 PM   #8
jefro
Guru
 
Registered: Mar 2008
Posts: 11,340

Rep: Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386
http://www.ibm.com/developerworks/li...al-time-linux/ has some info on the 2.6 kernel real time that may be of use.

I can't say why real time hasn't become mainstream either. QNX had it for decades.


RH likes it. http://www.serverwatch.com/server-ne...ime-linux.html

Suse likes it. http://www.suse.com/products/realtime/

Common problems are drivers and some odd programs not working I'd think.

Last edited by jefro; 02-28-2012 at 07:42 PM.
 
Old 02-29-2012, 01:53 AM   #9
Mark Pettit
Member
 
Registered: Dec 2008
Location: Cape Town, South Africa
Distribution: Slackware 14.1 64 Multi-Lib
Posts: 425

Rep: Reputation: 123Reputation: 123
Hmmm - I worked on QNX for a few years. Very nice, but no virtual memory. I think that's why it was able to be real-time. It didn't have to worry about swapping a program in from disk. And it also was only on Intel architecture - whereas Linux is on multiple. I guess getting real-time behavior would also depend to some extent on the underlying CPU. It would be nice to have a really simple standard way of getting real-time behavior for at least programs like jackd.
 
  


Reply

Tags
multimedia, slackware


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Procedure and/or risks of running VirtualBox w/ a real HDD? MrCode Linux - General 3 10-04-2009 03:28 AM
real time kernel not real time, still xruns in Jackd browny_amiga Linux - General 0 09-20-2009 02:47 PM
Real running time of process soosho Programming 17 07-05-2008 01:16 PM
LXer: Real-time garbage collection with Real-time Java LXer Syndicated Linux News 0 05-05-2007 12:16 PM
LXer: Real-time Linux gains real-time JVM LXer Syndicated Linux News 0 10-12-2006 10:54 AM


All times are GMT -5. The time now is 09:09 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration