Re: [gentoo-user] running X at nice -10

2003-02-06 Thread Mike Williams
On Thu, 2003-02-06 at 13:47, gabor wrote:
> and now back to the topic:
> IS GIVING A HIGHER PRIORITY TO X A GOOD IDEA OR NOT ?  

I can't say whether it is, or not. But, I can say that I already do.
Doesn't really seem to make any real difference tho, but I never really
had a problem before (or they were so random and rare it's nigh on
impossible to say).

Someone posted this a while ago, what I use now, works perfectly.

/* wrapper.c
 * Casey Cain <[EMAIL PROTECTED]>
 *
 * This is a quick hack that starts X with a priority
 * of -10 for increased responsiveness. It should work
 * but it may not :)  There is no warranty or anything.
 * Although I can't see anything possibly going wrong as
 * there's only about 3 lines of code, worst case you
 * have to reinstall X. Basically, you should never run
 * code that you don't understand. That said:
 *
 * To use this program, verify that /usr/X11R6/bin/X is
 * really a symlink to /usr/X11R6/bin/XFree86 (the actual
 * server binary) If not, then change the *app to point to
 * the actual binary.
 * At the console (be careful..no typos):
 *   kill X and anything X-related (ie: xdm, kdm)
 * $  gcc wrapper.c -o XFree86.wrapper
 * $  su
 * $  cp XFree86.wrapper /usr/X11R6/bin
 * $  cd /usr/X11R6/bin
 * $  ls -alk X (make sure its a symlink..if not STOP)
 * $  rm X
 * $  chown root.root XFree86.wrapper
 * $  chmod u+s XFree86.wrapper
 * $  ln -s XFree86.wrapper X
 * $  exit
 *
 * You should now be able to startx or xdm or whatever.
 * Open an xterm and run 'top'. The process XFree86
 * (which is the server) should be running at nice -10.
 *
 * If not, then make sure the XFree86.wrapper is suid
 * root, executable by all, owned by root, and pointed
 * to by /usr/X11R6/bin/X.
 *
 * To revert is easy.
 * $  su
 * $  cd /usr/X11R6/bin
 * $  rm X
 * $  ln -s XFree86 X
 * $  exit
 */
#include 
#include 
#include 
#include 
#include 

const char *app = "/usr/X11R6/bin/XFree86";   // the actual binary
const int root = 0;   // root's uid
const int n = -10;// desired nice priority valid range -20..20.

int main(int argc, char **argv)
{
  seteuid(root);// The X server must be started as root under any
Linux
  nice(n);  // Makes it nice
  execv(app, argv); // This is it!
  /* Should never see this unless *app points to invalid binary */
  fprintf(stderr, "Failed to execv %s with nice value of %d\n", app, n);
  exit(1);
}

-- 
Mike Williams <[EMAIL PROTECTED]>



signature.asc
Description: This is a digitally signed message part


Re: [gentoo-user] running X at nice -10

2003-02-06 Thread Ted Ozolins
Felix Rodriguez wrote:



The only stupid question is the one you don't ask.


Exactly! During my time in the Canadian military, if you messed up or 
showed total lack of knowledge in any field, you could bet your boots 
that you would be giving the next course  on whatever that may be.  In a 
sense, this seems to be what most on this list are bound to without 
explicidly being told to do so. As we ask our questions (sometimes 
getting stupid answers or ignorant rants) we learn, yet at the same time 
are teaching others who perhaps didn't know that   wasn't working because of something they had /hadn"t done.  
Step by step each of us learn more about Linux, specifically Gentoo. 
Soon most of us will be able to exclaim with confidence right after an 
upgrade or install of that must have new proggy "oh damn! what the hell 
did I mess up now"  

LINUX IS NOT JUST FOR THE POWER USER! LINUX IS HERE FOR THOSE WHO HAVE 
THE POWER TO CHOOSE.

Cheers :)

--
Ted Ozolins (VE7TVO)
Westbank, B. C.

According to Ottawa "ALL CANADIANS ARE LIARS AND THIEVES"

Powered by Slackware 8.1, sent with Mozilla



--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] running X at nice -10

2003-02-06 Thread Peter Gantner
Quoting gabor from Feb 6

> and now back to the topic:
> IS GIVING A HIGHER PRIORITY TO X A GOOD IDEA OR NOT ?  


AFAIK RedHat 8.0 does it per default, together with their "jiffies" 
kernel hack makes the system much more responsive.
My guess is they needed to do that in order to run their GnoDE 
Desktop at reasonable speed.
After all, their minimum reqiurements are a PII@200, 128MB RAM.

I have had very good expierience with doing it on my "slow" 
(Celeron 700) old machine when using GNOME2, as nautilus got faster 
since GNOME-1.4, but still not fast enough for serious work.

(I don't need to do it anymore because I now have a dual-CPU machine 
so X always has a CPU to use no matter the load.)

I would say if your machine is not up to par with the Desktop you are
using you will benefit from that.  On a fast machine, you won't 
notice the difference.


