The Dedicated Experience

Since my initial purchase of a dedicated server for MyBB, i’ve purchased a second dedicated server to replace the existing one (a better offer came up with better specs). Yesterday I just moved SurfiOnline and all corresponding subdomains over to the new server.

Setting up a dedicated server totally from scratch to be serving fairly popular websites (Note: This site isn’t one i’m talking about - it’s sure as hell not popular) for the first time has been quite interesting for me. I mean, i’ve had lots of experience with Linux and managing servers but i’ve never really set up a server from the ground up including things like real DNS, MTA’s etc. Like I said, i’ve installed them and everything before but never in a live production environment.

The whole process was fairly easy to do with compilation of Apache/PHP/MySQL/Subversion/Bind/Qmail.. you get the picture. The only thing I had some trouble with was Qmail not wanting to scan emails through SpamAssassin and ClamAV (Spam and Antirvirus protection for Linux). That was sorted but then it left me with one other problem - all mail for SurfiOnline was being rejected for “Sorry, I couldn’t find any host named surfionline.com”. A little research and it turned out it was because I was sending test emails from my old hosting account with ZeonHost which was locally resolving the DNS on their network (which it was still set up on) and not resolving the correct mail server IP. That’s fixed now too.

In terms of server management, i’ve always, however, considered myself to be fairly knowledgeable especially when it involves HTTP servers, PHP, MySQL and server security. All of it being self taught through the internet.

I’m happy to say that the new server, without any optimizations, is performing pretty damn well with MyBB load times as low as 0.03 and 0.05 seconds per page - however that’s on the beta website - more on the beta later. I’m still yet to move the MyBB website and MyBB forums over to the new server as they’ll be done with the release.

I think soon i’ll focus on some short guides here on my setup of this server and how i’ve gone about certain things and the various scripts i’ve created (because Control Panel’s are a waste of server resources and are security issues). We’re talking about simple scripts such as a script which scans all of the Apache VHost’s and runs webalizer for them automatically, bandwidth and usage tracking using iptables for certain ports, tracking the data transfer of certain Vhosts and other crazy little things.

Comments

  1. 1.

    Peter Akkies (August 19th, 2005, 5:48 pm)

    Got any specs? If the server is even better that must be one hell of a server.

  2. 2.

    Chris Boulton (August 19th, 2005, 5:54 pm)

    Yeah,

    P4 2.8ghz (Only one processor at the moment ;))
    1024mb RAM
    80gb HDD
    1000gb monthly transfer.

    The old one was a Celeron 2.4 with only 512mb RAM so thats why there is such a difference - having the cache of the P4 as well as other differences between the entry level Celerons and the actual P4’s.

  3. 3.

    Peter Akkies (August 19th, 2005, 6:14 pm)

    Yeah, huge improvement. Even so, my home pc has got better specs :| I guess you pay for the transfer and maintenance more than for the actual computer.

  4. 4.

    Rust (September 4th, 2005, 8:26 pm)

    Same thing here - my dedicated server is a P4 3.0GHz with 2GB of RAM, but my home machine is a dual-core Athlon64 with 2GB of RAM. Funky :) But I ain’t giving up my 64 bits for no site.

    I do have a quick question though. For those 0.03 second load times, how many queries are being made? I’m assuming that you’re running PHP on Apache with MySQL, probably, but I’ve always had trouble getting that kind of speed from MySQL. SQL Server is no problem, it’ll handle a thousand queries a second (simple ones, like a blog or forum would mostly make), but my MySQL setup only seems to be able to hit about a quarter of that speed…

  5. 5.

    Chris Boulton (September 4th, 2005, 9:01 pm)

    Around about 12 queries per page. Times are a bit higher now because there are several sites running on the server but generally pages in MyBB (not WordPress!) run at 0.08 or 0.09.

    At the moment i’m running on stock configurations of PHP and MySQL because I haven’t had a chance to actually customise them. I’ve always been able to get decent speeds from MySQL, the problem is making sure your indexes are correct in your tables and you keep your database clean (optimize and analyze tables often).

    Make sure you’re logging slow queries too - that can help if you want to determine which is taking too long to execute and needs to be revised.

    One of the projects i’m involved in, the Messenger Plus! Custom Sounds feature, is controlled by servers in the backend - we’re dealing with probably around 1,000 queries per second to and from the database. Our setup is not small however, we’re using 3 servers for file storage as well as 1 for the SQL databasel. We’ve gone through numerous structural designs in the database as well as filesystem and many changes to the configuration files for both PHP and MySQL to make sure everything is running at a optimal speed - so basically with the right structure and configuration you can achieve your 1,000 queries per second.

  6. 6.

    Bobby (April 21st, 2006, 12:38 pm)

    Hehe, this is going to be funny when I start to build my own server. I dont even know what to do. Can someone help me out here? All I have at the moment is a broadband connection 40GB downloads/uploads at 1.5mbps - is that good enough Chris, or is someone else managing your dedicated server on their network?

    Where can I find a good deal to buy a dedicated server?
    Can you focus on any tutorials or any good tutorials sites on getting a dedicated server and setting it up?

  7. 7.

    Chris Boulton (April 21st, 2006, 12:46 pm)

    My server is hosted at Layered Technologies, http://www.layeredtech.com

    Running a server off your home connection is not only a mistake but is also most likely against the TOS of your ISP.

    Layered Tech offer pretty cheap servers and have a whole different set of ranges with specs.

    Because it is your first time, I’d recommend getting Debian installed (unless you decide to go with a Windows server). You can then use apt-get to install the different packages for the functionality you need instead of compiling from source.

    Howtoforge has some good beginner articles for setting up servers (Perfect setup guides). They then cover advanced topics as well.

    The MyBB server runs Fedora Core 3 (ewww) with most packages compiled from source (because they’re newer than the packaged versions available and give me extra flexibility).

  8. 8.

    Bobby (April 21st, 2006, 3:19 pm)

    Thanks Chris, I appreciate it. (I’d rather here this stuff from someone who’s been there/done that)

    I have no Idea on lunix operating systems (all I know is that there are thousands which makes it even more confusing), Im going to have to read into all that too…

Post a Comment

Note: * indicates required fields.