Hi there. I have become aware that when X is started under an account which has sufficient priveleges to set the nice priority level for a process (i.e. root), the X server is niced to -1. Obviously, with xdm/kdm/gdm this is "unavoidable" in a default setup. I consider this to be a bug because the vast majority of kernels that Gentoo users choose (including the default gentoo-sources) feature the O(1) scheduler, and renicing X is generally /bad/ for overall "desktop" performance with this scheduler! Thus, if I startx as root or use xdm, I must manually renice X to 0. As far as I know there are only two situations where renicing X can be beneficial: 1) Kernels that don't feature the O(1) scheduler, such as 2.4 mainline 2) Possibly 2.6.0-test5 with Nick Piggin's scheduler policy patch v15 (not that many are probably using that ;-) Renicing X with the O(1) scheduler runs the risk of giving too many processor cycles to X, affecting the quality of the scheduling decisions, and stealing time away from other processes where it isn't merited - particularly the likes of xmms, and other multimedia stuff. I don't know how the renice process occurs, but IMHO it shouldn't occur. Or perhaps it should default to 0, and a configuration directive should be introduced which allows for easy reconfiguration of the nice level for those who choose not to use O(1) based kernels. Any thoughts?
eep, sorry about the bad wrapping there ... :-/
Hmm. The plot thickens. I've consulted with two other users so far, and the problem does not occur for them when using xdm. However, it does occur for them when using startx as root. For me, it occurs in both scenarios. The sources being used vary. In my case it happens under every kernel I've tried thus far (quite a few), the others were using 2.4.22 (vanilla I think) and gentoo-sources. I'm quite confused now :/
I ran "grep -r nice /usr/X11R6/ /etc/X11/ | grep -v Binary" and didn't find any use of the nice command, just comments with the word nice. So it doesn't look like it's coming from any xfree config files at first glance.
Created attachment 21718 [details, diff] patch This is the patch for xinit which will stop the server being niced to -1, no-one quite knows why this is done at all really so this probably needs to be tested out etc... Everyone on the xfree ML knows what happens, but no-one really mentioned why it is done.
Bump! Just a note to say that maybe this bug should be closed (I don't know whether it's relevant or not anymore, but as xorg appears to be the X server of choice these days then perhaps it is not a big issue).
Marking invalid because xorg-x11 is the only xserver supported by Gentoo right now.
Let's see whether this is still relevant for xorg-x11 (which I'm almost sure it is) before closing, hmm?
This bug still exists in xorg-x11 6.8.3-r4.
Sorry I meant 6.8.2-r4.
Simon, or anyone else, if you'd like to pursue this, please file an upstream bug at bugs.freedesktop.org in the xorg product with Andrew's patch, and post the URL here. Thanks!