greets,
Peter G.


(And if you are really into it, you might also try dumping your PS/2 
mouse and using an USB one. PS/2 eats a _lot_ of interrupts you 
know...)

-- 
"The Empire never ended."
Tractates: Cryptica Scriptura, no. 6

--
[EMAIL PROTECTED] mailing list




Re: [gentoo-user] running X at nice -10

2003-02-06 Thread gabor
On Thu, 2003-02-06 at 14:42, Ernie Schroder wrote:

> Thanks to all of the list for their help in getting my 2 Gentoo boxes up and
> running. I have some googling to do now. I've come to the realization that I
> don't have a good grasp on /proc. If I have questions once I've done some
> research, I'll be back with them, and I'll be damned if I'll be embarrassed.


you're absolutely right :)...


and now back to the topic:
IS GIVING A HIGHER PRIORITY TO X A GOOD IDEA OR NOT ?  

:)))


gabor


--
[EMAIL PROTECTED] mailing list




Re: [gentoo-user] running X at nice -10

2003-02-06 Thread Ernie Schroder
http://www.redhat.com/docs/manuals/linux/RHL-7.3-Manual/ref-guide/s1-proc-topfiles.html
If there's anyone else out there that knows squat about /proc, try the above 
link.
P.S. I agree, Felix
-- 
Regards, Ernie
100% Microsoft and Intel free


On Thursday 06 February 2003 08:52, Felix Rodriguez wrote:
> The only stupid question is the one you don't ask.
>
> At 08:42 AM 2/6/2003 -0500, Ernie Schroder wrote:
> >On Thursday 06 February 2003 04:08, Jozsa Kristof wrote:
> > > As a sidenote, I'm getting fed up with the level of discussions going
> > > up here. I always thought the gentoo distribution is meant for the
> > > power user, not for the plain brave user



--
[EMAIL PROTECTED] mailing list




Re: [gentoo-user] running X at nice -10

2003-02-06 Thread Arturo di Gioia
On Thu, 2003-02-06 at 10:08, Jozsa Kristof wrote:

> As a sidenote, I'm getting fed up with the level of discussions going up
> here. I always thought the gentoo distribution is meant for the power user,
> not for the plain brave user (the difference is that the power user has both
> the experience and the _knowledge_ to do what he/she wants).

You could suggest to the mailing list administrators to add another
list, something like gentoo-gods, but according to yourself I think you
will realize very soon that

> OK, I really feel like talking to myself, but still..

PS: I am one of those brainfarters who received from the list a lot more
than they gave.


-- 
Arturo di Gioia <[EMAIL PROTECTED]>


--
[EMAIL PROTECTED] mailing list




Re: Re: [gentoo-user] running X at nice -10

2003-02-06 Thread Don Smith



 At 2003-02-06, 08:52:00 you
wrote: 


  
  

  
The only stupid question is the one you don't ask.
 
At 08:42 AM 2/6/2003 -0500, Ernie Schroder wrote:
>>
On Thursday 06 February 2003 04:08, Jozsa Kristof wrote:
>>  >
 As a sidenote, I'm getting fed up with the level of discussions going up
>>  >
 here. I always thought the gentoo distribution is meant for the power user,
>>  >
 not for the plain brave user
-
[EMAIL PROTECTED] mailing list

After several replies this guy
realizes how stupid he sounds?  The sad reality: not likely. 



Re: [gentoo-user] running X at nice -10

2003-02-06 Thread Felix Rodriguez

The only stupid question is the one you don't ask.

At 08:42 AM 2/6/2003 -0500, Ernie Schroder wrote:

On Thursday 06 February 2003 04:08, Jozsa Kristof wrote:
> As a sidenote, I'm getting fed up with the level of discussions going up
> here. I always thought the gentoo distribution is meant for the power user,
> not for the plain brave user





--
[EMAIL PROTECTED] mailing list




Re: [gentoo-user] running X at nice -10

2003-02-06 Thread Ernie Schroder
On Thursday 06 February 2003 04:08, Jozsa Kristof wrote:
> As a sidenote, I'm getting fed up with the level of discussions going up
> here. I always thought the gentoo distribution is meant for the power user,
> not for the plain brave user

Maybe the reason that Gentoo is gaining so quickly in popularity is that is
IS geared toward the "power user" and so many of us who have migrated from
dependancy hell want to learn.
I've been running Linux on at least one machine since SUSE 6.0 and have
learned infinately more about it in the month I've been using Gentoo than in
the 3+ years with SUSE, Mandrake,RedHat & Elx.
No, I'm not a "power user", far from it but, though I don't think that that
is my ultimate goal, I want to learn as much as I can. Snotty, superior
elitists like yourself are an annoyance and turn off a lot of people who
otherwise might become Linux users. Comments such as the above are not only
inconsiderate, but they harm the reputation of the whole community.
I, for one, am going to continue to ask, sometimes stupid questions in my
quest to learn and not be embarrassed by self absorbed individuals.
Thanks to all of the list for their help in getting my 2 Gentoo boxes up and
running. I have some googling to do now. I've come to the realization that I
don't have a good grasp on /proc. If I have questions once I've done some
research, I'll be back with them, and I'll be damned if I'll be embarrassed.
--
Regards, Ernie
100% Microsoft and Intel free


