Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
BSD Operating Systems

Tuning A FreeBSD Box For High Performance 36

flynn_nrg writes: "www.daemonnews.org has an interesting article explaining how to fine tune your FreeBSD for maximum performance. In it's default state, a FreeBSD box is tuned for stability and reliability, but more often that not you want to get the most out of you BSD box, specially web servers. Nice article if you ask me."
This discussion has been archived. No new comments can be posted.

Tuning A FreeBSD Box For High Performance

Comments Filter:
  • Maybe in the next release we can ask them to do:
    if (message =~ /kreskin/ && message =~ /bsd is dying/) {
    drop_message_into_flaming_pit();
    }

    the world would be a better place.
  • man 7 tuning (Score:2, Informative)

    by wd123 ( 209211 )
    On modern (4.3+) FreeBSD systems, the tuning(7) manpage is chock-full of fascinating information about system tuning. This brief article seems to have gleamed the most important bits out of it and presented them in an executive summary form, however, if you are a real performance-squeaker, I recommend going through all of tuning(7).

    In general, section 7 of the manpages is full of interesting reads. You can get a list of available section 7 pages with:
    $ apropos 7 | egrep -v '^.+\([12345689]\)'

    Read and enjoy!
  • If people more often than not want a speedy system than a stable one, why not just tune it for speed? or find a nice in between?
    • I believe some of it is on by default now. For example, I think softupdates is on by default as of 4.3.

      For the rest, I have /etc/sysctl.conf. Here is mine:

      # Configure logging.
      kern.logsigexit=0 # Do not log fatal signal exits (e.g. sig 11)

      # Kernel performance tweaks.
      kern.ipc.maxsockbuf=1048576
      kern.ipc.somaxconn=4096
      kern.maxfiles=65536

      # Network performance tweaks.
      net.inet.tcp.recvspace=65536
      net.inet.tcp.sendspace=65536

      # File system performance tweaks.
      vfs.vmiodirenable=1

      As a developer, I do not need to be reminded (kern.logsigexit) of all my programs crashing. ;)
    • Well, while having some speed enhancements isn't bad, I like the fact that it's "stable" out of the box. Considering that I use it on large, beefy boxen, I'd prefer stability over mindboggling speed, only because I like things to always work, vs. having spectacular crashes or the like :)

      I think it's better off left for individuals to tweak, since the average joe blow doesn't necessarily know how to and thusly won't hurt themselves with a stock system. FreeBSD is mostly a server class OS, and I like it that way; sometimes you sacrifice some speed for stability.

      of course if you can get both, then it's best!
  • Yup....

    As a person who's first love was Linux, I feel qualified to commment on the reasons to migrate away from Linux. I started with Slackware in 97 from a cd in the back of my html book, basically a cheap way to get apache running without having to own an expensive risc machine. Anyways, I've toiled with linux thru the early hacker/academic days, thru the hype-days from 98 to 99, and still every-now-and-then install it for a friend in need. I've probably install Redhat over 100+ times at the Linux Users Group here in Dallas, and have installed Slackware upwards of 50+ times, Deb/suse/others upwards of 20+ each. Inversly, I've probably installed FreeBSD only a few times since I toned-down my OS-install fever. It gets old, really fast installing linux for the install project. Anyways.... as a seasoned Finux vet, I think that FreeBSD is better in many ways, except the userbase, and application base. There are more Finux users, and more Finux developers by several orders of magnitude compared to all the BSD distro's combined.

    What I have noticed from this large group of Finux users is the fact that they are overtly insecure about their feelings of "elite-ness". In other words they tend to feel threatened by people who donn't join their band-wagon.... of finux evangelism. In fact, such a large majority of Finux userrs started using Finux simply because they percieve that Microsoft is a Monopoly, and or in some way they have negative feelings about microsoft. Other time sI find that they had feelings of inadiqatcies in their microsoft envrironment, and seeked an area where they are different.... again thsi goes back into the elitism aspect, and the need thereof to be elite, and/or different. In this wway they can justify putting Microsoft users down, by advertising that they are now Finux users.

    The above being said, leads this very specific class of Finux users feelings insecure when they hear about an even more elite group of people, a smaller comunity, of more-often ex-finux users..... using something called BSD. The typical reactio is that they are not with us, therefor against us... type reaction... and the hostility, and missunderstandings ensue.

    Most anti-BSD rehtoric posted on Slashdot is from the narrow minded Group of finux users taht simply feel threatened by something they simply don't understand. My Favorite argument to shootdown first is the hords of Finux folks, and windows folks that say Unix is 20 years old! Ha... 20 years ago unix was entirly different, and FreeBSD, compared to some old Unix systems of the 80's is like HUGE in all the different ways. Most of the time people have read this in some website, from an un-educated reporter. In reality, unix has had many huge changes over the years, as have os design and implementation over the years.... a direct result of CS students striving to push the limits. The word micro-kernel comes to mind, yes.. we now have modulare kernels too.... oh my... and don't forget about ever popular virtual memory idea... geeze... Unix sure is darn different that it was 20 years ago.

    The fact is, and I can do a google search I find the Linus quote of how he would nto have ever created the Linux kernel if he had know about the Berkly System Dist. He was only aware of the Car-mellon like Minux system. Yup, he has said it, and you can find the quote on google, and past /. articles. Anyways.....

    I find taht most of the FreeBSD folsk are people tired of all the Linux hype.... I mean... we have tried all the distro's, played with all the various package systems, recompiled the finux kernel a time or two... doen some programming, etc, etc, etc..... Then, its liek FreeBSd is sitting right there, simple, eligant, beutiful. The first thing that most linux converts claim got them is the FreeBSD ports system. Really it is such a simple idea that we are suprised it hasn't caught on in the Finux world originally. Basically you have a cvs tree of all the software taht has been ported to the FreeBSD OS. To get updated versions of software, it is simple to just cvsup the entire ports collections, and then travel to the the software you want...say apache, and run "make install". Simpel as that... the latest, greated Apache with all the freebsd patches, and optimisatiosn are applied. No toiling with rpms, and the dreaded hunt for dependencies. The porsts systems checks for dependencies, downloading the latest version of Gmake if needed, or whatnot.

    Other nice fetures about FreeBSD, and the other bsd's is taht the stability is paramount... a recent comparison of Unixes on sys admin magazine ranked FreeBSD the lowest of "out-of-the-box" installs for performance. Thsi is nto suprising since FreeBSD is build for stability (out-of the box), and many Finux distro's are optimised at the time of burnign the distro to CDROm, is highly optimised, and unstable.... so little tweaks are needed out of the box to make the system unstable... in other worlds the Finux systsm typically are more prone to instability under heavy loads that freeBSD. I won't bore you with teh technical details, as the lay-man won't get the jist of what I'm sayigng.

    That being said... I'd advise the person who wrote the high-performance tuning guide, linked inthe article, to tone down a bit his kernel conf. It appeas to lean on the unstable side, especially with the extreamly high buffs lines under the useers line in the kern conf. oh well... it will push things to the extream limit.

    • Hmmm, I started Freenix (my name for any free Unix-like implementation) with Slackware-96, so I've got you beat by one year :-)

      But I learned computing on 4.1BSD UNIX. Using FreeBSD is like coming back home. It's simple, elegant but still complete and packed to the brim with everything you could possibly want.

      p.s. Linus did now about 386BSD, and was interested in it (like most hackers a decade ago). Unfortunately that was during the time of the AT&T lawsuit, which was why Linus stayed away. No one new if it was going to be around the following week. Timing is everything in this business.
    • You don't need to be a Kreskin to predict the future of *BSD-is-dead posts. The hand writing is on the wall: *BSD-is-dead posts face a bleak future. In fact there won't be any future at all for *BSD-is-dead posts because *BSD-is-dead posts are dying. Things are looking very bad for *BSD-is-dead posts. As many of us are already aware, *BSD-is-dead posts continues to lose posting share. Red ink flows like a river of blood. FreeBSD-is-dead is the most endangered of them all.

      Let's keep to the facts and look at the numbers.

      *BSD-is-dead leader Anonymous Coward states that there are 50 posters of HotGritsDownMyPants. How many posters of PortmanPetrifiedAndNaked are there? Let's see. The number of HotGritsDownMyPants posts versus PortmanPetrifiedAndNaked posts on Slashdork is roughly in ratio of 5 to 1. Therefore there are about 50/5 = 10 PortmanPetrifiedAndNaked posts. A recent article put *BSD-is-dead at about 80 percent of the troll market. Therefore there are (50+10)*4 = 240 *BSD-is-dead-posters. This is consistent with the number of *BSD-is-dead posts.

      All major surveys show that *BSD-is-dead posts have steadily declined in market share. *BSD-is-dead posters are very sick and their long term survival prospects are very dim. If *BSD-is-dead posters are to survive at all it will be by remaining the anonymous cowards that they are. *BSD-is-dead posters continue to decay. Their teeth are falling out. They fail to bathe. Nothing short of a miracle could get them laid at this point in time. They do not contribute to the gene pool. For all practical purposes, *BSD-is-dead posters are dead.
  • BSD is NOT dying!

    Mr. Praline : 'Ello. I wish to register a complaint.

    (The owner has his back to the register and does not respond.)

    Mr. Praline : 'Ello, Miss?

    Owner : (turning around, very angry) What do you mean, "miss"?

    Mr. Praline : I'm sorry, I have a cold.

    (The owner nods, understanding.)

    Mr. Praline : I wish to make a complaint!

    Owner : (hurriedly) Sorry, we're closin' for lunch...!

    Mr. Praline : Never mind that, my lad. I wish to complain about this OS, what I purchased not half an hour ago from this very boutique.

    Owner : Oh yes, the, ah, the FreeBSD... What's, ah... W-what's wrong with it?

    Mr. Praline : I'll tell you what's wrong with it, my lad. It's dead, that's what's wrong with it.

    Owner : No, no, 'e's ah... he's resting.

    Mr. Praline : Look, matey, I know a dead OS when I see one, and I'm looking at one right now.

    Owner : No no, h-he's not dead, he's, he's restin'!

    Mr. Praline : Restin'?

    Owner : Y-yeah, restin.' Remarkable OS, the FreeBSD, isn't it, eh? Beautiful command line!

    Mr. Praline : The command line don't enter into it. It's stone dead!

    Owner : Nononono, no, no! 'E's resting!

    Mr. Praline : All right then, if he's resting, I'll wake him up!

    (shouting at the system tower)

    'Ello, Demon! Mister Demon OS! I've got a lovely fresh OC-3 for you if you wake up, Mr. Demon OS...

    (owner hits the monitor)

    Owner : There, he moved!

    Mr. Praline : No, he didn't, that was you pushing the monitor!

    Owner : I never!!

    Mr. Praline : Yes, you did!

    Owner : I never, never....

    (He pulls the hard disk out of the box and screams into it.)

    Mr. Praline : 'ELLO DEEEEEEMMMOOONN BEEE-ESSSSS-DEEEEE! DEMON OS! WAKE UP!

    (He bangs the disk against the store counter, horribly hard.)

    TESTIIIING! TESTIIIING! THIS IS YOUR NINE-O' CLOCK ALARM CALL!

    (He does it again, harder.)

    BEEE-ESSSSS-DEEEEE!

    (He tosses it up in the air and watches it plummet to the floor. Longish pause.)

    Now that's what I call a dead OS.

    Owner : No, no.... No, he's stunned.

    Mr. Praline : STUNNED?

    Owner : Yeah! You stunned him, just as he was wakin' up! FreeBSDs stun easily, major.

    Mr. Praline : Look my lad, I've had just about enough of this. That OS is definitely deceased, and when I bought it not half an hour ago, you assured me that its total lack of market share was due to it being tired and shagged out after a long download.

    Owner : Well, he's... he's, ah... probably pining for the fjords.

    (Praline looks angrily back and forth, stuttering.)

    Mr. Praline : PININ' for the FJORDS? What kind of talk is that? Look, why did he fall flat on his back the moment I got 'im home?

    Owner : The FreeBSD prefers kippin' on its back! Remarkable OS, isn't it, guv, eh? Lovely command line!

    Mr. Praline : (coldly) Look, I took the liberty of examining that OS when I got it home, and I discovered the only reason that it had been sitting on the hard disk in the first place was that it had been WRITE PROTECTED there.

    (pause)

    Owner : Well, of course it was write protected there! If I hadn't write protected that OS down, it would have nuzzled up to the ethernet card, hacked its way out with its little trident, and VOOM!

    Mr. Praline : "VOOM?"

    (Praline puts the system down and take the hard disk into his hands.)

    Mr. Praline : Look matey, this OS wouldn't "voom" if you put four thousand volts through it! It's bleedin' demised!

    Owner : It's not! I-It's pining!

    Mr. Praline : It's not pinin,' it's passed on! This OS is no more! It has ceased to be! It's expired and gone to meet its maker! This is a late OS! It's a stiff! Bereft of life, it rests in peace! If you hadn't write protected him to the disk he would be pushing up the daisies! Its active processes are of interest only to historians! It's hopped the twig! It's shuffled off this mortal coil! It's run down the curtain and joined the choir invisible! This.... is an EX-OS!

    (pause)

    Owner : Well, I'd better replace it, then.

    -------------

    Sorry folks. Couldn't resist! ;)

"Tell the truth and run." -- Yugoslav proverb

Working...