You are not logged in.

#1 2009-05-25 23:49:53

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

low latency Kernel - Does Arch, Have One?

I'd thought I'd get around to trying Quake Wars so I downloaded the demo today and for 'important system-requirements' it states:

│ You need a low latency kernel for optimal performance (this applies to both    │
│  client and server installations). Make sure your kernel is configured with    │
│  CONFIG_HZ_1000=y. You should also enable other low latency settings, such as  │
│  the various preemption settings.

I don't mind building my own but thought I'd ask and see if Arch does.  I'd guess probably not as most distro's don't and those that do (like Ubuntu Studio) specifically tell so. 

Update: Ok, I found a real time kernel in AUR
http://aur.archlinux.org/packages.php?ID=11364

From other users experience is trying this going to lead to a lot of troubleshooting?  I also noticed too that one user said they were having trouble with 32-bit apps, will this make wine unusable on my 64bit system?  I don't mind trying the package but don't have much time to troubleshoot.  Any advice?

Last edited by Gen2ly (2009-05-25 23:55:22)


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#2 2009-05-26 00:05:49

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: low latency Kernel - Does Arch, Have One?

Advice? Why yes: get one box for that game and another w/ a stock kernel for everything else. The worst thing that can happen w/ this setup is when you switch to suboptimal performance and ditch the custom kernel.

Offline

#3 2009-05-26 02:11:39

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: low latency Kernel - Does Arch, Have One?

Um, not sure i got an extra computer about.  Yeah, I asked because the kernel works just fine but got to thinking since I play games alot if using a real time kernel would be a good idea.


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#4 2009-05-26 02:18:35

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: low latency Kernel - Does Arch, Have One?

Low latency isn't necessarily RT. There's a bunch of settings apart from kernel config you should probably make to ensure a really smooth performance. RT is about responsiveness, so it might be a good idea.
Wrt to 'another box' what I meant was: separate the experimental stuff from the production one - if you have any, that is.
I own two low-spec boxes, so that's how I do it. For your setup maybe a separate partition would be nice.

Offline

#5 2009-05-26 07:34:33

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,355

Re: low latency Kernel - Does Arch, Have One?

What's wrong with simply installing another kernel alongside the generic ARCH kernel? Never failed me before.

To the OP, if you want RT, go with kernel26-ice, iceman81 has the latest RT included with a flag in his PKGBUILD. But yes, you don't need real-time. Just pick any other kernel, ice or whatever, and set the timer to 1000 Hz as well as enabling preemption. The RT kernel enables FORCED preemption, any old kernel can enable preemption.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#6 2009-05-26 13:09:32

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: low latency Kernel - Does Arch, Have One?

ngoonee wrote:

What's wrong with simply installing another kernel alongside the generic ARCH kernel? Never failed me before.

If you're not careful you may compile things against one kernel and try to run it w/ the other and ooops. I don't know if low-latency vs stock kernel can cause problems, so probably you're right, that would be the easiest option.

Offline

#7 2009-05-26 14:58:49

Themaister
Member
From: Trondheim, Norway
Registered: 2008-07-21
Posts: 652
Website

Re: low latency Kernel - Does Arch, Have One?

I don't even have the kernel26 package installed smile It works just fine. Btw, is the 1000Hz setting better than 300Hz ? I think I read somewhere that 1000Hz on a fast dual core would create more overhead than you gained.

Offline

#8 2009-05-26 15:02:52

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: low latency Kernel - Does Arch, Have One?

Themaister wrote:

I think I read somewhere that 1000Hz on a fast dual core would create more overhead than you gained.

What would you / 'they' suggest - more cores? I only know that option from menuconfig, so don't ask me.

Offline

#9 2009-05-26 15:19:18

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: low latency Kernel - Does Arch, Have One?

No I don't think it creates more overhead.  Yeah, and a rt kernelt is not a good idea, this can actually hurt overall performance, not help it.  I looked into the stock kernel and found out it is already a low latency  [Preemption Model (Preemptible Kernel (Low-Latency Desktop))] so I put the timer too 1000Hz and tried it out.  Ican't say that there is a noticeable difference most of the time and frame rates are about the same.  I can say that the occasional stutters are gone though, where every now and then I'd get a hitch before, so not a total waste of time.  For any that want to try it the easiest way i could think of to do itwas:

