Best configuration for dedicated server?
I've some forums running on a VPS at Rimuhosting. Everything works great, but dedicated servers are cheap right now.
What's the best way to setup a dedicated server to have some services online? do you really need XEN?
I Would like to setup php5, mysql5 on apache (maybe ngnx too). And would like to ran some rails development to, so, SVN required.
Would be great if you share your dedicated servers layout.
(
21 comments
| 6 points
| on HN
)
I just haven't seen any web service situations in the past seven years, or so, where CPU was the bottleneck, and I've been involved involved in a lot of web scalability projects (it's what my previous company specialized in).
Are you sure you weren't actually seeing some kind of thrashing triggered by being low on memory or too-slow disk access? For example, when Squid gets overloaded, CPU usage spikes up to nearly 100%--but increasing the speed of the CPU does nothing to make things go faster. You have to give it more memory and more disk throughput. The reason it looks like a CPU usage spike is because the select or poll loop is so busy waiting for file descriptors to be ready (not an entirely accurate description...but it should give you the gist of it if you've ever done any concurrent programming in C without using threads). But maybe PHP and Ruby can work the CPU in pathological ways that I've not seen...modern CPUs are just so damned fast, it's hard to imagine.
(And, technically, there is still debate about whether the universe is infinite or not. And, our universe may yet reduce to a singularity. Just because it hasn't happened yet, doesn't mean it won't. The universe is tricky like that.)
[Matter could still be finite in an infinite universe. And even with infinite matter flying around - gravity gets weaker with distance.]
Memory is critical. Yes, Rails is a little slow but application servers are trivial to scale. The database is virtually always going to be the hard bottle neck so you're going to want plenty of memory.
http://www.slideshare.net/vishnu/xen-and-the-art-of-rails-de...
On the hardware side setup a RAID either hardware or software, but with a hardware RAID you better pray for it to not crash. I've seem some nasty issues with raid controllers. Also, get plenty of memory and dual/quad core processor.
For the OS, I will go for Debian or Ubuntu Server if you want some kind of support (yes, I know that there are people servicing Debian support, but they are less blamable!)
Xen and any other virtualization comes out of your overhead costs, unless you have a specific need for it (like being able to migrate seamlessly to EC2) don't bother.
For what you are planning to do Ubuntu server edition would probably cover most of your needs and give you enough support to quickly resolve problems.
Don't bother with softraid, if your data isn't important enough for you to afford a dedicated RAID controller and the disks to go with it; you can live with the possibility of losing everything up to the last backup (you will be taking backups).
The data integrity benefits are still present, as are some performance benefits in some circumstances (in fact, Linux RAID is demonstrably faster in some workloads than a top end Adaptec hardware RAID controller, though this is the exception rather than the rule)
That said, I hate pretty much all RAID controllers (whether software or hardware). Linux software RAID means that I can drop the disks into any PC and access the data. Every RAID controller from Promise, Adaptec, and Tektronic requires me to use their disk format, and if I lose the controller I lose the data until I can get another controller. Sure, in high availability environments, you keep a spare...but with Linux software RAID, every PC in the office is a spare controller. That's my kinda redundancy. I've even had two identical Adaptecs with different firmware lead to pretty massive data loss during a server migration. Thankfully there were good backups. I've never had similar problems moving Linux software RAID disks into a new Linux box.
I had to set up a PHP environment on 64-bit Ubuntu recently and it wa s a major pain. The PHP binary from apt-get was 5.1.2 and pdo_mysql wouldn't install out of the box (I had to comment out part of the install script). The lighttpd binary was also pretty old (1.4.11 I think) and had a bug specific to Ubuntu/Debian that caused major performance problems with fastcgi; I had to build the latest version from source. It's still workable but it just seems like Fedora is a lot more PHP-friendly.
Very Interesting.
http://www.scribd.com/doc/69623/RailsConf07-Notes-Xen-And-Th...