• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Building servers for PHP/MySQL web hosting

Mechasheeba

Limp Gawd
Joined
Jul 26, 2012
Messages
169
I'm working on a web project and plan to build my own dedicated servers and provide the hosting myself rather than leasing anything.

I'm still learning PHP, MySQL, HTML, CSS, etc. so it'll probably be a number of months to possibly years before I actually have a need for the hardware, but I still want to at least familiarize myself with some of it.

Right now I'm looking at 771 hardware cause there's a lot of it available and it's actually pretty cheap. Probably 2x Xeon 5000 series quads (8 cores 8 threads), 16GB of ECC FB DDR2 667, eatx Intel 5000 series board, RAID 0 some standard 7200rpm drives, and possibly an SSD or two depending on how much data I end up saving and costs.

I'm hoping to be able to handle traffic in the 250,000 user range, not concurrently but up to that many registered users and whatever the typical load would be for a database that size.

Assuming it does get to that traffic level, where would my bottlenecks lie as far as server performance goes? I'm guessing the hard drives would be the weakest point of the system, but are 8 threads and 16GB of RAM enough, or possibly even overkill? What's more important, threads or clock speed? If I'm somehow CPU limited would I be better off going with some kind of highly threaded custom Atom farm?

I'm expecting the site to be mostly text updates with a limited amount of jpegs so it may end up not needing much storage space at all, and I might be able to use ramdisks or small SSD's and just use the mechanical drives for redundancy.

I don't know anything about servers though so if processing power is less of an issue than ram/storage performance I could probably reduce the CPU power and put a little more money towards up to 32GB of ram instead of 16GB, or some SSD's.

Are there benchmarking tools that can emulate web traffic load, or review sites that specialize in this sort of thing?

Also as a general question, do server boards use standard ATX power supplies, or are there specialized PSU's for dual processor boards? Do I need a PSU with dual 24-pin connectors or dual 4/8-pin aux or something like that? Also, does EATX share mostly the same mounting holes as ATX, could an ATX case fit an EATX motherboard as long as there was clearance even if I didn't use the couple of extra standoffs? If not, any recommendations for cheap, compact EATX compatible cases?

And lastly, can a server board typically take non-ECC unregistered RAM for testing purposes? I know most desktop boards aren't compatible with ECC RAM, but are server boards compatible with desktop RAM in case I just needed to test the DIMM slots and make sure they all work while I shop around for server memory?
 
Last edited:
Quad core 771 Xeon boards need FB-DIMMs. The slot is different. On a positive note, 771 with FB-DIMMs is quad channel, which helps a lot with memory bandwidth.
 
Oh ok, that kind of makes it a pain in the ass to piece together a system using Ebay given short DOA return policies. I'd have to plan it out so everything arrives within a short period of time.

So having either 4 or 8 slots filled is best for performance?
 
Yeah, well that is my experience with the Supermicro products, and I assume same goes for the Intel boards.

FB-DIMMs on the used market are much cheaper per GB than desktop DDR2.. weird I know.
 
Oh ok, that kind of makes it a pain in the ass to piece together a system using Ebay given short DOA return policies. I'd have to plan it out so everything arrives within a short period of time.

So having either 4 or 8 slots filled is best for performance?

Since you have so much time, why not purchase from somewhere with better return policies? Also for test development server, you could always use a slow computer, as that help will point out your inefficiencies much more quickly when programming.

You could also get a host for ~$5 a month and use that for learning.

I really don't understand why you want to purchase such crazy hardware to learn PHP, MySQL,etc.
 
You are likely going to want to split your frontend(s) from your backend (database) for that kind of load.

Helps with scalability since then you can add more frontend servers and load balance. Makes management a bit easier too since you have a machine dedicated to each role. Your bottlenecks are going to vary depending on the workloads. Disk can be an issue, but also might not be a big deal at all if your content is easily cachable (either at a code or database level).

As said, for learning start small. That way you can tell what your application is going to need as it scales. I would recommend setting up a simple all in one box with ESXi, Hyper-V or Xen so that you can easily create a few different virtual machines and play with them. You will also be able to get a better idea of performance impacts.
 
I'm not looking to build the servers just for learning/testing purposes, I'm planning ahead to actually have capable hardware to handle large amounts of traffic when the time comes, but maybe it is a bit premature. Right now I'm doing all my PHP/HTML studies on an AMD C-60 1.33ghz netbook, haven't even started any MySQL yet.

I'm not working on a personal blog or anything that I can get away with $10/month virtual hosting, I plan on investing a lot into this project as a full time job.

And these servers, if I'm patient, I should be able to build for around $350-400 each because it's an EOL platform, so while people are upgrading there's a flood of 771 hardware available on Ebay for very reasonable prices. It's so saturated heatsinks are actually one of the most expensive parts available at the moment. I can probably build 3 of them and have enough to float business hosting for a few years. I just wish I knew what I was getting with each server as far as performance goes and whether it's too much or not enough.

