Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-24-2011, 08:57 AM
|
#1
|
Member
Registered: Jun 2010
Posts: 37
Rep:
|
apache on a virtual machine???
Hi, guys!
I'm Rebuilding all the servers in the company I work for. I read anything I found about best practices in virtualizing, but I didn't find anything about virtualizing Apache. As MySQl is not considered to be virtualized as a best practice but to be on a separate machine - my question is "Do I virtualize an Apache server or put it on another real machine?". And also I'm going to put the server on Ubuntu!
Thank you!
|
|
|
01-24-2011, 09:20 AM
|
#2
|
Member
Registered: Dec 2008
Location: Germany/Poland
Distribution: CentOS / Debian / Solaris / RedHat
Posts: 266
Rep:
|
Quote:
Originally Posted by yovkoi
Hi, guys!
I'm Rebuilding all the servers in the company I work for. I read anything I found about best practices in virtualizing, but I didn't find anything about virtualizing Apache. As MySQl is not considered to be virtualized as a best practice but to be on a separate machine - my question is "Do I virtualize an Apache server or put it on another real machine?". And also I'm going to put the server on Ubuntu!
Thank you!
|
... depends on the traffic ...
Instead of Apache I suggest to build NGINX... its perfect Webserver for virtualization
|
|
|
01-24-2011, 09:39 AM
|
#3
|
Member
Registered: Jun 2010
Posts: 37
Original Poster
Rep:
|
Thanks, man! Then I'm virtualizing it! If it doesn't work well I'll use a separate machine, but I think it WILL!
Quote:
Originally Posted by dlugasx
... depends on the traffic ...
Instead of Apache I suggest to build NGINX... its perfect Webserver for virtualization
|
|
|
|
01-24-2011, 12:08 PM
|
#4
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
|
What are the fundamental principles that determine whether an application is best virtualised or native?
|
|
|
01-25-2011, 05:00 AM
|
#5
|
Member
Registered: Jun 2010
Posts: 37
Original Poster
Rep:
|
Mostly traffic. That's because database servers have a great traffic they are preferred to be native. At least I've read so...
Here's what I've read
http://www.google.bg/url?sa=t&source...RAt0Rg&cad=rja
Quote:
Originally Posted by catkin
What are the fundamental principles that determine whether an application is best virtualised or native?
|
|
|
|
01-26-2011, 11:28 AM
|
#6
|
Member
Registered: Jul 2006
Location: Belgium
Distribution: Debian, Fedora, CentOS, Windows
Posts: 361
Rep: 
|
Quote:
Originally Posted by yovkoi
|
Although network traffic is a possible issue, you usually want to use physical machine for heavy I/O operations. Virtualized machines are in general not really suited for this kind of work. That's the reason why it is not advised in general to virtualize a database server.
|
|
|
01-27-2011, 10:52 AM
|
#7
|
Member
Registered: Jun 2010
Posts: 37
Original Poster
Rep:
|
Isn't traffic a heavy IO operation!? Isn't it what someone means by saying "heavy IO operation"?
Quote:
Originally Posted by Blue_Ice
Although network traffic is a possible issue, you usually want to use physical machine for heavy I/O operations. Virtualized machines are in general not really suited for this kind of work. That's the reason why it is not advised in general to virtualize a database server.
|
|
|
|
01-27-2011, 12:14 PM
|
#8
|
Member
Registered: Jul 2006
Location: Belgium
Distribution: Debian, Fedora, CentOS, Windows
Posts: 361
Rep: 
|
Quote:
Originally Posted by yovkoi
Isn't traffic a heavy IO operation!? Isn't it what someone means by saying "heavy IO operation"?
|
Disk I/O... Disks are often the slowest part in a server. Especially when shared with different VPS's. Actually optic fibre channels are so fast that a HD cannot keep up.
Last edited by Blue_Ice; 01-27-2011 at 12:17 PM.
|
|
|
01-27-2011, 12:49 PM
|
#9
|
Senior Member
Registered: Dec 2010
Location: Finland
Distribution: Xubuntu, CentOS, LFS
Posts: 1,723
|
Apache virtualizes very well, especially if you use PHP or Python scripts and are not constrained by storage I/O.
I recommend trimming the Apache modules, though, to a set that fulfills your needs, but does not include unused ones. Also, limit the maximum run time and memory each script interpreter instance is allowed to use, for both security and stability. That way a runaway script won't be able to consume all available memory and crash Apache.
A typical web site has a lot of small files used on most pages -- CSS stylesheets, user interface images, and so on. These are typically cached in memory (automatically by the kernel, because they're so often accessed) and do not incur physical storage I/O. These are rarely any kind of a bottleneck, since even a low-power virtual processor can fill a 1Gbit/s pipe from memory-cached files. The CPU needed by script pages is usually offset by their lower storage I/O requirements.
The next typical bottleneck is the database server the scripts get their contents from (or, more accurately, the limited number of connections allowed to the database server). Please make sure you have enough connections available to service each script instance Apache is allowed to have, so that users don't get those annoying "Database unavailable" error messages. If using the prefork model, it's perfectly reasonable to reduce the maximum number of children to the number of database connections available.
Nominal Animal
Last edited by Nominal Animal; 03-21-2011 at 08:31 AM.
|
|
|
01-27-2011, 01:06 PM
|
#10
|
Senior Member
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278
|
Quote:
Originally Posted by catkin
What are the fundamental principles that determine whether an application is best virtualised or native?
|
The general consensus of where I work, one of the car companies, is that anything that is PRODUCTION will NOT be virtualized. Virtualization is best left for development environments due to the ease of staging a new VM for testing.
So anyway, we ignore that and virtualize all kinds of production stuff.
We sometimes run benchmarks of an application on bare-metal, then compare them with benchmarks of the same application virtualized, using LoadRunner to engage the traffic. If it is comparable, within 10%, we will roll with it. If not, we will put it on iron.
In my opinion, Java runs like crap in virtualized environments. Big Mysql db's bottlenecks in virtualized environments. Anything with lots of Disk I/O really suffers, such as FreeNAS and such.
Vmware will stomp their feet and tell you all the great things about virtualization and how it can save you money on hardware, and speed isn't an issue, and blah blah blah. But remember, they are trying to sell you a product, by any means necessary. Virtualization will always cause a hit in performance. It just depends on how much performance you are willing to lose.
IMHO
|
|
1 members found this post helpful.
|
01-28-2011, 02:05 AM
|
#11
|
Member
Registered: Jun 2010
Posts: 37
Original Poster
Rep:
|
Thanks szboardstretcher and Nominal Animal. That was a great explanation and I'm gonna put it in use!
|
|
|
01-28-2011, 07:02 AM
|
#12
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
|
Quote:
Originally Posted by yovkoi
Thanks szboardstretcher and Nominal Animal. That was a great explanation and I'm gonna put it in use!
|
+1 to that 
|
|
|
All times are GMT -5. The time now is 11:48 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|