[bf1942] nice'ing processes

zextra at neobee.net zextra at neobee.net
Tue Feb 4 04:19:44 EST 2003


thanks4 helping me... and just to explain a little more things... this server 
from my story needs to run all standard web services (www, mail, ftp), needs to 
be some kind of router and strong firewall of course... also, i am running 
samba file sharing service, and at the end, i want to put almost all popular 
dedicated game servers on it (hlds with few mods, bf,ut2k3 or older, battle.net 
server, q3 and so on....). so, there will be needed to set some priority in 
their execution. i suppose that i can set (i didnt tried it yet) a lower nice 
level (+) for some unneccessary apps... and i know that setting + nice level 
will pull priority down, and - level will put it up.
about screens under root... let me explain it a bit more... i write some script 
that contain only 1 command (eg. "screen -d -m -S 
some_sess /usr/blahblah/app"), and in rc.sysinit, at the end of all, i put call 
for this script to execute. AND, the system boots up, i login as root, type in 
screen -list, and i get NOTHING.... :( but, the command "ls /tmp/screens/S-
root" shows me that there is some screen session named eg. 34523.some_sess. the 
question is: how can i attach on that session.
after that, i would ask u how can i start some app as other user than root at 
the system startup? it would be very usefull for me...

thanks 4 everythin.... it helped me a lot !
Greetings, Boris

> 1. Nice'ing processes is, in general, not the end-all-be-all that some 
> people think it is. For example, the only process that I nice most of 
> the time is setiathome. I nice it to 19 simply because I don't ever want 
> a process designed to max out the processor hogging resources. If your 
> server does not have enough resources to run a process, nice'ing the 
> process higher (more negative) will not help. It's been my experience 
> that nice'ing process down (more +) has a lot more predictable results 
> than trying to nice them up (more -).
> 
> 2. see #1. Recently, I actually replaced my P4 file/web/mail server at 
> home with an older K6-2 500 so my P4 could be freed up to do things like 
> run a BF server. If you're running under 10 users with sporadic file 
> service access, there's no reason to try to out-nice samba. My AMD 500 
> runs web/samba/mail without any problems whatsoever, but I doubt that BF 
> would run worth a dam on it with or without those services.
> 
> 3. "man hdparm" - some standard "safe" performance enhancing settings:
> hdparm -d1 -A1 -m16 -u1 -a64 /dev/hdX (replace hdX with your device)
> You might also try googling for "hdparm <your IDE controller> to see if 
> anyone else has already done all the legwork to figure out good settings 
>   for your hardware, they usually have =). On #1 & #2 regarding this 
> hardware config, you should really not have to worry about nice'ing 
> processes unless you're service massive amounts of users or are running 
> on a 10mb nic
> 
> 4. I am unfamiliar with the behavior you're describing. The only time 
> I've seen screen drop a session is when I've started multiple windows 
> (via .screenrc) and for some reason one of the processes dies. So far, 
> everytime this has happened, it was my fault for not setting a config 
> file or some such. When this happened, all of the other windows would 
> show in a ^A-w and the session would be visible.
> 
> 5. I would build a small script that checks for the server process every 
> 5 or 10 minutes, and if not found, run it. Drop that script into the 
> server user's crontab (crontab -e -u <user>). In answer to the missing 
> screen, my guess would be that you are trying to see the screen as a 
> user, but the session is in root's screen area. Screen sessions are user 
> spcific.
> 
> Hope that helps,
> Rick
> 
> Boris Ceranic wrote:
> > hey....
> > 
> > i juz want to ask you a few simple questions... they will be simple as much
> > as you are experienced in linux :)
> > 1. i am running ded. server under regular user acct, but when i try to
> > change nice level of server application, i get an error message saying that
> > i cant set priority level. how can i allow a regular user to set priority
> > level for some application?
> > 2. what priority level is suitable for use with these applications which
> > needs greater priority level than, for example, file sharing service? can it
> > be, lets say, -1, as it will be greater (or mathematicaly smaller) that
> > pri.lev. of some system service?
> > 3. i am running mandrake 9 linux on intel p4 1.7g, asus k7v (or so)
> > mainboard, and hd drive maxtor 60gb 7200 rpm. mainboard supports ultra dma
> > level6, and that limits file transfer speed at about 20mb/s (from one hdd to
> > another on another ide controller), but i have JUST 1mb/s !!!!! :((((( BUT,
> > when i put on mandrake 8.1, the problem disappears... (?!) any1 have an idea
> > how can i solve this?
> > 4. about application screening.... i use command (as regular user)
> > "screen -m -S <scr_name> <app_name>", without -d parameter, just to be sure
> > that everything went fine with server startup, then i detach from that
> > screened app., i logout from that user running screen (and some app inside),
> > and sometimes, when i login back again, i cant see screen named <scr_name>
> > when doing "screen -list" command, but in "ps -A|grep screen" list, i can
> > see that screen is still running under my username. but sometimes,
> > everything is working fine. why?
> > 5. what is the best way to start game server during the system startup, but
> > under username other than root? i was using script that starts screened app
> > during sys.startup, and i insert reference to this script at the end of
> > rc.local or rc.sysinit files, but when i login as root, i cant attach on
> > these virt. console. i can see that it still exists in /tmp/screen/S-root
> > (along with its pid and screen name), but there is (as i think) no way to
> > connect on it.
> > 
> > i am sorry because of my bad english, and thank you for help... (in advance
> > :)) )
> > 
> > bye! poz!
> > 
> > ----- Original Message -----
> > From: "Rick Buford" <rickbuford at greeblesnort.com>
> > To: "BF1942" <bf1942 at icculus.org>
> > Sent: Wednesday, January 29, 2003 5:32 AM
> > Subject: [bf1942] nice'ing processes
> > 
> > 
> > 
> >>As a production linux admin for several years now, I can suggest a
> >>couple of things:
> >>1. NEVER RUN ANYTHING AS ROOT that you don't ABSOLUTELY have
> >>too...ever...period - create a user with userad <username>; passwd
> >><username>
> >>2. nice'ing processes to -20 will not work for any normal
> >>process...that's a level usually reserved for system processes and if
> >>you disrupt them, yer gonna get hosed
> >>3. clean up your system: a) remove unneeded processes if this box is
> >>devoted to BF ("man ps" & "man top"); this includes GUIs. KDE & GNOME
> >>are nowhere near the hogs that winblows is, but they still take system
> >>resources, even if they're just sitting there to give you an xterm ("man
> >>init" & "man inittab")
> >>4. do not fear the command line: "man apropos", "man locate", & "man
> >>find" will help you to find CLI nirvana
> >>
> > 
> > 
> 






More information about the Bf1942 mailing list