I'm obviously not very far along, but I was hoping to get a general idea from people who host large websites about maybe whether the emphasis is on RAM, or disk IOPS, or CPU power, or all of the above. I just don't wanna end up buying dual 771 quads and finding out a current gen single processor and 64GB of RAM would've been a better choice or something.
 
Last edited:
it would be impossible for you to hit ANY hardware limitations if you are hosting it at home. trust me, I host at home with 10,000 page views a day, and my network would limit anyone before my hardware would.

your home router and cable connection will not be capable of serving 250k people.

as for the hardware you need to start developing? go buy a dell poweredge 840 off of ebay for $120, install linux, and have it. it will be a core 2 duo with 4gb of ram, and everything you'll need for managing a server. if you believe io will be an issue (with your network upload speed, it won't), buy two last gen ssds, a dell perc 5i, and setup a raid1 to handle the load.

have fun, but really, keep in mind you don't need a lot of hardware. you'd be amazed at what a core2duo and 4gb of ram can pull off, and it will only cost you $200 with drives.

if you learn how to use nginx, cpu and ram will barely limit you in any circumstance. it will probably be io, but honestly, I don't think you'll run into any hardware bottlenecks once you do a raid1 of ssds.

4 threads and 4-8gb of ram will be overkill. 2 threads and 4gb of ram will be useful. I ran my 10k a day site on a poweredge 310 as of a few months ago, and it was never bottlenecking. that is a pentium 3 with 768mb of ram, on extremely old ide disks. no problems with nginx caching. the only worthwhile upgrade was the processor because I run virus scanners on my site, but other than that, the site really did not speed up when I upgraded due to my network limitation.
 
What kind of network are you running? I was looking at FIOS business 35/35 for $100-150/month depending on dynamic/static or on/off contract.

For some reason they offer 150/65 on their residential lines for $100/month, and the max upload on their business lines is 35... doesn't seem to make any sense, but it's not nearly as bad as Comcast's $200/month 50/10 offering.

Those are the only two providers I know of, but I'd be willing to pay up to $200/month for 50Mbps+ upload with just about anybody.

What kind of website are you running, is it just serving up views of static pages or is there user content creation/interaction?

I'm using XAMPP at the moment as my dev tool, nginx is an apache replacement? Does it work with PHP/MySQL, if not what are the alternatives? If it's not as well documented and there aren't as many learning resources available for it I'll probably end up just sticking with XAMPP, but I'll look into it.

If I'm way off base on hardware requirements of course I wouldn't mind being able to spend a little less on the servers lol, I could always put the savings towards faster hosting if I can find one that beats Verizon FIOS business.

I'm assuming hosting with a third party like GoDaddy or whatever you're more or less paying for convenience, but maybe they actually do enough volume business that they can provide better equipment and bandwidth for the same price? Is it worthwhile to go with external hosting over controlling it all myself if I don't mind the upfront costs and upkeep?
 
Last edited:
What kind of network are you running? I was looking at FIOS business 35/35 for $100-150/month depending on dynamic/static or on/off contract.

For some reason they offer 150/65 on their residential lines for $100/month, and the max upload on their business lines is 35... doesn't seem to make any sense, but it's not nearly as bad as Comcast's $200/month 50/10 offering.

Those are the only two providers I know of, but I'd be willing to pay up to $200/month for 50Mbps+ upload with just about anybody.

What kind of website are you running, is it just serving up views of static pages or is there user content creation/interaction?

I'm using XAMPP at the moment as my dev tool, nginx is an apache replacement? Does it work with PHP/MySQL, if not what are the alternatives? If it's not as well documented and there aren't as many learning resources available for it I'll probably end up just sticking with XAMPP, but I'll look into it.

If I'm way off base on hardware requirements of course I wouldn't mind being able to spend a little less on the servers lol, I could always put the savings towards faster hosting if I can find one that beats Verizon FIOS business.

I'm assuming hosting with a third party like GoDaddy or whatever you're more or less paying for convenience, but maybe they actually do enough volume business that they can provide better equipment and bandwidth for the same price? Is it worthwhile to go with external hosting over controlling it all myself if I don't mind the upfront costs and upkeep?
comcast, 10 upload.

very static, just a collection of articles and a simple commenting system. no mysql, just php and perl.

nginx is not a replacement, it's a proxy you can put in front of apache to take the load off of mysql and php. it's a bit complicated, sticking with apache for now is best.

I personally don't use external hosting for anything except for large file downloads on my site. I would learn local and host local, saves a lot and teaches you way more.
 
For the kind of money you are talking about putting into the internet connection alone you could have a very nice VPS or dedicated server that would be able to handle you for some time.

Unless your code is really that inefficient, a single machine should be able to hold the load of a fairly large site no problem, even with dynamic content.

I know a guy that has a VPS with Godaddy (not recommended, but still for example it works) and he runs a network of 15+ sites that serve 10s of thousands of page views a day with no issue.
 