1) Install abs
2) Download matching kernel from linux.org
3) Unpack linux.org kernel
4) cp /var/abs/core/kernel26/config.x86_64 /var/abs/local/linux-<version>/.config
5) enter that directory, make menuconfig
6) change settings
7) cp the config back
8) makepkg back in abs
8.5) pacman -U kernel26...

Worked like a charm.

Thanks for the tips.  Could've been a disaster if i just started tweaking things.

Last edited by Gen2ly (2009-05-26 15:20:21)


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#10 2009-05-26 15:23:46

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: low latency Kernel - Does Arch, Have One?

Gen2ly wrote:

8.5) pacman -U kernel26...

<scratching head> So you run everything on this modified kernel?

ngoonee wrote:

What's wrong with simply installing another kernel alongside the generic ARCH kernel? Never failed me before.

Correct me if I'm wrong, but you *can* have several kernels, just pick 'em via GRUB - right?

Offline

#11 2009-05-26 17:17:04

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: low latency Kernel - Does Arch, Have One?

Just as a note for future reference, you can read /proc/config.gz for the kernel config, and that will tell you the compilation settings.

Offline

#12 2009-05-26 17:24:34

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: low latency Kernel - Does Arch, Have One?

karol wrote:
Gen2ly wrote:

8.5) pacman -U kernel26...

<scratching head> So you run everything on this modified kernel?

ngoonee wrote:

What's wrong with simply installing another kernel alongside the generic ARCH kernel? Never failed me before.

Correct me if I'm wrong, but you *can* have several kernels, just pick 'em via GRUB - right?

Yeah and does just fine.  I did think about naming the kernel different but I figured if I didn't like this, a regular update would just get rid of it anyway.  If iwant to keep it, I'll just rename it and then do the grub update.

Oh and good point about the config-file, forgot the kernel stores them now.

Last edited by Gen2ly (2009-05-26 17:25:14)


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#13 2009-05-26 20:11:41

schivmeister
Developer/TU
From: Singapore
Registered: 2007-05-17
Posts: 971
Website

Re: low latency Kernel - Does Arch, Have One?

I've heard cases on the contrary with regards to games and 1000Hz + complete pre-emption - it's totally not worth it.

Anyway, a realtime low-latency kernel _does_ add overhead.

Don't bother and get a faster graphics card.


I need real, proper pen and paper for this.

Offline

#14 2009-05-26 22:33:16

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,355

Re: low latency Kernel - Does Arch, Have One?

1000Hz doesn't affect anything, AFAICT. The RT kernel, on the other hand, DOES give you much much lower latencies at the expense of throughput. Also, when load is high you will actually see some increase in stuttering. Its meant for specific use only. I've been experiencing a bluetooth bug with RT, anyhow, pushing one core to 100% usage.

Concerning paralel kernels, I'd advise never to overwrite the stock kernel, just install another aside it with a different package name. You'll need to edit your grub's menu.lst to add the other kernels, but that means you'll always have a fall back in case of an oops.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#15 2009-05-27 11:13:53

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: low latency Kernel - Does Arch, Have One?

Gen2ly wrote:

I did think about naming the kernel different but I figured if I didn't like this, a regular update would just get rid of it anyway.  If iwant to keep it, I'll just rename it and then do the grub update.

You can tell pacman to ignore packages, I don't know if that's what you're referring to though.

Offline

#16 2009-05-27 14:52:11

schivmeister
Developer/TU
From: Singapore
Registered: 2007-05-17
Posts: 971
Website

Re: low latency Kernel - Does Arch, Have One?

ngoonee wrote:

1000Hz doesn't affect anything, AFAICT.

Yes, for one, the timer freq is unrelated to rt threads. But this is where throughput decreases also, as the more responsive the non-realtime threads become. Essential for when MIDI is concerned (clock sync), but at the same time, > interrupts/sec == > load as more CPU cycles (although very minimal compared to realtime) are used up for those threads. For games, more interrupts theoretically means faster response for actions, but practically doesn't add to FPS.

Gen2ly wrote:

If iwant to keep it, I'll just rename it and then do the grub update.

Simply renaming boot-specific files won't work. Your modules (directory) will be overwritten by kernel26, so you won't be able to boot with the other. As such, you should always edit $_kernelname.

Last edited by schivmeister (2009-05-27 14:56:57)


I need real, proper pen and paper for this.

Offline

Board footer

Powered by FluxBB