View previous topic :: View next topic |
Author |
Message |
bitpicker Apprentice
Joined: 28 Dec 2005 Posts: 163 Location: Germany
|
Posted: Mon Oct 16, 2006 7:51 am Post subject: Real time kernel - useful for a desktop user? |
|
|
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 |
|
|
yabbadabbadont Advocate
Joined: 14 Mar 2003 Posts: 4791 Location: 2 exits past crazy
|
Posted: Mon Oct 16, 2006 8:01 am Post subject: |
|
|
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 |
|
|
bitpicker Apprentice
Joined: 28 Dec 2005 Posts: 163 Location: Germany
|
Posted: Mon Oct 16, 2006 8:18 am Post subject: |
|
|
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 |
|
|
yabbadabbadont Advocate
Joined: 14 Mar 2003 Posts: 4791 Location: 2 exits past crazy
|
Posted: Mon Oct 16, 2006 9:01 am Post subject: |
|
|
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 |
|
|
fangorn Veteran
Joined: 31 Jul 2004 Posts: 1886
|
Posted: Mon Oct 16, 2006 9:17 am Post subject: |
|
|
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 |
|
|
bitpicker Apprentice
Joined: 28 Dec 2005 Posts: 163 Location: Germany
|
Posted: Mon Oct 16, 2006 4:14 pm Post subject: |
|
|
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 |
|
|
chrbecke Guru
Joined: 12 Jul 2004 Posts: 598 Location: Berlin - Germany
|
Posted: Mon Oct 16, 2006 4:50 pm Post subject: |
|
|
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 |
|
|
PaulSorensen Tux's lil' helper
Joined: 15 Apr 2004 Posts: 80 Location: Chicago, USA
|
Posted: Mon Oct 16, 2006 5:41 pm Post subject: Re: Real time kernel - useful for a desktop user? |
|
|
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 |
|
|
bitpicker Apprentice
Joined: 28 Dec 2005 Posts: 163 Location: Germany
|
Posted: Mon Oct 16, 2006 7:49 pm Post subject: |
|
|
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 |
|
|
bitpicker Apprentice
Joined: 28 Dec 2005 Posts: 163 Location: Germany
|
Posted: Tue Oct 17, 2006 10:00 pm Post subject: |
|
|
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 |
|
|
Bobnoxous Apprentice
Joined: 03 May 2005 Posts: 240
|
Posted: Wed Oct 18, 2006 12:30 am Post subject: |
|
|
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 |
|
|
|