GoDaddy limits their throughput on virtual and dedicated servers to 10Mbps. I'd rather pay Verizon roughly the same if not just a little more for up to 35Mbps.

I'm not sure what other hosting companies offer but I'm not opposed to the idea as long as it's a better value and can provide similar or better throughput.

But as far as servers I've already picked up a few Supermicro X7DCA-L motherboards to play around with. They cost a little more than I initially wanted to pay at $62.50 each, but they're nearly Micro ATX form factor and they have the Intel 5100 chipset so I can use standard ECC dimms instead of fb-dimms, which after a little research seem to run very hot and suck up even more power than the CPU's in some cases, although they do have more bandwidth.

Even with a pair of L5420's and 12GB RAM per machine they'll end up costing me maybe $250 each depending on what storage I go with. That's not bad at all.
 
Last edited:
3 things needed

1. Reverse Proxy - nginx of something similar, OpenBSD or FreeBSD
2. Web Server - nginx based with php-fpm likely.
3. Database - linux with mysql

3 separate rigs and you could handle 250k. even concurrently.
 
In this day and age, there's no real need to buy specific hardware geared towards a LAMP stack... It's much easier to pick up server to run a hypervisor like ESXi and then run your software in a VM. a LAMP server doesn't need much with he only pressing demands coming from database activity. Unless you start doing something heavier w/ the coding or need fast writes/access, you can use almost anything in the past 5 years. You can upgrade and scale as needed or pool resources to meet your demand. If you pick up compatible hardware, you can provide uptime even when you have to perform hardware maintenance by using live motion or vmotion. If you have quantity, you could try rolling your own openstack/cloud servers and upgrade/expand hardware as needed. The hardware landscape will be different in 6-12 months and you'll want to pick up the cheapest parts of week.
Any particular reason you're not looking at a colocation? or try to find a cheap "Best Effort" colocation with no SLA's or backups or UPS. I would look at picking up some hardware to run a hypervisor or three to provide some availability and redundancy.
 
Quad core 771 Xeon boards need FB-DIMMs. The slot is different. On a positive note, 771 with FB-DIMMs is quad channel, which helps a lot with memory bandwidth.
Not all 771 boards use FBDIMMs. Boards with the 5000 and 5400 chipsets did. Boards with the 5100 chipset did not. It was also dual channel, not quad.
 
In this day and age, there's no real need to buy specific hardware geared towards a LAMP stack... It's much easier to pick up server to run a hypervisor like ESXi and then run your software in a VM. a LAMP server doesn't need much with he only pressing demands coming from database activity. Unless you start doing something heavier w/ the coding or need fast writes/access, you can use almost anything in the past 5 years. You can upgrade and scale as needed or pool resources to meet your demand. If you pick up compatible hardware, you can provide uptime even when you have to perform hardware maintenance by using live motion or vmotion. If you have quantity, you could try rolling your own openstack/cloud servers and upgrade/expand hardware as needed. The hardware landscape will be different in 6-12 months and you'll want to pick up the cheapest parts of week.
Any particular reason you're not looking at a colocation? or try to find a cheap "Best Effort" colocation with no SLA's or backups or UPS. I would look at picking up some hardware to run a hypervisor or three to provide some availability and redundancy.

true, but make sure you have a backup system in cause something hardware wise dies.
 
true, but make sure you have a backup system in cause something hardware wise dies.
That's the only good advice in this thread.


The OP is still learning the basics, they haven't mentioned the nature of their 'big idea', So it is impossible spec out the servers, or recommend reverse proxies..

The best option while you're learning and getting to the stage where you have a working demo is install 16 or even 32gigs of memory into you desktop(or built another), add some ssd's. Then you get to grips with virtual machines a stress test it with jMeter so you can make an informed decision on how it performs and home in on bottlenecks.

I wouldn't recommend running a high traffic site from your home. For a start 35mb isn't that fast, and spam filters will give you a tough time if you try to send emails from a consumer internet connection. A better option would be to get something like a Dell r220 and send it to a colo. Also, there's a reason older Xeon's are so cheap is because they a much less efficient than new Xeon E3 or E5's.

This forum does have a section dedicated to Webmastering & Programming. Which may be better place if you have questions with web development.
 
This sounds like madness. When you start, you can get $5-10 / month hosting. That will go a lot further than you think. Then you can jump to 40-50 dollar Atom dedicated servers, try to get a modern one with 4GB of RAM. You be downright shocked how much traffic can that one server handle if done right. Then you can move up to bigger servers... but for someone yet learning PHP to jump into a DP server... are you in the web business or the server building hobby?

Edit: I am a scalability consultant with experience on some of the Top 100 websites.
 
Don't forget that old servers will cost more in electricity and cooling than you might think!
 
dedicated atom server? i would not even have thought of using an atom for a high traffic website....
 
Back
Top