OpenBSD Journal

Speeding things up on the desktop....

Contributed by jose on from the performance dept.

Josh asks:
"Ok. Here is the deal. I recently installed a copy of Red Hat 8.0 onto my workstation computer, simply for because I could. I was astonished to find out how much faster X Windows, as well as Red Hats bloated bluecurve desktop environment ran on my computer, as compared to how X Windows and fluxbox window manager ran when running OpenBSD."

"Mozilla ran faster, xmms played smoother, it was like two completly different worlds. Now, after feeling guilty about running RedHat on my workstation for more than a week, I am on a pursuit to find tips/hints and solutions to speed up OpenBSD for X Windows, and more generalized everyday web browsing/audio-video usuage. My question to the OBSD Journal viewers, is what tips and tricks does everyone use and implement to make OBSD work better on the desktop?

For the record, my workstation computer is:

MSI KT3 Ultra Mobo
AMD XP 1800+
256 Megs DDR333 RAM
Maxtor 7200 RPM 30 GIG UDMA133
Nvidia TNT2 M64 32 Meg AGP 4X
Sound Blaster Live! X-Gamer"

Personally, I haven't had any troubles getting my OpenBSD laptops to run smoothly, but I'm not pushing the limits (or maybe I just don't know any better). Any advice from the community on this one?

(Comments are closed)


Comments
  1. Comments
    1. By aki () on

      RH8 --> gcc 3.2
      3.2 --> gcc 2.9.5.x

  2. By jolan () on

    Mozilla ran faster, xmms played smoother

    As for xmms, the linux sblive driver is a bit better and also does not use sun audio output. (Ever noticed how xmms segfaults if you try to play audio while the card is in use? :))

    I have similar hardware to yours:

    MSI KT3 Ultra Mobo
    AMD XP 1500+
    512 MB DDR266 RAM
    Maxtor 7200 RPM 30 GIG UDMA100
    Nvidia Geforce2 MX/400 64MB
    Sound Blaster Live! Value

    I've never run Linux on my system, but I did notice a bit of difference when I tried FreeBSD & NetBSD. I attributed it (at least partially) to UBC and then put OpenBSD back on my system. I'm not really sure what kind of tips/tricks there are specifically for enhancing X performance.

    You might want to try the UBC branch.




  3. By Anonymous Coward () on

    It's X Window (System) not X Windows :-)

    Comments
    1. By Anonymous Coward () on

      Thank you so much for reminding us once again. So... what's this OpenBDS anyway--mmm?

      Comments
      1. By Anonymous Coward () on

        uhm.. something with BlueDenialofService...? ;-)

    2. By Grumpy Grammar () on

      No, it's "XWindows". There is the "official" name for things, and the "ad hoc" name. If this posting was an official business document of some sort, you'd be expect to use the correct terminology when referring to trademarks and copyrights.

      During informal discussions like this, it is customary to refer to such technology in a more informal way.

      "XWindows" or "X Windows" is understood by most, if not all, of the readers here.

      Comments
      1. By Anonymous Coward () on

        Honestly I cannot disagree with your posting. But:
        - do you think "X Window" or "X Window System" would not have been understood my most readers?
        - it has a reason it is not called "X Windows". It is not just fun, or law, or whatever. It is so that people don't believe it has much to do with the best known Windows - Microsoft Windows (probably not many of the readers would have thought that anyway, still I think one should try to use the correct terms - even for informal discussion)

        I do not want to say it is that important and I do not want to seem like Richard Stallman with his Linux vs. GNU/Linux paranoia (if you allow me to bring this example) - it simply came to my mind and since I could not contribute in any other way I thought I could point that out.

        Regards
        AC

  4. By Anonymous Coward () on

    what benchmarks did you run when comparing the two? let us see the benchmark results and this will help diagnose where the slowdowns you experience are.

    Comments
    1. By BSD fan () on

      He doesn't have to run any benchamrs, come on. The guy USED the thing, and there is no better benchmark than this. The *desktop experience* and multimedia experience seems to be better under Red Hat 8 for him. For him that is fact, and instead of being an disbeliefed asshole, go and do some code to make OpenBSD as good.

      BTW, it might have to do with the fact that Red Hat 8 is compiled with GCC 3.1 which creates fast output.

      Comments
      1. By Anonymous Coward () on

        benchmarks are important for two reasons.
        one, when i'm hungover on sundays my concept of speed is a lot different than in the middle of the week.
        two, with benchmarks we know what part of the system is actually causing problems, whether it be disk, memory, network, X, etc. in this case perhaps file system differences, network drivers, X drivers, could be different between the platforms.
        this guy comes asking for help, how can we w/o some factual evidence? w/ benchmarks we can say, oh your network is slow, that nic has performance problems in OpenBSD, etc etc. instead ppl are shooting into the dark w/ softdep hints and Nvidia driver hints, and gcc differences. if this guy goes and tries the hints, they dont work, he gets discouraged, all b/c we couldnt appropriately troubleshoot since we dont have good benchmarks.

        BTW lurn spalling and grammer if you're going to insult, ok?

      2. By Shane J Pearson () on

        He doesn't have to run any benchamrs, come on. The guy USED the thing, and there is no better benchmark than this.

        Benchmarks can be good to pinpoint where a system needs to be tweaked.

        For him that is fact, and instead of being an disbeliefed asshole

        Configuration options can often make much bigger differences than more efficient code.

        DMA vs PIO.
        AGP 1x vs AGP 4x.
        process priorities.
        correct driver usage (eg. frame buffer vs accelerated).
        interleaved filesystems and swap across multiple disks.
        creative use of mfs.
        well thought out partitioning schemes.
        softupdates.
        increased cache size settings.

        A benchmark could also pinpoint a slow driver, leading to a better driver.

      3. By BSD Fanless () on

        Benchamrs! We don't need no steenking benchamrs.

    2. By Mr Stopwatch () on

      There are lots of benchmarking tests that are easily available on a default OpenBSD install: general processor speed
      md5 -t
      sha1 -t
      openssl speed

      X performance
      x11perf
      x11perfcomp

      then, as long as the SAME benchmark is available in Linux, you have an apples to apples comparison. I don't use Linux, so I don't know about the -t tests, but I would hope that x11perf would be included.
      And as said elsewhere, security comes first, but performance increases without harming the rock-solid stability or security would be good.

    3. By Anonymous Coward () on

      There are simple methods to determine network performance. My choice for quick and dirty:

      enable the ftp server on one OpenBSD test box
      ftp from your test box, with some files that take at least 12 seconds.
      ftp> get junk /dev/null (eliminates disk i/o on one side)
      the ftp client gives great rates, while on a windows client it is :
      ftp> get junk nul ( to eliminate the disk i/o on the receiver side.)

      of course ttcp (in ports) rocks for pure network bandwidth testing.

      using ftp is a simple way to check for duplex mismatches. when you can ftp a file one direction and get 3Megabytes/sec and the other direction gets 50K Bytes/sec, you know to look right away at the duplex settings, either setting them to auto-negotiate, or hard coding, depending on the NIC and switch.

  5. By RC () on

    I really can't imagine why you might think OpenBSD is slower. I've run a lot of operating systems, and have to say that OpenBSD is better than most, and pretty near the top competitors in performance.

    Perhaps you run a lot of memory-intensive applications and you have swap-encrypt enabled? Maybe you haven't enabled soft-updates?

    And let's not even discuss Mozilla. For one thing, Mozilla only (barely) works on OpenBSD when statically compiled. AFAIK, it does not work on OBSD if you enable optomizations. Mozilla is not exactly cross-platform, so on FreeBSD, Mozila 1.0 used up more than 1/3 the resources as the Linux version; perhaps little effort has gone into optomizing Mozilla on OpenBSD. Another issue is the developing status of Mozilla. The speed improvements have been significant as of every release since 1.0. Perhaps you are using a slightly older version on OpenBSD than Linux.

    Comments
    1. By RC () on

      Allow me to correct myself...

      on FreeBSD, Mozila 1.0 used up more than 3 times the resources as the Linux version

      Comments
      1. By Anonymous Coward () on

        galeon (Mozilla derivative) is occupying 46M virtual memory right about now on FreeBSD. If you could make it smaller without chaning performance, I'd like to know what you know. Wish work would continue on dillo. The part that's functional runs about as well as mozilla and takes much less space. Mozilla gives C++ and long established OO paradigms a bad rap.

    2. By Anonymous Coward () on

      Speaking of mozilla, has anyone gotten phoenix to work under OpenBSD?

      Comments
      1. By Anonymous Coward () on

        I've tried building it out of cvs, and the build goes fine, but the binary doesn't run. I haven't tried playing with build options very much, so it's conceivable that it could be made to work. However, it takes so long to build on my K6-3 450 that I just don't have time to test it very much. I encourage others to give it a shot and report on their attempts. Also, I'm still running 3.1, so maybe it would work better under 3.2.

      2. By RC () on

        I've never figured out the draw of Phoenix. It's slower, uses up more memory, and the interface needs some work IMHO. Anyone care to elaborate?

        Comments
        1. By Anonymous Coward () on

          dude, phoenix was _made_ to reduce memory usage, and to make everything faster...and so it does, with me anyway

          Comments
          1. By Anonymous Coward () on

            On freebsd, it's about as bad as mozilla.

            Comments
            1. By Anonymous Coward () on

              Windows port works great. The speed difference between Internet Explorer and Phoenix on Windows 2000 is negligible.

              Comments
              1. By Anonymous Coward () on

                Here's my experience:

                I find Phoenix is a hair faster than IE, and WAY faster then Moz. I find that Phoenix & Moz use just about the same resources. All on 2000. YMMV.

    3. By Anonymous Coward () on

      But what kind of system hardware are you using?

      On the numerous systems I've run it on, OpenBSD has been significantly slower than FreeBSD or any flavor of Linux... ALWAYS...

      OpenBSD's good for security, but it has a long, long way to go to be at the head of the performance pack...

    4. By Anonymous Coward () on

      Yes, harumpf!, it's impossible, ha-rumpf! Total nonsense! Old chap's eyes must be playing tricks on him!

      Or it could be some sort of misconfiguration. Maybe an overflowing /var partition, that sort of thing.

  6. By Marten () on

    It sounds like you have problem with X driver under openbsd.

    And really, mozilla isn't even remotely fair to use a benchmark. It's miracle to even get working never mind actually benchmarking on openbsd.


  7. By Josh () selerius@codefusion.org on http://www.codefusion.org

    I will be installing OpenBSD 3.2 -stable back on the workstation this evening. I am going to do some more research on UBC, and reading some stuff on soft updates.

  8. By tedu () on

    Are you using the NVIDIA drivers on linux? They will almost certainly perform way better than the Xfree86 ones on OpenBSD.

    another tip:
    renice xmms to -4 or something. Or use another player. xmms uses threads, which probably aren't as smoothly implemented on OpenBSD. I've certainly seen xmms spew messages about failed thread assertions from time to time when I close it on OpenBSD. But reniceing it slightly will ensure it doesn't skip as much.

    Comments
    1. By Anonymous Coward () on

      i run xmms on my p700 laptop w/ 128mb of ram ... haven't experienced any skipping at all. (not even while ripping/encoding some cds to mp3s.)

      Comments
      1. By Anonymous Coward () on

        same here; xmms running on a p3-850/256m ram running 3.1-current, while encoding a movie (mencoder), and tgz'ing a backup (woohoo, just got my 3.2-cd's, so I'm getting ready to do a clean install of 3.2 :) ).
        Not a single skip to be heard... load avg peaking to about 4 now, <2% idle cpu time, but still everything goes smooth; mouse is responsive, apps respond without delay, apart from my hdd-led flickering like hell, I wouldn't notice I'm putting quite some load on this machine ;)
        I'm very satisfied with OpenBSD's desktop performance. True, KDE isn't that smooth, but I doubt that's OpenBSD's fault; KDE is just a hog. I rather have less eye-candy and more speed :) (eg. blackbox)

  9. By hettb () htb@subdimension.com on mailto:htb@subdimension.com

    Why even try to make things run faster? It's hopeless!

    Let me tell you: BSD is dying! And OpenBSD is already dead and decaying. Keep that RedHat installation, or even better, install Windows XP. Just my $0.02.

    Comments
    1. By Anonymous Coward () on

      i'd rather cut my cock off than use xp again. i mean it took me 40 mins to deconfigure all the shit.

      Comments
      1. By Anonymous Coward () on

        Then you must be a real idiot.

        Comments
        1. By Anonymous Coward () on

          FOAD

        2. By Casey Jones () cajones@datafast.net.au on mailto:cajones@datafast.net.au

          Hang on a minute guys?

          What do you use open BSD for as say compared to XP or Win9x in general.

          The BSD's in my opinion excell in server roles but if you want to play the latest and "greatest! games as everyone will ask me when I find them a second hand computer. win9x will win in that aspect I think the free gnu community forget that not everyone wants to run a web sever or email server. "Fuck if they could only port a version of OSX to an Intel platform". I can't afford $4000
          for a version of unix. I'd drop the Microsoft global policy altogether.

      2. By Gill Bates () on

        i'd rather cut my cock off than use xp again.

        My preference to using XP, is masturbating with a handful of rusty razorblades.

        It's less painful and you have to give less blood.

      3. By Ow! My Sperm! () on

        Actually, if you read the EULA for Windows XP, you _have_ to cut your cock off after a week of using it, or it stops working (XP, not your cock [though the two may fail coincidently]).

        I've heard of a registry hack that allows you to get by with just a circumcision, but you run the danger of a complete penectomy on every reinstall.

        Since a reinstall is probably necessary once every 2-3 months or so, most big-dick business folks are staying well-clear of Windows XP. Not to mention these folks will want to play by the book, and will have to choose an IT guy to have their penis removed. Talk about drawing the short straw!

        For this exact reason, XP is just not entprise-ready.

    2. By Anonymous Coward () on

      BSD dying hey? so why did you read this site?

    3. By Anonymous Coward () on

      That's a novelty. You use a BSD derivative (Solaris) indirectly everytime you use your ISP to visit any site. BSD sure is dead, yet you continue to take advantage of it.

      Comments
      1. By Anonymous Coward () on

        SunOS 4.x is BSD derivate. SunOS 5.x (Solaris 2.x) is SysV derivate.

        Comments
        1. By Anonymous Coward () on

          SunOS 5.x is SysV merged in with SunOS 4.x (BSD derivative)

    4. By Anonymous Coward () on

      Go fuck yourself slashdotter. You're not wanted here.

      Comments
      1. By Anonymous Coward () on

        amen

    5. By Steven () on

      Please don't feed the troll. If you feed it, it will come back and eventually become a nuisance. Then this rare creature will have to be put down to protect the general population.

      Btw, remember to have your troll spade or neutered.

  10. By Anonymous Coward () on

    I use xdm to start X, and I changed the file that contains the command to start the X server, /etc/X11/xdm/Xservers, to give X a higher priority. It has the line,
    ":0 local /usr/bin/nice -n -4 /usr/X11R6/bin/X vt05"

    I think it makes X slightly faster.

    Comments
    1. By Anonymous Coward () on

      I think you smoke crack.

      Comments
      1. By Dude! () on

        References to "smoking crack" are so 1990's, dude.

  11. By Anonymous Coward () on

    So run Redhat on your desktop then! OpenBSD runs my webserver, mail server, DNS and firewall machines exceedingly well, but Redhat runs great out of the box as my desktop.

    Don't use a screwdriver to drive in a nail.

    If you really want to persist, much of Redhat's responsiveness is likely due to its gcc-3.2 i686 optimised libc and kernel as well as their recent change to HZ=1000.

    I'd love to see HZ bumped up for OpenBSD, but just sticking this in my kconfig causes panics in the fxp driver.

    Comments
    1. By Anonymous Coward () on

      The Hz=1000 change between redhat 7.3 and 8.0 makes a huge difference to the responsive "feel" of X under redhat. You can check this by changing the Hz value in either distribution. I must admit to never having run X on OpenBSD but I would assume its similiar. If changing Hz on your OpenBSD box causes a panic, id be tempted to submit a bug report...

      Comments
      1. By Anonymous Coward () on

        Out of curiosity, where is this Hz=1000 setting, and what does it do??

        Comments
        1. By Bogomips! () on

          It increases the bogomips.

        2. By Anonymous Coward () on

          It increases the number of opportunities the kernel has to context switch (i.e switch from one process to another)

    2. By Anonymous Coward () on

      "Don't use a screwdriver to drive in a nail."

      Ahmen. OpenBSD is a great server OS for infrastructure, and it is a nice clean OS for writing C code on. (Pretty much the same with FreeBSD, but OpenBSD is cleaner.) Use RH or XP or whatever on the desktop, even OpenBSD. But I feel a lot more comfortable using OpenBSd in my infrastructure...

  12. By Marten () on

    It sounds like you have problem with X driver under openbsd.

    And really, mozilla isn't even remotely fair to use a benchmark. It's miracle to even get working never mind actually benchmarking on openbsd.


  13. By Anonymous Coward () on

    Linux has a much bigger user base, and increasing amounts of $$$ commercial backing. Sooner or later it will reach a degree of technical sophistication and tweaking that is beyond what the OpenBSD developers could hope to achieve. The playing field just isn't even. One the flip-side, I don't expect Linux will ever approach OpenBSD's security, and as long as OpenBSD's developers keep focus, they are going to have that niche sewn up. That said though, I haven't noticed any performance advantage in RH7.3 compared with OBSD3.X. I haven't tried RH8.0 though..

    Comments
    1. By Ray () rayl@spamcop.net on http://ray.cyth.net

      Wow, this sounds just like the "Why OpenBSD will never be as secure as Linux" and "Why Linux will never be as secure as OpenBSD" articles a while back.

  14. By Drewshkin () andrew@fabbro.org on mailto:andrew@fabbro.org

    Doesn't RedHat 8.0 include the low latency patch as part of the kernel it ships with? That might go some of the ways towards explaining a snappier desktop experience. I'd be curious to see if Blue Curve is slower with the low latency option turned off for the kernel compile (but not curious enough to install RH 8.0 and try it ;)

  15. By Anonymous Coward () on

    I've had OBSD installed as my primary computer OS for some months, when I started using it I did notice some speed difference between it and FreeBSD, not enough to keep me from using though.
    Having now installed Gentoo I was completely blown away by the speed difference. The machine is a Celeron 450 with 192 RAM, running kde3 on OBSD was sluggish as hell even with all the eye candy turned off. With Gentoo running kde3.1rc2 with some eye candy turned on it's not fast but suprisably usable. This probably has to do with using gcc3.2, everything compiled with optimizations and kernel patches. But it is a huge speed difference I can tell you. Probably RH8 is now using gcc3.x and some kernel patches to improve the desktop experience?

  16. By Josh () selerius@codefusion.org on http://www.codefusion.org

    I installed 3.2 last night. Enabled softupdates (after accidentally deleting my /etc/fstab..ack!) and there is a BIG speed improvement in the whole system. I haven't got X working yet, still been focusing on the console level stuff for now...not that much time to work on it.

    I will let everyone know how it goes once X is up and working..

  17. By In-a-godda-da-vita () on

    Interesting results. I'm always surprised at how different installs will vary so widely across pretty identical hardware.

    We have a bunch of generic PII-450's in our lab that we use to boot a various number of operating systems (with removable drives).

    One thing _we_ noticed was how dog-slow a default install of RH 8.0 was against a default install FreeBSD 4.4.x on the identical hardware (even the [reformatted] drive is the same model).

    Haven't tried OBSD on any of them, though we use it pretty heavily as mail server, spam filter, internal DNS &etc. No X on these boxes, though.

    I've actually never installed X or the X libs on an OBSD box. It's only a server/edge box to me. I got a fancy-pants Linux box and my Mac for a GUI. OpenBSD squeezes a lot of performance out of a Pentium-133 with 80 Mb of memory!

  18. By Anonymous Coward () on

    First of all, softupdates really are a given. I can't think of any reason why they are not turned by default (except in / ).

    If you really want to squeeze every last bit or performance out of open or any bsd. Remember, the x86 binaries are built using i386, who actually uses a 386 anymore? Try rebuilding from source with some basic optimizations like "-0 march=i686 -pipe". Also rebuild X from source, if you want to really push it you can try to build X using -02 or even -03. Trust me, just by building X with a pentiumpro march (i686) it will load about 25-35 percent faster. I've done this on every installation of net,free, and openbsd I've made, and yes I did take notes on times.

    Another thing to try if you have a lot of memory, is to tweak the "option BUFCACHEPERCENT=x" option when you build your kernel. I set this to 40 on my home machine which is running netbsd 1.6 and has 512mb memory. This does make a nice difference in the system's file read/write times.

    I do agree though that gcc 3.2 offers a very nice performance advantage esp. to c++ code. Whether this is worth it in the real world is yet to be determined, as 3.2 is still very much experimental as far as I am concerned. Also i beleive redhat employs their own hacked/tweaked version of gcc which does have its own share of shortcomings.

    Good luck!

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]