configuration needed for P4 2GHz 1GB RAM and 2GB swap [message #15672] |
Thu, 09 August 2007 18:00 |
snoozer
Messages: 2 Registered: June 2007
|
Junior Member |
|
|
hi,
i am completely puzzled by the configuration options for memory. i am looking for a way to use 6 VM's sharing the resources of an P4 2GHz with 1 GB Ram and 2 GB Swap. i keep having trouble with error messages like "cannot allocate memory". but only sometimes and not other times, its really frustrating not to find a setting which keeps everything going. to make this clear, i am NOT looking for a all-resources divided by 6 solution, i am more looking for a nice way to SHARE resources between all 6 VM's. the very strange thing is that the VM's do not use any swap.
i am looking forward to any help.
PS: if i do everything on an old cobalt raq with 32MB Ran what i am doing on the VM, i never get a "cannot allocate memory", everything just takes ages. can that behavior somehow be replicated on the VM's ?
regards
Jan
|
|
|
|
|
|
Re: configuration needed for P4 2GHz 1GB RAM and 2GB swap [message #16007 is a reply to message #16000] |
Sat, 18 August 2007 18:53 |
|
dowdle
Messages: 261 Registered: December 2005 Location: Bozeman, Montana
|
Senior Member |
|
|
Just to clarify about the vps.basic sample. It is my understanding that the values you will find there were meant to split a reasonably fast machine with 2GB of RAM into 120 VPSes. The vps.light one was designed for 320 VPSes.
The basic will run most of the default OS Templates just fine... that include sshd and apache but not much else. If you add PHP and/or a database... and/or other services, you'll definitely need to up the resources... and yes, vzsplit is a good place to start with creating custom config files... but you'll still need to monitor the VPSes you create for a while and up any values as needed... until you get to a place where you don't have any failures. This might be problematic on systems that have periodic spikes, but since resources are dynamic, resources can be increased during a spike and reduce after it is over. Currently it is a very manual process.
The basic and light samples are very lean on purpose. It makes sense to start light and increase resources as needed... rather than starting with arbitrarily high values and expecting users to scale back resources. How much memory should we assume a machine has and how fast of a CPU? vzsplit will take a look and generate a config sample specifically for your hardware.
The good thing is that OpenVZ really excels in DYNAMIC resource management... and you can tweak all of the values without having to restart your VPS. None of the other virtualization products out there offer much in the way of resource management much less dynamic resource management.
--
TYL, Scott Dowdle
Belgrade, Montana, USA
[Updated on: Sat, 18 August 2007 19:02] Report message to a moderator
|
|
|
|
|
|
Re: configuration needed for P4 2GHz 1GB RAM and 2GB swap [message #16029 is a reply to message #16024] |
Sun, 19 August 2007 01:27 |
|
dowdle
Messages: 261 Registered: December 2005 Location: Bozeman, Montana
|
Senior Member |
|
|
locutius wrote on Sat, 18 August 2007 15:09 |
the wiki gives the impression of a fast start up which you can then run with and tune as you go. but that is not the reality because of the default configs which are conservative rather than generous.
|
As stated previously, for a default we want conservative rather than generous. That is a judgement call. If it was the other way around there would be a group of people asking why. There isn't really a way to choose and make everyone happy.
Quote: | today i am editing my own templates and making my own configs but only by necessity
|
Good. Using vzsplit? It is pretty darn handy... but then again... you STILL have to monitor your UBCs and adjust for failures until it is tuned. Again, this is the nature of the beast. All of the other virtualization products don't give you much choice... you absolutely must dedicate to each virtual machine as many resources (especially with regards to memory) as you would a physical machine... and that means you can only fit a handful of virtual machines per physical machine. With OpenVZ you can easily fit dozens and even hundreds if you machines are only a couple of lighter weight apps. And again, OpenVZ let's you manage all of the resources dynamically... so you can adjust anything on the fly. With that flexibility does come complexity.
Quote: | the single blocker i hit was deep in the HN network config that could not have been solved from the documentation, the solution required knowledge from experience. i maintain this is a hole in the wiki because it is intuitive to map IPs to a HN NIC
|
Let me ask you this... if you had been installing VMware or Xen would you have assumed that you need to pre-configure the host machine for all of the network interfaces you plan to use in virtual machines? I'm guessing not.
Quote: | is this sane?
SHMPAGES="6553:6553"
i guessed to reduce the PRIVVMPAGES by a factor 10
|
It might be sane if your virtual machine will work with those values. I can only tell you what the VPSes I run need. I run a few fairly heavy VPSes, a few pretty light ones... and a couple of absolute pigs. The configs between those machines vary greatly.
The pig VPSes are running Zimbra (only one Zimbra VPS per physical host though). Zimbra's system requirements basically say that Zimbra should be installed on a standalone server as the only application.
With OpenVZ I've been able to run Zimbra in a VPS along with 6 other VPSes on the hardware node... and while it did take me about a week to get it tweaked, I haven't had to change any of the resource settings since... and the two boxes I have running Zimbra have been doing so for about a year and a half.
If your VPSes are all a like, then vzsplit will do almost all of your work for you.
--
TYL, Scott Dowdle
Belgrade, Montana, USA
|
|
|
Re: configuration needed for P4 2GHz 1GB RAM and 2GB swap [message #16062 is a reply to message #16029] |
Mon, 20 August 2007 18:10 |
locutius
Messages: 125 Registered: August 2007
|
Senior Member |
|
|
nice reply
i investigated VMware or Xen 18 months ago when this project was started and decided then i could not operate VPS under the conditions of their use
the VPS are intended to run MySQL intensive high-traffic web applications (hence the multi dual-core cpu HN). security is also an issue with these sites and the HN has to run antidos parsing and high volume ipfiltering (2.6million+ ips) to protect the VPS services
i have 2 x VPS now operational on the HN but the admins have not yet cranked up the traffic, so we will have to wait and see what the real limits are going to be and what needs to be done to the config
vzsplit is the definitive application for anyone setting up VZ. the first thing to do on your box is run vzsplit to determine the true HN limits. then edit the template config and adjust the settings to your expectations for the VPS (set RAM and Disk). of course this is only good when all VPS are the same, but it is a better place to start than the default config because the default config does not reflect your true HN capabilities
vzsplit is also useful because it educates how VZ is treating the i/o level of the o/s. some settings are more important than others, while there are upper/lower limits to others, and many of the settings are directly interrelated. i discovered this running vzsplit for 8, 16, 24, 32, 40, 48, 54 (61 is the limit) ways then comparatively reading the configuration output. i recommend this to everyone to get a grasp of how VZ is working and how to configure your VPS
|
|
|
|
|
|