DH Server setup

I have an extra box at home that I’d like to setup as a pseudo-staging machine before I upload changes to my DH site(s). Obviously, I think I’d need at a minimum Apache and PHP, possibly Linux, possibly Perl as well (although I don’t currently use it for anything on my site).

Without disclosing too much, can you recommend specific versions for the above so I might mimic DH? Performance isn’t a huge issue, since I’m the only one who will be hitting the box… What Linux distribution is in use, or have you “rolled your own” so to speak?

No secrets here… in fact, I think a lot of this is in the kbase already.

We run Debian Linux 2.2 (potato) on all of the web machines. Some of the mail servers and back-end machines are running the next release - 3.0, aka ‘woody’. We’re currently using version 2.2.19 of the Linux kernel on the web machines (again, with some of the backend machines running later versions). All of the machines are i386 type machines.

As far as what packages we have installed, we don’t restrict access to this information; if you know how to use the debian package tools (dpkg), you can view what packages we have installed.

dpkg -l | grep ssh
dpkg --get-selections | grep ssh

for example.

Debian is a bit of a pain to install at times, but it’s very easy to maintain, and we generally use the vendor supplied packages for most stuff, although the apache and php packages (as well as some others) have some customizations.

If you want the machine to have the same versions of stuff as our machines, I’d suggest using Potato; Woody is a lot more usable, though - it has much more up-to-date packages. Personally, I like the BSDs (mostly FreeBSD) more than Linux in a lot of ways, and that’s what I run on my machines… but if you want something DH-like, Debian is the way to go.

More info at:

Yeah. I’m into FreeBSD at the moment, and just moved my box here over from RD to FreeBSD only to find out that running MySQL on FreeBSD is sketchy to say the least. It has some serious threading issues and doesn’t give me the reliability or the speed of running MySQL on Linux. :-\


Web Developer

Hrmm - that’s interesting. I don’t do any MySQL development on any of my machines, although I do admin a couple of FreeBSD boxes that have MySQL servers running on them. I haven’t noticed any problems, but the boxes aren’t doing anything that serious either.

What type of problems specifically (or is performance just worse)?

Generally, I’ve heard more complaints about Linux threading - maybe there’s just more MySQL development done on Linux.

Have you done any research to see if there are any workarounds or other things you can do to tune the performance?

[quote]Generally, I’ve heard more complaints about Linux
threading - maybe there’s just more MySQL development done
on Linux.


I’m not running any major production databases, but for development purposes I’ve run MySQL under both Linux and Mac OS X (Darwin) and haven’t seen too many problems.

Then again, during development it’s pretty much impossible to judge performance in The Real World™.

Wil - what kinds of problems have you run into with FreeBSD? I plan on deploying a web app (non-DreamHost related) soon that needs to be pretty robust, and the recommended underlying platform could vary at this point.

  • Jeff @ DreamHost
  • DH Discussion Forum Admin

Well, I haven’t really nailed anything down yet. As I said, I’ve only recently moved to FreeBSD, so it might be me doing something wrong here.

It just seems that long-running queries eventually tie up mySQLd even though no resources appear to have been exhausted.

Apparently, FreeBSD won’t use SMP for threads until v5 (a year from now). Only after this will things start to get better for MySQL on FreeBSD, or at least that’s what I’m lead to believe.

An interesting piece I found that referenced this was a talk given by Jeremy Zawodny from Yahoo! Finance (which uses MySQL as it’s backend). He gave a talk to Silicon Valley PM and in that talk he mentioned why they moved from FreeBSD to Linux to run their MySQL operations.

The talk can be found here:

And the relevent slides are:


Yahoo! Or at least, Yahoo! Finance is entirely run by FreeBSD boxes, excpet for 5 MySQL boxes that were moved to Linux due to these problems.

Strange …


Web Developer

It also claims the threading problems were fixed in 4.3, no?

Could some of your performance problems be due to disk / filesystem tuning issues? Possibly not, but worth thinking about. Do you have soft-updates enabled for the partition the data lives on? There may be some other tuning stuff that would help too (both on the OS level and with MySQL).

Even with Linux, we’ve had to do quite a bit of work to get MySQL optimized well with our system. We have some very large databases of our own, as well as a whole lot of customer databases. Anyway I’m very glad that most of this isn’t my job!

I haven’t used -current (the 5.x branch), but that might be worth examining as well.

Anyway, I can readily believe that MySQL performs better on Linux, but I still think that’s mostly because most MySQL development is on Linux.

Could well be. I dunno yet. I’ve just noticed a slight sag in perfomance and this strange issue with long-running queries trying up mysqld completly. I must admit that the tables I’m working with are not the best designed, ever, but I’m not taking this into consideration - I’m just comparing FreeBSD v. Linux.

Anyway, I’ll have a play with this and see what I come up with. I think it’s early days to offer any real answers or look for possible soutions, yet. But what I’ve posted above is just a hunch.



Web Developer