Michel Di Croci
2009-Apr-23 18:35 UTC
Evaluating the performance of a single FreeBSD server
Hello, One of my ex colleague wanna startup a web project. I'm still unsure about the possibility of expansion of the project so I prefer to start slowly. One of my idea was to use a FreeBSD server (a rack one which I will put in a colocation environment) and use it as a starting server and runs an Apache + PHP + PostgreSQL (for a long run stable and expandable DB). If it starts to respond slowly after the "initial release of the service"... I would add more servers (one new for the DB and another one for a webserver and a load balancer) with the profit from the service. You know where I'm heading... adding as needs grows. However what I want to know here is how much could handle this server as a standalone? How many requests at the same time ? If it's a good way to present as a startup? If we should go indead to a managed server. My idea here is that if it's going too slow, we might just buy new instead of going with a all managed solution where we would be more like renting a server. He doesn't have a lot of money, especially at the beginning but I wish to be in a middle solution. Responding for a lot of requests (if it's starting well) without the drawback of having just one server. We cannot afford a full rack of server if it would even be better. Michel PS: If you have suggestion for better hardware, just let me know. I never venture in this direction but I know FreeBSD is running quite well here in my house ;) But I know that's not the same story if I want a server being accessible. I don't think we'll be slashdotted however.... ;)
Zaphod Beeblebrox
2009-Apr-23 20:39 UTC
Evaluating the performance of a single FreeBSD server
On Thu, Apr 23, 2009 at 2:04 PM, Michel Di Croci <michel.dicroci@gmail.com>wrote:> Hello, > > One of my ex colleague wanna startup a web project. I'm still unsure about >[...]> However what I want to know here is how much could handle this server as a > standalone? How many requests at the same time ? If it's a good way to > present as a startup? If we should go indead to a managed server. My idea > here is that if it's going too slow, we might just buy new instead of going > with a all managed solution where we would be more like renting a server.System performance is a moving target that is insanely difficult to hit without usage data. Is your application going to be processor bound (unlikely these days), memory bound, network bound, disk bound? The cost of a baisc server from a large vendor is around $1k (dell, hp, sun, etc) that you can load FreeBSD on. If you purchace carefully, you'll get a nice quad core with decently fast memory and two disks (RAID 1). It will also likely have two or more gigabit nics. Is this optimal in any way? No. The nic chipsets will suck a bit, the drives will be small-ish... and so on. But compared to a few years ago when you had to care about the performance of a server for a small company, the system will be a monster. My sincere advice is to buy the basic server, build your app and then test it. Test what gets busy first. This depends a little on the hardware, but it depends a lot on how you build your app. It may be cheaper to optimize the app rather than buy more hardware. As an example, moving the database server to another machine may not help at all. If you're not CPU bound, you simply move the bottlenecked I/O to another machine --- still bottlenecked. But as a baseline to answer your question, without running anything serverside (just serving files) FreeBSD can fill multiple gigE nics with content (large-ish files) or perform many millions of hits an hour (small files) on this configuration. Making the broad brush assumption that your Apache+PHP+PostgreSQL is going to run a moderate content manager (a moderately onerous application), you'll still probably pass a million hits an hour if you can push that much content over your network connection and your disks are fast enough (and you can display your page with one or two database hits). In fact number of databse hits per pageview is likely one of your larger limitations.
Michel Di Croci wrote:> He doesn't have a lot of money, especially at the beginning but I wish to be > in a middle solution. Responding for a lot of requests (if it's starting > well) without the drawback of having just one server. We cannot afford a > full rack of server if it would even be better.Hi, maybe Amazon's AWS or similar services are helpful here. I'm not getting paid to say that, but you don't have to invest a whole lot to get startet. regards
Michel Di Croci wrote:> colocation environment) and use it as a starting server and runs an Apache + > PHP + PostgreSQL (for a long run stable and expandable DB). If it starts toEven if we forget everything else you said, "Apache + PHP + PostgreSQL" means you have at least ... BOTE calculation ... at least 24 different combinations of how these components interact with each other and each has different performance characteristics. You need to give us much more information before something meaningful can be concluded. In general, 90% of your performance issues will be in the application (PHP code, not PHP itself) and the database (structure, indexes, etc.). Assuming you have a decent application architecture, database schema and enough bandwidth, can you think of a similar already existing web application so people can have a baseline when giving you advice? (Don't think "Google" ... think of a smaller application which can be compared in size to yours). -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 258 bytes Desc: OpenPGP digital signature Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20090424/b29b6966/signature.pgp