Server Optimization

AeaAea Join Date: 2003-10-09 Member: 21552Members
Please don't give me "That sucks, use that," or "That's not enough bandwidth you n00b," I just don't need somebody telling me my server sucks. Now, I want to optimize my server, I'll give you some specs below...

3.1.1.0 Hlds Unsecure
800 Mhz Duron Cpu
512 MB of ram
256 Kbs upload (stable)
When I get more then 8 people on my server my ping goes from 30 to over 100, obviously caused by cpu/ram issues. I have the 2.4 kernal and I'm running KDE, any hints?

Comments

  • Pebbles-TPFPebbles-TPF Join Date: 2002-11-11 Member: 8237Members, Constellation
    Stop running KDE.

    If you can get away with not using the X11 interface, your RAM/CPU load will be dramatically decreased.

    <i>Pebbs</i>
  • billcatbillcat Join Date: 2002-11-02 Member: 4903Members, Constellation
    edited October 2003
    I've got to agree here, I use KDE myself on my desktop client and it's great for that. What it's not great for is making servers run faster.

    I'd do ps -ef and look at the process list and see what processes you can do without. If it's a standard bloathat install you can remove 50-90% of that crap and run a HLDS server fine.

    Also, if you want some better feedback you should also post the cmd line you use to start hlds, the contents of your server.cfg and autoexec.cfg. Withhold any passwords or stuff like that but it'd be nice to know what junk you have running with HLDS. I was running pingboost -2 for a while and that hit the CPU pretty hard. I removed that line at someone elses suggestion and the server was able to handle a few more users.
  • AeaAea Join Date: 2003-10-09 Member: 21552Members
    Here's my launch command ./hlds_run -game ns +ip
    12.254.40.75 +maxplayers 12 +map ns_eclipse

    I'm running Metamod, with amx, unstuck pro, and lerklift. I striped down the amx to it's bare necessities <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->

    My cpu use is pretty high, any way to shut down KDE while running it?
  • billcatbillcat Join Date: 2002-11-02 Member: 4903Members, Constellation
    uh.. if you're in the kde desktop there should be a logout thingy down at the bottom. If you asking me if you can close KDE and still have the server you started in a KDE window working, I don't think that's possible. I'd shut down the server, log out of KDE and then from the console start HLDS.
  • AeaAea Join Date: 2003-10-09 Member: 21552Members
    Closest thing I can get is "failsafe" which is still GUI like with a console, anyhow, which are safe to nuke?

    root 1 0 2 00:13 ? 00:00:04 init
    root 2 1 0 00:13 ? 00:00:00 [keventd]
    root 3 1 0 00:13 ? 00:00:00 [kapmd]
    root 4 1 0 00:13 ? 00:00:00 [ksoftirqd_CPU0]
    root 9 1 0 00:13 ? 00:00:00 [bdflush]
    root 5 1 0 00:13 ? 00:00:00 [kswapd]
    root 6 1 0 00:13 ? 00:00:00 [kscand/DMA]
    root 7 1 0 00:13 ? 00:00:00 [kscand/Normal]
    root 8 1 0 00:13 ? 00:00:00 [kscand/HighMem]
    root 10 1 0 00:13 ? 00:00:00 [kupdated]
    root 11 1 0 00:13 ? 00:00:00 [mdrecoveryd]
    root 15 1 0 00:13 ? 00:00:00 [kjournald]
    root 73 1 0 00:13 ? 00:00:00 [khubd]
    root 2278 1 0 00:13 ? 00:00:00 [kjournald]
    root 2641 1 0 00:14 ? 00:00:00 /sbin/dhclient -1 -q -lf /var/li
    root 2684 1 0 00:14 ? 00:00:00 syslogd -m 0
    root 2688 1 0 00:14 ? 00:00:00 klogd -x
    rpc 2706 1 0 00:14 ? 00:00:00 portmap
    rpcuser 2725 1 0 00:14 ? 00:00:00 rpc.statd
    root 2792 1 0 00:14 ? 00:00:00 /usr/sbin/apmd -p 10 -w 5 -W -P
    root 2829 1 0 00:14 ? 00:00:00 /usr/sbin/sshd
    root 2843 1 0 00:14 ? 00:00:00 xinetd -stayalive -reuse -pidfil
    root 2863 1 0 00:14 ? 00:00:00 sendmail: accepting connections
    smmsp 2872 1 0 00:14 ? 00:00:00 sendmail: Queue runner@01:00:00
    root 2882 1 0 00:14 ? 00:00:00 gpm -t ps/2 -m /dev/mouse
    root 2891 1 0 00:14 ? 00:00:00 crond
    root 2902 1 0 00:14 ? 00:00:00 cupsd
    xfs 2959 1 0 00:14 ? 00:00:00 xfs -droppriv -daemon
    root 2968 1 0 00:14 ? 00:00:00 anacron -s
    daemon 2977 1 0 00:14 ? 00:00:00 /usr/sbin/atd
    root 2985 1 0 00:14 tty1 00:00:00 /sbin/mingetty tty1
    root 2986 1 0 00:14 tty2 00:00:00 /sbin/mingetty tty2
    root 2987 1 0 00:14 tty3 00:00:00 /sbin/mingetty tty3
    root 2988 1 0 00:14 tty4 00:00:00 /sbin/mingetty tty4
    root 2989 1 0 00:14 tty5 00:00:00 /sbin/mingetty tty5
    root 2990 1 0 00:14 tty6 00:00:00 /sbin/mingetty tty6
    root 2991 1 0 00:14 ? 00:00:00 /usr/bin/gdm-binary -nodaemon
    root 3034 2991 0 00:14 ? 00:00:00 /usr/bin/gdm-binary -nodaemon
    root 3035 3034 3 00:14 ? 00:00:02 /usr/X11R6/bin/X <!--emo&:0--><img src='http://www.unknownworlds.com/forums/html/emoticons/wow.gif' border='0' style='vertical-align:middle' alt='wow.gif'><!--endemo--> -auth /var/g
    root 3044 3034 0 00:14 ? 00:00:00 /bin/sh /usr/bin/startkde
    root 3101 3044 0 00:14 ? 00:00:00 /usr/bin/ssh-agent /usr/share/ap
    root 3142 1 0 00:15 ? 00:00:00 kdeinit: Running...
    root 3145 1 0 00:15 ? 00:00:00 kdeinit: dcopserver --nosid
    root 3148 1 0 00:15 ? 00:00:00 kdeinit: klauncher
    root 3150 1 2 00:15 ? 00:00:01 kdeinit: kded
    root 3211 3142 3 00:15 ? 00:00:01 /usr/bin/artsd -F 10 -S 4096 -s
    root 3220 1 1 00:15 ? 00:00:00 kdeinit: knotify
    root 3221 3044 0 00:15 ? 00:00:00 kwrapper ksmserver
    root 3223 1 1 00:15 ? 00:00:00 kdeinit: ksmserver
    root 3224 3142 2 00:15 ? 00:00:01 kdeinit: kwin
    root 3227 1 4 00:15 ? 00:00:01 kdeinit: kdesktop
    root 3236 1 5 00:15 ? 00:00:01 kdeinit: kicker
    root 3237 3142 0 00:15 ? 00:00:00 kdeinit: kio_file file /tmp/ksoc
    root 3241 1 2 00:15 ? 00:00:00 kdeinit: kwrited
    root 3242 3142 0 00:15 ? 00:00:00 pam-panel-icon
    root 3243 3142 3 00:15 ? 00:00:01 /usr/bin/python /usr/bin/rhn-app
    root 3244 3142 1 00:15 ? 00:00:00 eggcups
    root 3247 1 2 00:15 ? 00:00:00 kalarmd --login
    root 3249 3242 0 00:15 ? 00:00:00 /sbin/pam_timestamp_check -d roo
    root 3251 1 0 00:15 ? 00:00:00 /usr/libexec/gconfd-2 12
    root 3252 3142 29 00:15 ? 00:00:05 /usr/lib/mozilla-1.2.1/mozilla-b
    root 3265 3142 8 00:15 ? 00:00:01 kdeinit: konsole
    root 3267 3265 1 00:15 pts/1 00:00:00 /bin/bash
    root 3312 3267 0 00:16 pts/1 00:00:00 ps -ef
  • billcatbillcat Join Date: 2002-11-02 Member: 4903Members, Constellation
    notice all that kde crap in your ps output? yep, you are still running KDE. You need to use the logout feature to get all the way out of KDE. Try CTL-ALT-BACKSPACE to hard kill xwindows. The key here is NO GUI!! Use a standard console login and no GUI at all. Yes, we're no longer in MS land.

    I'd also shut down sendmail unless you're really doing mail on that desktop.
  • AeaAea Join Date: 2003-10-09 Member: 21552Members
    Um, KDE will just start over again if I shut it down, and when I try to hardkill GUI it turns off my pc :o
  • Pebbles-TPFPebbles-TPF Join Date: 2002-11-11 Member: 8237Members, Constellation
    <!--QuoteBegin--Aea+Oct 24 2003, 07:49 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Aea @ Oct 24 2003, 07:49 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Um, KDE will just start over again if I shut it down, and when I try to hardkill GUI it turns off my pc :o <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    How crucial is the information on the computer at the moment?

    I take it that when you installed it, you checked the "Start in GUI Mode" which is a pain.

    The "easiest" way is to re-install the machine. Otherwise there are some config files somewhere that control whether KDE starts up or you are left in console mode.

    I can't remember off hand where they are, so it may be easier for you to tar and gzip your HLDS files, transfer them to your other computer, and then re-install Linux, then transfer them back.

    <i>Pebbs</i>
  • billcatbillcat Join Date: 2002-11-02 Member: 4903Members, Constellation
    While you're at it, try another distro of linux that isn't quite so bloated. Suggestions here are slackware, debian, suse.
  • AeaAea Join Date: 2003-10-09 Member: 21552Members
    edited October 2003
    Reinstall isn't an option now, I have a match in 2 hours and 30 minutes, and if anybody knows the location, please tell me <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->

    <b>w00t! Didn't need any more optimization, most people pinged under 200 anyway <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo--></b>
  • OrgazmoOrgazmo Join Date: 2003-10-25 Member: 21921Members, Constellation
    Ok depending on your distro you can disable booting into X-windows

    If you are in X and want to disable it simpely press CTRL + ALT + F1 and log in as root. then use a
    <!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1--> kill <pid> <!--c2--></td></tr></table><span class='postcolor'><!--ec2--> where <pid> is the pid of your X server

    root 3035 3034 3 00:14 ? 00:00:02 /usr/X11R6/bin/X -auth /var/g

    in this case 3035, BEWARE this numberg changes everytime X is restarted
    if you really want to hard kill the X server use a <!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->kill -9 <pid><!--c2--></td></tr></table><span class='postcolor'><!--ec2-->

    If you tell me what distro you are using i can tell you how to remove all the other crap including sendmail, cups and rpc services
  • biomassbiomass Join Date: 2003-03-15 Member: 14535Members, Constellation
    edited October 2003
    If you don't care about X at all you can change the following to boot into console mode instead of the graphical interface. What you need to do is edit a file called /etc/inittab as root. You should find a line there that says
    <!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->id:5:initdefault:<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->
    If you change the 5 to a 3 you will make the computer boot into console mode (runlevel 3), you will also see the different numbers you can use described in the inittab file. Hardly anything but 5 and 3 and 1 are used.

    It is also possible to manually trigger this while logged in as root byt typing 'init 3' in a console window if you are in the graphical interface mode.

    It seems that you are running redhat, is that so ?

    If so you can use the chkconfig command to list which services are run at each runlevel and enable/disable them from there.
    A printout of 'chkconfig --list' would be more helpful than a ps output actually.

    and don't listen to people telling you to reinstall, it should not be necessary. =)
  • AeaAea Join Date: 2003-10-09 Member: 21552Members
    <!--QuoteBegin--Orgazmo+Oct 25 2003, 05:46 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Orgazmo @ Oct 25 2003, 05:46 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Ok depending on your distro you can disable booting into X-windows

    If you are in X and want to disable it simpely press CTRL + ALT + F1 and log in as root. then use a
    <!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1--> kill <pid> <!--c2--></td></tr></table><span class='postcolor'><!--ec2--> where <pid> is the pid of your X server

    root 3035 3034 3 00:14 ? 00:00:02 /usr/X11R6/bin/X -auth /var/g

    in this case 3035, BEWARE this numberg changes everytime X is restarted
    if you really want to hard kill the X server use a <!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->kill -9 <pid><!--c2--></td></tr></table><span class='postcolor'><!--ec2-->

    If you tell me what distro you are using i can tell you how to remove all the other crap including sendmail, cups and rpc services <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    Thanks, I got into console killed the unnecessary services, and it faster <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo-->
  • OldSamOldSam Join Date: 2003-10-30 Member: 22133Members
    Hi,

    I think the best way for you is just simply start your linux-system with "init 3" as a kernel-parameter this will start in console mode with network but without gui. So in your lilo or grub there is normally a menu entry like "linux" or something, this word "linux" is written at a boot-command-line below the menu.. Just write init 3 behind this, so you got "linux init 3".
    Of course the other way is to disable xdm, kdm so X won't automatically restart if you kill it <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif'><!--endemo-->

    Greetz
    OldSam
  • cracker_jackmaccracker_jackmac Join Date: 2002-11-04 Member: 6891Members, Constellation, Reinforced - Shadow
    Jsut edit the /etc/inittab file


    there is a line called default run level...its set at 5 right now, set it to 3 (could be set to 4, they keep changing it)
Sign In or Register to comment.