神勇的 FreeBSD
有位仁兄將原本的雙 P3 (跑 Linux) 換成雙 Xeon, 原本需要跑 17 小時的程式只要 5 個多小時就跑完了. 聽起來不賴,
但在好奇心的驅使下, 他將同樣的機器灌了 FreeBSD 跑同樣的程式, 結果令人驚訝的是, 在 FreeBSD 上只花 44
分鐘就跑完相同的程式 !
The beginning of the good news, for me at least. After installing
everything and running the previously mentioned process, there was
something very hard to believe. In the same box, with the exact same
hardware configuration:
Debian+linux 2.6.9 + raid tools + XFS + PostgreSQL 7.4.6 = 5 hours 30 minutes
FreeBSD 5.3 + gvinum + UFS2+S + PostgreSQL 7.4.6 = 44 minutes
Clearly there was something very wrong here.
There wasn't.
不知道是怎樣的程式 ? 也許跟 FS 有蠻大的關係..
Free Software in Corporate Environments
There
has been some adoption of free software lately at my current job. I'm
not talking about the servers running apache, postgresql, samba,
postfix, squid, etc. I'm talking about free software in everybody's
computer. Note that everybody (but me) is still using Windows, but
hopefully once they all use free software a migration to Linux will be
painless, since people use applications and not operating systems.
The first free software application used around was the most obvious:
Firefox. It started by word of mouth. It is faster, safer, smaller, it
blocks popups. People love it. Not everybody is using it but still,
it's an spontaneous move, nobody is forcing them to do it (there was a
squid rule for a couple of users with lots of spyware problems that
forced them to use firefox, but it's gone now).
Now the second move was an official one: OpenOffice.org. This is the
BIG money saver. Microsoft Office costs A LOT of money, and most people
just use Outlook and the most basic features of Word. Excel is used
mostly to store lists of stuff, not as a spreadsheet.
Management gave me the freedom to prepare an OpenOffice migration. And
it has been a success. Right now almost half of the people around here
is using OpenOffice instead of Microsoft Office. Note that I installed
the 2.0 beta. It has an excelent quality, is VERY stable, and the users
love it (once they get used to the fact that it takes longer than MS
Office to load). Disabling Java and tweaking the memory settings helps
A LOT.
In the first days I gave a "migration talk", I prepared some case uses
and everybody noted that the way oo.org works is very similar to MS
office. What I didn't expect was a general concern: How to setup
keyboard shorcut keys. I was in trouble, I didn't know how to do that.
So I was honest and I told them the truth, that I didn't know how to do
that but we can use the search feature in the help system and we
immediatly found what we were looking. Props to the OpenOffice.org
documentation project for this, it saved my day.
Real non-geek-final-users are using oo.org here. It is an excelent product.
But there is something that Microsoft Office has that OpenOffice.org
doesn't: Outlook. Final users love that buggy piece of crap. Sysadmins
and helpdesk people hate it. I hate it. It's buggy, sometimes it
refuses to work and it has a lousy security record. I want it (and
Internet "explorer") outside my nework. But I just can't say "don't use
outlook anymore", I must come up with an alternative. At the time I was
using Evolution to test the "linux-final-user experience" (I am a
disciple of the mutt order). But evo has a serious problem: it doesn't
run on windows (at least not yet). So I had two choices, both from
mozilla: Thunderbird and the Mozilla suite (codename seamonkey). I
tested both in my debian workstation and allthough I really liked
thunderbird, I fell in love (again) with the Mozilla suite. I loved the
integration of his parts: a (mature) web browser, a (mature) mail/news
client, an excelent html editor, and a calendar application. It is
every sysadmin's dream for his users. But I chose Thunderbird instead
because:
Mozilla is devoting all it's efforts in the "birds-suite" : firefox,
thunderbird, sunbird (firefox used to be a bird: phoenix/firebird). And
now it is official, the mozilla suite won't have a new release. The
birds suite is the way to go.
Outlook stores all it's junk in .pst files. Both Thunderbird and
Mozilla Mail can import .pst files, but only Thunderbird could import
the attachments of the messages. We have a winner.
And of course, Thunderbird is the tool of choice if you have spam
problems (and who doesn't). It has a built-in bayesian filter that
WORKS(tm).
On the server side, FreeBSD is taking over the server room. But this belongs to another post…
Posted in General, Computers, Debian, Free Software, FreeBSD | 3 Comments »
PostgreSQL, FreeBSD, SMP and vinum
Friday, February 4th, 2005
Today I'll talk about this very important PostgreSQL server. It was
running RedHat Linux 7.x on a dual P3, and a process that sometimes
runs there usually took like 17 hours.
There was a spare Dual Xeon laying around, so I decided to replace that
old server. Obviously my first choice for a sensitive database server
was Debian GNU/Linux, so I installed Debian Sarge to test it: kernel
2.6, PostgreSQL 7.4.6 and scsi drives in software raid-0 (striping) in
XFS. Everything was perfect, and the process that took 17 hours in the
other box took only 5:30 hours in the new box. A big improvement.
But I am a curious person.
Since there was no hurry to replace that old box (other than the
performance since besides the 17 hours process it serves a high-traffic
website), I installed FreeBSD 5.3 in that same Dual Xeon.
It was hell.
First, I had some experience with FreeBSD since Aureal System's server
is running it. I have administrator access to the server but I had no
experience:
- Installing FreeBSD (this was a piece of cake)
- Making software RAID work (this was HELL)
Now, I have read Michael Lucas' Absolute BSD and Greg Lehey's Complete
FreeBSD. Lehey's book has nice chapter about Vinum, FreeBSD's Raid
volume manager (Lehey is vinum's author after all), but there is a
problem with vinum, freebsd5 and SMP (I was installing it in a Dual
Xeon remember?). I tried 5.2.1, same problems. Finally it worked with
an obscure and undocumented version of vinum called gvinum. The g
stands for geom-aware. It worked.
But this was just the beginning.
The beginning of the good news, for me at least. After installing
everything and running the previously mentioned process, there was
something very hard to believe. In the same box, with the exact same
hardware configuration:
Debian+linux 2.6.9 + raid tools + XFS + PostgreSQL 7.4.6 = 5 hours 30 minutes
FreeBSD 5.3 + gvinum + UFS2+S + PostgreSQL 7.4.6 = 44 minutes
Clearly there was something very wrong here.
There wasn't.
I ran the process again and again and the results were similar. I don't
know exactly if this extraordinary performance gain in this particular
process is because of the filesystem or the raid handler, probably it's
because of both. I'll have to perform some serious benchmarks here, and
publish the results of course.
The end of this story is:
- The FreeBSD server is now in production, it runs like a charm and the
web pages that access the database now run almost 6 times faster than
with the old dual P3.
- I'm installing more FreeBSD boxes.
- I'm reading McKusick's The Design and Implementation of the FreeBSD Operating System (thanks Breno) and Absolute OpenBSD.
- I am still running debian (unstable) on my desktop boxes, and probably this will not change.
Oh, and I'll use that SCSI powered dual P3 for my benchmarks, to be published here in a near future.
I just can't believe I've been avoiding BSD so many years.
- Apr 09 Sat 2005 19:49
神勇的 FreeBSD
全站熱搜
留言列表
禁止留言