Tuning A FreeBSD Box For High Performance
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."
BSD might be dead but Nietzsche is more dead.
Your calculations of marketshare based on usenet posting are poor reasoning. It doesn't take kreskin to see that you're 16 years old and haven't learned to fake a decent argument.
Such is the way of the BSD FUDer.....repeat the lie over and over, and hope someone believes it.
Maybe in the next release we can ask them to do: /kreskin/ && message =~ /bsd is dying/) {
if (message =~
drop_message_into_flaming_pit();
}
the world would be a better place.
"question = (to) ? be : !be;" --Shakespeare
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!
"question = (to) ? be : !be;" --Shakespeare
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?
There isn't much like the scent of a fresh harddisk
I don't want to start a FreeBSD vs Linux battle. I get enough of that from some of the people I know. But I have to admit that after using several Linux distros and using FreeBSD, the choice (for me) was quite clear. That's not to say I didn't like some of the Linux distros I tried. Not at all. I really liked Storm and I fully intend to install either Debian or Slackware on an IBM I have sitting in the corner. But when it came time to choose a system of the many I tried to run my web-server off of, I had to settle on FreeBSD.
At first I was a little wery about going with something slightly less mainstream than Linux, but good Linux binary compatibility (not to mention the Ports Collection) was a plus that won me over to FreeBSD.
With FreeBSD the first few days were really rough because there were several major annoyances I had, and none of my Linux friends had any useful insight. But I quickly solved most of my problems on my own. I feel I have learned much more this way. Plus, when I needed quick answers, web-searches almost always provided immediate and exact answers because there is only one FreeBSD and many other users have experienced the exact same problems.
It's something of a shame that Storm went the way of the wind, but after I made my choice to run FreeBSD it hasn't mattered too much. As for my soon-to-be Linux system, that just shows that I'm not knocking Linux at all (how could I?) it's just that I made the choice based on my needs and what I like. I personally don't feel I was moving forward fast enough with any of the Linux distros, but I felt comfortable with FreeBSD very quickly.
Yup....
/. articles. Anyways.....
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
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.
It isn't a lie if you belive it.
What is speedy on a low end box is not using the hardware on a beffy box. What works well on a box with lots of RAM and modern fast CPU probably would'nt boot on a 386 with 8MB.
An optimization that works on 95% of the hardware out there can mean that it isw impossible to install the system on the remaining 5%.
The demands on the system is very different if you want to run a shellbox, a database server, news, mail or http server or a firewall. So how should the install program know what you want to do with your new machine?
The power of UNIX is that it does not believe in one-size-fits-all but instead lets the sysadmin tune the system so it is optimal for every situation.
Linux faces a bleak future. In fact there may be no future at all for Linux because Linux is dying. Things are looking very bad for Linux. As many of us are already aware, Linux continues to lose market share; red ink flows like a river of blood. Slackware Linux is perhaps the most in endangered. Let's look at the numbers.
9 5638,00.html)
0 3-22-010-20-PS)
/ 03/05/daily41.html)
9 5638,00.html)
/ 1720254&mode=nocomment)
MandrakeSoft's CEO Henri Poole states that there are 70000 users of Linux-Mandrake. How many users of Debian GNU/Linux are there? Let's see. The number of Linux-Mandrake versus GNU/Linux posts on Usenet is roughly in ratio of 5 to 1. The refore there are about 70000/5 = 14000 GNU/Linux users. Slackware posts on Usenet are about half of the volume of GNU/Linux posts. Therefore there are about 7000 users of Slackware. A recent article put RedHat Linux at about 80 percent of the Linux market. Therefore there are (70000+14000+7000)*4 = 364000 RedHat Linux users. This is consistent with the number of RedHat Linux Usenet posts.
Now Linux companies are consolidating, overhauling their business plans, laying off staff, scaling back expansion plans and pushing back profitability schedules. "It would seem there are too many distributions for the market to bear," said Gartner analyst Tom Henkel. (http://www.zdnet.com/zdnn/stories/news/0,4586,26
Red Hat, Inc., the leader in developing deploying and managing open source linux solutions, announced on a reported basis, a net loss of $24.2 million. (http://linuxtoday.com/news_story.php3?ltsn=2001-
Turbolinux, based in Brisbane, Calif., a Linux-based software provider has withdrawn a $60 million initial public offering "in light of current market conditions." (http://biz.yahoo.com/rf/010320/n20215287_2.html) (http://cnnfn.cnn.com/2001/03/20/deals/ipo/)
Clayton-based Linuxgruven.com, a Linux training and service company with 106 employees, laid off 100 employees (http://stlouis.bcentral.com/stlouis/stories/2001
Lineo withdrew its initial public offering in January. Caldera Systems delayed the acquisition of Santa Cruz Operations' Unix software by a quarter. Linuxcare laid off dozens in February, with Linuxcare co-founders Dave Sifry and Dave LaDuke are among those departing. VA Linux Systems cut 114 people in February and delayed its expected profitability by nine months. (http://www.zdnet.com/zdnn/stories/news/0,4586,26
Due to the troubles of Corel, abysmal sales and so on, Corel Linux is going out of business and was nearly taken over by Microsoft who sell another troubled OS. Owing to the GPL, SuSE is laying off almost all of its US staff. Major marketing surveys show that Linux has steadily declined in market share. Even LinuxWorld.com shut down "because of the economy and everything else" (http://www.newsforge.com/article.pl?sid=01/03/13
Linux is very sick and its long term survival prospects are very dim. If Linux is to survive at all it will be among OS hobbyists (i.e. those who dabble with Minix, Xinu, etc). Linux continues to falter. Nothing short of a miracle could save it at this point in time. For all practical purposes, Linux is 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!
Conformity is the jailer of freedom and enemy of growth. -JFK