* 2.6 scheduler and "fast user switching"
@ 2003-11-13 9:30 Guy
2003-11-13 11:11 ` Nick Piggin
0 siblings, 1 reply; 4+ messages in thread
From: Guy @ 2003-11-13 9:30 UTC (permalink / raw)
To: linux-kernel
Scenario:
I typically log in as 'root' on the first console. I then invoke
fluxbox as the GUI.
# XSESSION=fluxbox startx -- :0
I then ctl-alt-F2 another console and login as 'user1'. I then
invoke KDE as the GUI.
$ XSESSION=kde-3.1.4 startx -- :1
I may or may not ctl-alt-Fn and login as 'usern' and repeat the
process.
Several thoughts:
1} I've seen Nick Piggin's suggestion of nicing X server to -10.
At the moment, the only way I know to do this is something like
# XSESSION=fluxbox nice --adjustment=-10 startx -- :N
A} My default security is that only 'root' can perform nice with
negative values. I am reluctant to play with security for such a
crticial command.
B} All child threads inherit the new nice value. So in the example
just above, this means all applications started from the GUI
desktop run at a nice value of -10. I believe enhancing the X
server nice value this way defeats the purpose of nicing it to
begin with. Obviously, despite my readings and attempts at
research, I'm must be missing something here.
2} I expect to travel down to Florida for Xmass to visit family.
One of the things I had hoped to do was to set up my mother's
computer as an X server and hang a thin client terminal {read:
older PC} off of it. This would allowed my mother and brother to
share a reasonably modern system at the same time.
This is not me just being cheap. I'm interested in setting up
diskless workstations aound a good central X server. I see such
setups as appropriate for a number of situations. If the X server
requires 'nicing' in a single user environment, what happens in
an LTSP environment?
My base reference environment is 2.4.20. I still actively use it
for everything I do as everything works as expected.
Despite my enthusiasm for 2.6, I find it difficult to get
everything to 'just work'. I still see problems in the area of
nForce based mobos {stupid proprietary nVidia!}, broken BIOSes,
and scheduler issues like the above.
Flames, instruction, suggestions, thoughts would be appreciated.
FWIW, I'm not a C/C++ programmer. I'm computer literate and am not
afraid to run bleeding edge.
Guy
--
Recyle computers. Install Gentoo GNU/Linux.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 2.6 scheduler and "fast user switching"
2003-11-13 9:30 2.6 scheduler and "fast user switching" Guy
@ 2003-11-13 11:11 ` Nick Piggin
2003-11-13 21:11 ` Guy
0 siblings, 1 reply; 4+ messages in thread
From: Nick Piggin @ 2003-11-13 11:11 UTC (permalink / raw)
To: Guy; +Cc: linux-kernel
Guy wrote:
>Scenario:
>
>I typically log in as 'root' on the first console. I then invoke
>fluxbox as the GUI.
>
># XSESSION=fluxbox startx -- :0
>
>I then ctl-alt-F2 another console and login as 'user1'. I then
>invoke KDE as the GUI.
>
>$ XSESSION=kde-3.1.4 startx -- :1
>
>I may or may not ctl-alt-Fn and login as 'usern' and repeat the
>process.
>
>Several thoughts:
>
>1} I've seen Nick Piggin's suggestion of nicing X server to -10.
>At the moment, the only way I know to do this is something like
>
># XSESSION=fluxbox nice --adjustment=-10 startx -- :N
>
If you're not using my patches then nice causes scheduling latency
problems so don't do this even if you can. Con's scheduler work actually
makes interactivity good at the default priority.
>
>A} My default security is that only 'root' can perform nice with
>negative values. I am reluctant to play with security for such a
>crticial command.
>
Debian does this for you. I guess X runs as suid root anyway so
its not a big security problem.
>
>B} All child threads inherit the new nice value. So in the example
>just above, this means all applications started from the GUI
>desktop run at a nice value of -10. I believe enhancing the X
>server nice value this way defeats the purpose of nicing it to
>begin with. Obviously, despite my readings and attempts at
>research, I'm must be missing something here.
>
Debian manages to only renice the X server. If something like
this were required in a distro kernel I guess they would do it
for you nicely.
>
>2} I expect to travel down to Florida for Xmass to visit family.
>One of the things I had hoped to do was to set up my mother's
>computer as an X server and hang a thin client terminal {read:
>older PC} off of it. This would allowed my mother and brother to
>share a reasonably modern system at the same time.
>
>This is not me just being cheap. I'm interested in setting up
>diskless workstations aound a good central X server. I see such
>setups as appropriate for a number of situations. If the X server
>requires 'nicing' in a single user environment, what happens in
>an LTSP environment?
>
I think the server runs on the clients... or something ;)
>
>My base reference environment is 2.4.20. I still actively use it
>for everything I do as everything works as expected.
>
>Despite my enthusiasm for 2.6, I find it difficult to get
>everything to 'just work'. I still see problems in the area of
>nForce based mobos {stupid proprietary nVidia!}, broken BIOSes,
>and scheduler issues like the above.
>
Obviously make sure all your software is up to date with
Documentation/Changes, and remember we can't help with closed drivers.
If you still have problems please send in a report. Hope this helps
Nick
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 2.6 scheduler and "fast user switching"
2003-11-13 11:11 ` Nick Piggin
@ 2003-11-13 21:11 ` Guy
2003-11-14 0:58 ` Guy
0 siblings, 1 reply; 4+ messages in thread
From: Guy @ 2003-11-13 21:11 UTC (permalink / raw)
To: Nick Piggin; +Cc: linux-kernel
On Thursday 13 November 2003 06:11, Nick Piggin wrote:
> Guy wrote:
> >1} I've seen Nick Piggin's suggestion of nicing X server to
> > -10. At the moment, the only way I know to do this is
> > something like
> >
> ># XSESSION=fluxbox nice --adjustment=-10 startx -- :N
>
> If you're not using my patches then nice causes scheduling
> latency problems so don't do this even if you can. Con's
> scheduler work actually makes interactivity good at the default
> priority.
I don't use this on my reference 2.4.20 kernel. I only tried it to
see what would happen. This is how I know that I can only do this
when I'm root. I didn't time anything or do extensive testing.
Just enough to see that the child processes were also picking up
the same niceness.
It did occur to me to remember {DOH!} the 'renice' command. It's
been awhile since I was a *nix admin on an old Sequoia box.
I have been thinking about trying CK's patchset.
> >A} My default security is that only 'root' can perform nice
> > with negative values. I am reluctant to play with security
> > for such a crticial command.
>
> Debian does this for you. I guess X runs as suid root anyway so
> its not a big security problem.
See comment above. PBSAK
> >B} All child threads inherit the new nice value. So in the
> > example just above, this means all applications started from
> > the GUI desktop run at a nice value of -10. I believe
> > enhancing the X server nice value this way defeats the
> > purpose of nicing it to begin with. Obviously, despite my
> > readings and attempts at research, I'm must be missing
> > something here.
>
> Debian manages to only renice the X server. If something like
> this were required in a distro kernel I guess they would do it
> for you nicely.
See comment above. PBSAK
> >2} I expect to travel down to Florida for Xmass to visit
> > family. One of the things I had hoped to do was to set up my
> > mother's computer as an X server and hang a thin client
> > terminal {read: older PC} off of it. This would allowed my
> > mother and brother to share a reasonably modern system at the
> > same time.
> >
> >This is not me just being cheap. I'm interested in setting up
> >diskless workstations aound a good central X server. I see
> > such setups as appropriate for a number of situations. If the
> > X server requires 'nicing' in a single user environment, what
> > happens in an LTSP environment?
>
> I think the server runs on the clients... or something ;)
The X server on the 'server' is responsible for what to display
and where to display it.
The X server on the 'client' is responsible for interpreting that
info for the specific client machines hardware.
Since the 'server' is also responsible for any needed file serving
yada-yada-yada, I'm not certain how nicing the X server will play
out. But I'm sure I'll learn soon! However see comment above.
PBSAK
> >Despite my enthusiasm for 2.6, I find it difficult to get
> >everything to 'just work'. I still see problems in the area of
> >nForce based mobos {stupid proprietary nVidia!}, broken
> > BIOSes, and scheduler issues like the above.
>
> Obviously make sure all your software is up to date with
> Documentation/Changes, and remember we can't help with closed
> drivers. If you still have problems please send in a report.
> Hope this helps
Yes, it helps.
FWIW, The BIOS is already the lastest available from Asus {Sept.
2003}.
I'm seeing the same nForce{2,3} problems that other people are
seeing with regards to all services on the chip except IDE
sharing a single interrupt with ACPI assigning still other device
cards to the very same interrupt. This is no longer true for me
under -test9. :-) I suppose I should find the recent nForce3
thread and post both my BIOS options and my -test9 config file.
However, 2.4.20 also has all the nForce services except IDE
sharing the same interrupt. And that works fine.
I do make an effort to keep up to date. ;-) I saw yesterday and
plan on loading -test9-mm3 tonight. I even tried the forcedeth
driver and was unable to boot. I haven't reported that because I
haven't had time to follow it up with more info other than "It
won't boot." I try not to make useless posts. When I have more
info regarding that, I will post it.
Thank you Nick.
Later!
--
Recyle computers. Install Gentoo GNU/Linux.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 2.6 scheduler and "fast user switching"
2003-11-13 21:11 ` Guy
@ 2003-11-14 0:58 ` Guy
0 siblings, 0 replies; 4+ messages in thread
From: Guy @ 2003-11-14 0:58 UTC (permalink / raw)
To: Nick Piggin; +Cc: linux-kernel
On Thursday 13 November 2003 16:11, Guy wrote:
> On Thursday 13 November 2003 06:11, Nick Piggin wrote:
> > Guy wrote:
> > >A} My default security is that only 'root' can perform nice
> > > with negative values. I am reluctant to play with security
> > > for such a crticial command.
> >
> > Debian does this for you. I guess X runs as suid root anyway
> > so its not a big security problem.
>
> See comment above. PBSAK
>From http://members.optusnet.com.au/ckolivas/kernel
Renicing X? Many distributions (eg Mandrake) start X by default at
a nice of -10 to make it more responsive. This is a workaround
for the old scheduler limitations and the new scheduler makes
this unecessary, and may actually promote audio skipping with
this kernel. Each distribution may do this at different places
but commonly in the file /usr/lib/X11/xdm/Xservers there will be
a line that looks like this:
:0 local /bin/nice -n -10 /usr/X11R6/bin/X -deferglyphs 16
change it to:
:0 local /usr/X11R6/bin/X -deferglyphs 16
Gustavo Franco gave me this on how to do it on Debian:
# dpkg-reconfigure xserver-common
Manage X server wrapper configuration file with debconf? yes
Select what type of user has permission to start the X server. 2
Enter the desired nice value for the X server to use. 0
To check "cat /etc/X11/Xwrapper.config".
--
Recyle computers. Install Gentoo GNU/Linux.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-11-14 2:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-13 9:30 2.6 scheduler and "fast user switching" Guy
2003-11-13 11:11 ` Nick Piggin
2003-11-13 21:11 ` Guy
2003-11-14 0:58 ` Guy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox