Linux server

Don´t be shy, Linux is fun! =)
Post Reply
User avatar
Macross
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 152
Joined: 01 May 2007, 16:00
16
Contact:

Linux server

Post by Macross »

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?

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Post by bad_brain »

easy question, hard to answer.. :lol:
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... :lol:
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.

User avatar
Macross
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 152
Joined: 01 May 2007, 16:00
16
Contact:

Post by Macross »

bad_brain wrote:easy question, hard to answer.. :lol:
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... :lol:
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! Respect :)

User avatar
3XTORTION
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 246
Joined: 29 Jul 2007, 16:00
16
Contact:

Post by 3XTORTION »

Well,wouldnt be better if you installed "Lighttpd" webserver instead of "Apache" and watch your performance increase ? :wink:

User avatar
CommonStray
Forum Assassin
Forum Assassin
Posts: 1215
Joined: 20 Aug 2005, 16:00
18

Post by CommonStray »

3XTORTION wrote:Well,wouldnt be better if you installed "Lighttpd" webserver instead of "Apache" and watch your performance increase ? :wink:
a server deployed on only 4 of the top US websites does not impress me...

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

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Post by bad_brain »

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.

User avatar
3XTORTION
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 246
Joined: 29 Jul 2007, 16:00
16
Contact:

Post by 3XTORTION »

True,but can apache handle a couple of packets if a skid decided to attack the webserver ? :-k

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Post by bad_brain »

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.
:wink:

User avatar
3XTORTION
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 246
Joined: 29 Jul 2007, 16:00
16
Contact:

Post by 3XTORTION »

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 :-k

But yet again u cant ignore the amount of popular sites that uses apache :wink:

+ Theres the commercial software LiteSpeed but hell with commercial...OpenSource FTW ! 8)

User avatar
ph4smid
Newbie
Newbie
Posts: 1
Joined: 22 Jun 2009, 16:00
14

Post by ph4smid »

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.

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Post by bad_brain »

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.

Post Reply