Lets say my dedicated server is running linux OS (Server spec: Intel Pentium DDualCore E2180 ram 2 GB) so my question
would be how much sites could i host on it?
Linux server
- bad_brain
- Site Owner
- Posts: 11636
- Joined: 06 Apr 2005, 16:00
- 19
- Location: In your eye floaters.
- Contact:
easy question, hard to answer..
it depends on a lot of parameters, HTML sites for example use a lot less resources than PHP sites with database connections, and on servers the amount of RAM is usually what sets the limit (not so much the CPU).
it also depends on the amount of visitors, what other services are running....also IDSs use a decent amount of RAM.
but well, I know you want to hear a number...
ok, let's say the server is well configured (Apache, MySQL, best with an external cache for PHP like eAccelerator), there are only sites with a medium amount of visitors, and you don't provide RAM intensive services like mail servers with spamfilter or use resource hogs like a desktop environment: 50 sites should be realistic.
but this is only realistic if the server configuration is really good....and such configuration is nothing that can be done in a few days, you'll have to watch the performance and analyze the logs regularly, this usually takes months. but ok, even with a halfway good config (but no real errors) 30 sites should be fine.
it depends on a lot of parameters, HTML sites for example use a lot less resources than PHP sites with database connections, and on servers the amount of RAM is usually what sets the limit (not so much the CPU).
it also depends on the amount of visitors, what other services are running....also IDSs use a decent amount of RAM.
but well, I know you want to hear a number...
ok, let's say the server is well configured (Apache, MySQL, best with an external cache for PHP like eAccelerator), there are only sites with a medium amount of visitors, and you don't provide RAM intensive services like mail servers with spamfilter or use resource hogs like a desktop environment: 50 sites should be realistic.
but this is only realistic if the server configuration is really good....and such configuration is nothing that can be done in a few days, you'll have to watch the performance and analyze the logs regularly, this usually takes months. but ok, even with a halfway good config (but no real errors) 30 sites should be fine.
Thank you b_b as always for a great reply! Respectbad_brain wrote:easy question, hard to answer..
it depends on a lot of parameters, HTML sites for example use a lot less resources than PHP sites with database connections, and on servers the amount of RAM is usually what sets the limit (not so much the CPU).
it also depends on the amount of visitors, what other services are running....also IDSs use a decent amount of RAM.
but well, I know you want to hear a number...
ok, let's say the server is well configured (Apache, MySQL, best with an external cache for PHP like eAccelerator), there are only sites with a medium amount of visitors, and you don't provide RAM intensive services like mail servers with spamfilter or use resource hogs like a desktop environment: 50 sites should be realistic.
but this is only realistic if the server configuration is really good....and such configuration is nothing that can be done in a few days, you'll have to watch the performance and analyze the logs regularly, this usually takes months. but ok, even with a halfway good config (but no real errors) 30 sites should be fine.
- CommonStray
- Forum Assassin
- Posts: 1215
- Joined: 20 Aug 2005, 16:00
- 18
a server deployed on only 4 of the top US websites does not impress me...3XTORTION wrote:Well,wouldnt be better if you installed "Lighttpd" webserver instead of "Apache" and watch your performance increase ?
Apache runs on half of them, there are reasons for this
even IIS runs behind more sites than Lighttp, I'm not dissing the application, it's just not a viable solution compared to getting another better product for free
- bad_brain
- Site Owner
- Posts: 11636
- Joined: 06 Apr 2005, 16:00
- 19
- Location: In your eye floaters.
- Contact:
lighttpd surely is a good application, but I would only consider using it if there are still performance problems with Apache after the config has been optimized to the max.
I guess many people that romanticize lighttpd simply haven't been able to create a good Apache config before...and then lighttpd is of course much faster. all those benchmarks that show how much faster lighttpd is are of course true, but the significance for "real life" is a little limited because there are too many parameters involved like the hardware resources and the config.
I guess many people that romanticize lighttpd simply haven't been able to create a good Apache config before...and then lighttpd is of course much faster. all those benchmarks that show how much faster lighttpd is are of course true, but the significance for "real life" is a little limited because there are too many parameters involved like the hardware resources and the config.
- bad_brain
- Site Owner
- Posts: 11636
- Joined: 06 Apr 2005, 16:00
- 19
- Location: In your eye floaters.
- Contact:
um, sure...if it would be THAT easy to force an Apache server into DoS it wouldn't be that popular, all a question of configuration (of Apache and the context like PHP or MySQL).
for a good Apache setup I recommend to use the following external modules/features:
- eAccelerator (external PHP cache, reduces the server load and increases the performance): http://eaccelerator.net/
- Suhosin extension (not the patch!), hardens PHP: http://www.hardened-php.net/suhosin/
- mod security, a firewall for Apache that filters malicious requests, protects from XSS, SQL injections, etc., can be easily customized via own rules: http://www.modsecurity.org/
- mod evasive, protects from DoS and (limited of course) from DDoS attacks, the original project page seems to be gone, but you can get it here: http://www.huschi.net/download/mod_evas ... 0.1.tar.gz
together with a good basic config you will have a damn secure (you can hear the skiddies cry at night when you listen closely) and high-perfomance Apache server...including the hosted sites.
for a good Apache setup I recommend to use the following external modules/features:
- eAccelerator (external PHP cache, reduces the server load and increases the performance): http://eaccelerator.net/
- Suhosin extension (not the patch!), hardens PHP: http://www.hardened-php.net/suhosin/
- mod security, a firewall for Apache that filters malicious requests, protects from XSS, SQL injections, etc., can be easily customized via own rules: http://www.modsecurity.org/
- mod evasive, protects from DoS and (limited of course) from DDoS attacks, the original project page seems to be gone, but you can get it here: http://www.huschi.net/download/mod_evas ... 0.1.tar.gz
together with a good basic config you will have a damn secure (you can hear the skiddies cry at night when you listen closely) and high-perfomance Apache server...including the hosted sites.
Well thanks for the links b_b i already knew those except for suhosin to be honest.But the thing that keep me thinking about this is that switchers from apache to lighttpd always have negative reviews about apache and saying that lighttpd + fastcgi will beat apache.Same reply i keep on hearing
But yet again u cant ignore the amount of popular sites that uses apache
+ Theres the commercial software LiteSpeed but hell with commercial...OpenSource FTW !
But yet again u cant ignore the amount of popular sites that uses apache
+ Theres the commercial software LiteSpeed but hell with commercial...OpenSource FTW !
You are taking about server software, but remembet that it also depends what web applications youare running ... You can run web forum written in PHP using great hardware and lighttpd with fast CGI, but it'll work horrible. Even PHP code (apps) need sometimes to be tunned, and dsl databases ...
If you are using lighttpd don't sore session informations in database - filesystem is faster solution, but if you need use database use memory sorage engine. Use sql cache to cache queries and cache index's.
If You have more updates/inserts to some tables convert them to innodb (innodb doesn't lock whole table like myisam).
As always - it depends whatyou want to run on your serwer, how many views your websites have, and how they are build.
If you are using lighttpd don't sore session informations in database - filesystem is faster solution, but if you need use database use memory sorage engine. Use sql cache to cache queries and cache index's.
If You have more updates/inserts to some tables convert them to innodb (innodb doesn't lock whole table like myisam).
As always - it depends whatyou want to run on your serwer, how many views your websites have, and how they are build.
- bad_brain
- Site Owner
- Posts: 11636
- Joined: 06 Apr 2005, 16:00
- 19
- Location: In your eye floaters.
- Contact:
right ph4smid.
the problem is that you can't see the web server out of context from the rest of the system. lighttpd might be faster than apache, but the features of apache provided by the lots of available modules makes it an all-rounder.
for the usual modules like php or perl it might work fine with lighttpd too, but for an advanced (and good) config other modules are needed like mod security....and that's where lighttpd can't compete.
the problem is that you can't see the web server out of context from the rest of the system. lighttpd might be faster than apache, but the features of apache provided by the lots of available modules makes it an all-rounder.
for the usual modules like php or perl it might work fine with lighttpd too, but for an advanced (and good) config other modules are needed like mod security....and that's where lighttpd can't compete.