--
[EMAIL PROTECTED] mailing list




Re: [gentoo-user] running X at nice -10

2003-02-06 Thread Anders Johansson
On Thu, 2003-02-06 at 10:08, Jozsa Kristof wrote:
> As a sidenote, I'm getting fed up with the level of discussions going up
> here. I always thought the gentoo distribution is meant for the power user,
> not for the plain brave user (the difference is that the power user has both
> the experience and the _knowledge_ to do what he/she wants). Appearently at
> least the gentoo-user list is filled with people mostly coming from the 'huh
> what's /proc, nevermind, let's emerge -ep world again with -O9' part. That's
> getting a bit boring..

I refuse to believe that this rant came from the same person who happily
upgraded glibc from 2.2 to 2.3 on a machine he needed for business
purposes without first testing it on a separate machine to see if it
actually worked.

Oh yeah, you're a real power user


--
[EMAIL PROTECTED] mailing list




Re: [gentoo-user] running X at nice -10

2003-02-06 Thread Collins Richey
On Thu, 6 Feb 2003 10:08:01 +0100
Jozsa Kristof <[EMAIL PROTECTED]> wrote:


> As a sidenote, I'm getting fed up with the level of discussions going
> up here. I always thought the gentoo distribution is meant for the
> power user, not for the plain brave user (the difference is that the
> power user has both the experience and the _knowledge_ to do what
> he/she wants). 

Catch up with reality.  I'm happy that your experience and _knowledge_
has brought you to such delerious heights that you can sneer at the rest
of ignorant humanity, but the only way to learn is to ask questions and
seek knowledge.  The user who doesn't know what /proc is will learn that
and more and will soon be able to help others.

-- 
Collins Richey - Denver Area
Athlon-XP gentoo 1.4_rc2++ system xfce4-cvs

--
[EMAIL PROTECTED] mailing list




Re: [gentoo-user] running X at nice -10

2003-02-06 Thread Jozsa Kristof
On Thu, Feb 06, 2003 at 10:11:47AM +0200, Voicu Liviu wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> On Thursday 06 February 2003 06:43, gabor wrote:
> > hi,
> >
> > i've read in the xine-faq, that running X at a higher-priority ( lower
> > nice level ) is a good idea...
> >
> > i understant that that would improve the responsiveness of X, but i
> > wanted to know about others experiences...
> 
> using "nice -n -10" will make yout CPU busy most of time with the Xthis is 
> what u want?

That's stupid. Renicing X to level -10 will cause the scheduling give more
priority to X, so when X actually has to do something, it'll be scheduled
before other processes running at lower priorities.

As a sidenote, I'm getting fed up with the level of discussions going up
here. I always thought the gentoo distribution is meant for the power user,
not for the plain brave user (the difference is that the power user has both
the experience and the _knowledge_ to do what he/she wants). Appearently at
least the gentoo-user list is filled with people mostly coming from the 'huh
what's /proc, nevermind, let's emerge -ep world again with -O9' part. That's
getting a bit boring..

Anyway, have fun with gentoo.. I'll do the same, but off-list. Good luck,

Christopher

ps. if the above doesn't fit you, dont take it.. it wasn't meant for direct
offense to anyone on the list.
-- 
.Digital.Yearning.for.Networked.Assassination.and.Xenocide

--
[EMAIL PROTECTED] mailing list




Re: [gentoo-user] running X at nice -10

2003-02-06 Thread Voicu Liviu
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thursday 06 February 2003 06:43, gabor wrote:
> hi,
>
> i've read in the xine-faq, that running X at a higher-priority ( lower
> nice level ) is a good idea...
>
> i understant that that would improve the responsiveness of X, but i
> wanted to know about others experiences...

using "nice -n -10" will make yout CPU busy most of time with the Xthis is 
what u want?

>
> do other people do that? does it work well for them?
>
> gabor
>
>
> --
> [EMAIL PROTECTED] mailing list
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+QhjDMcVU5N/V6I8RAv3cAJ9ccB0cB2x8sHgn3BLv2VnkC5+U8ACfRHRo
LEGJtNx4Qk3B/82RJgOfmbM=
=2TBN
-END PGP SIGNATURE-


--
[EMAIL PROTECTED] mailing list




[gentoo-user] running X at nice -10

2003-02-05 Thread gabor
hi,

i've read in the xine-faq, that running X at a higher-priority ( lower
nice level ) is a good idea...

i understant that that would improve the responsiveness of X, but i
wanted to know about others experiences...

do other people do that? does it work well for them?

gabor


--
[EMAIL PROTECTED] mailing list