Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Real time kernel - useful for a desktop user?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
bitpicker
Apprentice
Apprentice


Joined: 28 Dec 2005
Posts: 163
Location: Germany

PostPosted: Mon Oct 16, 2006 7:51 am    Post subject: Real time kernel - useful for a desktop user? Reply with quote

I have just read that as of 2.6.18 the kernel will include real time support by default. I'd like to know whether this is something a normal desktop user should be looking forward to; does it have any impact on performance other than when using, for instance, MIDI software such as Rosegarden?

Robin
Back to top
View user's profile Send private message
yabbadabbadont
Advocate
Advocate


Joined: 14 Mar 2003
Posts: 4791
Location: 2 exits past crazy

PostPosted: Mon Oct 16, 2006 8:01 am    Post subject: Reply with quote

gentoo-sources already has patches for this. (I think that is what the PREEMPT stuff is for) It makes the desktop nice and snappy even when the system is under load (glibc, gcc, xorg upgrades come to mind :))
_________________
Bones McCracker wrote:
On the other hand, regex is popular with the ladies.
Back to top
View user's profile Send private message
bitpicker
Apprentice
Apprentice


Joined: 28 Dec 2005
Posts: 163
Location: Germany

PostPosted: Mon Oct 16, 2006 8:18 am    Post subject: Reply with quote

I'm not sure that's the same thing; there must be a reason why for instance the pro-audio overlay offers a specific real-time kernel. I have googled a bit on preemption and it doesn't quite seem to be the same thing. My kernel is set to 'preemptible kernel' for a low-latency desktop already, but when I start Rosegarden I get the following warning:

Code:

System timer resolution is too low
Rosegarden was unable to find a high-resolution timing source for MIDI performance.
This may mean you are using a Linux system with the kernel timer resolution set too low. Please contact your Linux distributor for more information.


Now MIDI is not important for me, I've just been dabbling around with sound applications under Linux, but this message implies to me that there must be more than just enabling PREEMPT to real time on Linux.

Robin
Back to top
View user's profile Send private message
yabbadabbadont
Advocate
Advocate


Joined: 14 Mar 2003
Posts: 4791
Location: 2 exits past crazy

PostPosted: Mon Oct 16, 2006 9:01 am    Post subject: Reply with quote

make menuconfig
"Processor type and features"->"Timer frequency"->1000HZ


Also, make sure that "dev.rtc.max-user-freq = 1024" is added to /etc/sysctl.conf
_________________
Bones McCracker wrote:
On the other hand, regex is popular with the ladies.
Back to top
View user's profile Send private message
fangorn
Veteran
Veteran


Joined: 31 Jul 2004
Posts: 1886

PostPosted: Mon Oct 16, 2006 9:17 am    Post subject: Reply with quote

realtime means you get a GUARANTEED reaction of the system within a given time frame. Preemption AFAIK is not quite such a strong promise.

The Downside is, that the task switching eats much of the cpu power in extreme situations.

For desktops this is not a preferred behaviour, as the user does not recognize, if the system reacts within .5 seconds or in less than .01 seconds. An audio application in recording mode or live filtering mode will surely recognize the difference.
_________________
Video Encoding scripts collection | Project page
Back to top
View user's profile Send private message
bitpicker
Apprentice
Apprentice


Joined: 28 Dec 2005
Posts: 163
Location: Germany

PostPosted: Mon Oct 16, 2006 4:14 pm    Post subject: Reply with quote

I am just in the process of compiling the real-time kernel from the pro-audio overlay to see whether there is a noticeable difference. It has an additional setting for real-time in the PREEMPT section, so it does go further than what is included in the standard Gentoo sources. I also found the timer entry, which was, in fact, disabled.

Robin
Back to top
View user's profile Send private message
chrbecke
Guru
Guru


Joined: 12 Jul 2004
Posts: 598
Location: Berlin - Germany

PostPosted: Mon Oct 16, 2006 4:50 pm    Post subject: Reply with quote

If you don't want to use an overlay-kernel, you might want to look at sys-apps/realtime-lsm. It's a kernel module that provides realtime capabilities e.g. to a specific group - I use it with sys-kernel/gentoo-sources to run jack in realtime mode.
Back to top
View user's profile Send private message
PaulSorensen
Tux's lil' helper
Tux's lil' helper


Joined: 15 Apr 2004
Posts: 80
Location: Chicago, USA

PostPosted: Mon Oct 16, 2006 5:41 pm    Post subject: Re: Real time kernel - useful for a desktop user? Reply with quote

bitpicker wrote:
I have just read that as of 2.6.18 the kernel will include real time support by default. I'd like to know whether this is something a normal desktop user should be looking forward to; does it have any impact on performance other than when using, for instance, MIDI software such as Rosegarden?

Robin


It depends on what you are doing - as you have mentioned it is useful if your desktop is interacting with hardware in a way that is timing sensitive (such as MIDI or other music hardware). Most of the time, for desktop users it's probably better to leave things as they are by default.
Back to top
View user's profile Send private message
bitpicker
Apprentice
Apprentice


Joined: 28 Dec 2005
Posts: 163
Location: Germany

PostPosted: Mon Oct 16, 2006 7:49 pm    Post subject: Reply with quote

chrbecke wrote:
If you don't want to use an overlay-kernel, you might want to look at sys-apps/realtime-lsm. It's a kernel module that provides realtime capabilities e.g. to a specific group - I use it with sys-kernel/gentoo-sources to run jack in realtime mode.


That sounds interesting. I have compiled and installed the overlay kernel now, and I suppose I have checked all the relevant options for real-time. The system is working ok, though I can't say I note any difference. Rosegarden still gives me the same message, but I didn't start Jack before, so it might have something to do with non-existent connections.

Robin
Back to top
View user's profile Send private message
bitpicker
Apprentice
Apprentice


Joined: 28 Dec 2005
Posts: 163
Location: Germany

PostPosted: Tue Oct 17, 2006 10:00 pm    Post subject: Reply with quote

There has been an interesting and annoying side effect to using the real time kernel, or at least that's the only reason I can trace it to: the computer ran all night using the real time kernel, downloading some torrents, and this morning I shut it down when I left the house. When I started it again this afternoon (using the normal kernel) I found that my system time, which is regulated by chrony, was off by almost one and a half hours; BIOS time was UTC, the time zone was correct, but somehow the drift values had been warped completely. I had to delete them and rebooted, and within a couple of hours the time was back on track.

Robin
Back to top
View user's profile Send private message
Bobnoxous
Apprentice
Apprentice


Joined: 03 May 2005
Posts: 240

PostPosted: Wed Oct 18, 2006 12:30 am    Post subject: Reply with quote

Quote:
realtime means you get a GUARANTEED reaction of the system within a given time frame. Preemption AFAIK is not quite such a strong promise.


The two are really different things. Preemption is the ability to interrupt a task to run a higher-priority task. This can be quite useful to meet a real-time deadline.

But in a PC desktop environment, what does real-time mean? What is the deadline requirement for a specific event? What tasks have higher priorities than others? I just don't think this conecpt is really applicable here, and agree it's probaby not even wanted on the desktop. It won't make your system faster overall; it would be slower overall while the kernel check to see if a task should be preempted. But for those higher priority tasks, whatever they are, they should run faster.

Where this is more applicable is on an embedded system, or some dedicated-use platform, where you really may have a real-time deadline. Then, it's acceptable to slow down the system overall so that this event happens in a predictable time.
_________________
"The problem with the world is that fools and fanatics are always so sure of themselves while wiser people are so full of doubt."
- Bertrand Russell
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum