Re: [kvm-devel] a few may be wiki question
On Wed, 2007-08-15 at 11:07 +0300, Avi Kivity wrote: Farkas Levente wrote: this rise another question if swapping will be used the it moves the guest memory to the guest's swap or the host's swap? if to the host's swap then this implies i should have to allocate large enough swap for the host. ie. even if i give only 256mb to the host still have to gives 6-8GB swap partition to the host. Yes, when swapping is implemented then guest memory will be swapped to the host swap. Of course, if the guest has its own swap file, then it will swap to the guest's swap independently. And to clarify: FYI, I believe the guest-swap option should actually work today. If you assign a partition as a swap device in the guest it should use it. kvm-host will simply see it as disk io as any other. This is in contrast to the host-swap and/or balloon driver which is still a work-in-progress. On thing that is interesting about this (to me) is that, in a way it kind of is a poor mans swap for the guests memory on the host. E.g. you could give your guests a really small amount of physical ram (say, I dunno, 64MB/ea) and a large swap file (say several gigs). Since the disk-io emanating from the guest would likely be mediated by the hosts buffercache, its kind of like you just gave the guest a large chunk of (indirectly accessible) pageable ram. OTOH, virtualized disk-io is pretty slow compared to bare-metal io. As I said, this is a poor mans solution ;) What it really comes down to is: does having emulated disk-io to a buffercache offer adequate performance for your applications running in the guest? If so, this may be a good interim solution to get a larger number of guests running on a given host with dynamic ram. Regards, -Greg - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] a few may be wiki question
Gregory Haskins wrote: On Wed, 2007-08-15 at 11:07 +0300, Avi Kivity wrote: Farkas Levente wrote: this rise another question if swapping will be used the it moves the guest memory to the guest's swap or the host's swap? if to the host's swap then this implies i should have to allocate large enough swap for the host. ie. even if i give only 256mb to the host still have to gives 6-8GB swap partition to the host. Yes, when swapping is implemented then guest memory will be swapped to the host swap. Of course, if the guest has its own swap file, then it will swap to the guest's swap independently. And to clarify: FYI, I believe the guest-swap option should actually work today. If you assign a partition as a swap device in the guest it should use it. kvm-host will simply see it as disk io as any other. This is in contrast to the host-swap and/or balloon driver which is still a work-in-progress. On thing that is interesting about this (to me) is that, in a way it kind of is a poor mans swap for the guests memory on the host. E.g. you could give your guests a really small amount of physical ram (say, I dunno, 64MB/ea) and a large swap file (say several gigs). Since the disk-io emanating from the guest would likely be mediated by the hosts buffercache, its kind of like you just gave the guest a large chunk of (indirectly accessible) pageable ram. i just imagine th opposite setup. suppose i've got 4 guest and 4gb ram. most of the time guest are idle they just used as a compile server for different platforms (centos, mandrake, fedora, windows etc). i can schedule the compiles (ie. 1:00 guest1, 2:00 guest 2 etc). in this case i gives the host 1-2gb and all guest 2-3gb logical ram. which is in sum 9-14gb ram even i have only 4gb physical ram. _BUT_ as i know that the guests are usually idle _and_ they have high resource requirement at different time, probably all of them can use 2-3gb real ram as memory. and in this setup if all other time most of the guest's ram are swapped out it's not really bother me since they are idle. or did is something misunderstood? -- Levente Si vis pacem para bellum! - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] a few may be wiki question
On Wed, 2007-08-15 at 15:52 +0200, Farkas Levente wrote: Gregory Haskins wrote: On thing that is interesting about this (to me) is that, in a way it kind of is a poor mans swap for the guests memory on the host. E.g. you could give your guests a really small amount of physical ram (say, I dunno, 64MB/ea) and a large swap file (say several gigs). Since the disk-io emanating from the guest would likely be mediated by the hosts buffercache, its kind of like you just gave the guest a large chunk of (indirectly accessible) pageable ram. i just imagine th opposite setup. suppose i've got 4 guest and 4gb ram. most of the time guest are idle they just used as a compile server for different platforms (centos, mandrake, fedora, windows etc). i can schedule the compiles (ie. 1:00 guest1, 2:00 guest 2 etc). in this case i gives the host 1-2gb and all guest 2-3gb logical ram. which is in sum 9-14gb ram even i have only 4gb physical ram. _BUT_ as i know that the guests are usually idle _and_ they have high resource requirement at different time, probably all of them can use 2-3gb real ram as memory. and in this setup if all other time most of the guest's ram are swapped out it's not really bother me since they are idle. or did is something misunderstood? I think you are just misunderstanding me. We are saying the same thing (I think) :) What it sounds like you are talking about is oversubscribing your ram. IIUC this is not possible today unless you employ a guest-swap scheme like I mentioned. Until the balloon/swap support is in, the guest ram allocation aggregated across all VMs cannot exceed host-physical ram (in your case, 4GB). In fact, it has to be a little less of course so the host still has some to play with ;) - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] a few may be wiki question
Farkas Levente wrote: hi, i try to setup a centos host server with kvm and a few guest os for the first time. imho there is only a very limited docs about kvm (even if i try to read them:-). so there are a few general questions: - which is the recommended host config?: - should i used x86_64 or i386 host kernel? i don't know in advance, but probably most guest os will be 32 bit. is there any advantage or disadvantage to use x86_64 as a host os? If you have more than 1GB of RAM, 64-bit will be slightly faster. Otherwise there is no preference. - i'll use kernel-2.6.18-8.1.8.el5, but i read in the announcement for kvm-34: running on a host earlier than Linux 2.6.23-rc2 will experience a slight performance degradation what does exactly means and how much is the slight? or if i use older kernel it's better to use kvm-33? It's likely not measurable for most uses. It's recommended to always use the latest kvm version in order to get the latest fixes and enhancements. - i read in faq 3.6: for the host. 1GB is probably a minimum configuration for the host OS. does this means i have to reserve 1GB for the host os? No. That is the total amount of RAM on the host (and it's a recommendation -- you can work with less if you like). it's strange for me just because eg with xen dom0 we use 256MB and it was enough since dom0 don't have any real load. it's not the case with kvm? It depends on what the host is doing. If it isn't running any workload, even 128MB should be enough. who much ram should i use for the guest os? That's for you to choose; select as much memory as the guest needs and you can give it. eg if i use 6 guest then i need at least 6GB of ram? If each guest gets 1GB, yes. But you can give guests less memory. - is dynamic use of RAM for host operating system supported? What's that? - what is the recommended size for the host disk partition? Whatever is sufficient for your distro. I use 10GB usually (FC6/F7). - what is the recommended swap partition size for the host os ? The regular recommendation of your distro. Size of RAM is usually ok. - which is the recommended guest config? - what is the recommended memory for a guest os? same as i would run natively? Yes. Depending on workload and budget. - what is the recommended guest disk image format? should i use an lvm partition as guest os partition (like in xen)? what is the recommended format assuming that may be later i'd like to add new guests and what is the performance differences (ie. which is the fastest format)? Depends on workload. lvm is fastest, qcow2 is most flexible and managable. If your guest is not issuing significant disk I/O, I'd recommend qcow2. Otherwise lvm. - what is the recommended swap partition format and size for the guest os ? Whatever is recommended by the guest OS vendor. - what is the current general state of kvm ie. stability, performance support etc? i mean for non mission critical production server it's worth to choose in stead of xen or not? I find it very stable. Try it out! i know most of my questions are too general, but almost all answer will start as it's depend on.. but still a general guideline would be useful. last but not least may be a kvm-user list would be useful where such questions can send and not disturbing all the developers. Well, my stance on this is that if a user needs to send such an email, then the application or documentation is missing and should be fixed. The developers need to be bothered until the situation is corrected. Having a users list is just a cover up for bad usability and documentation. I regard this type of email as valuable feedback, not disturbance. [now back to not writing documentation] -- error compiling committee.c: too many arguments to function - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] a few may be wiki question
On Tue, 2007-08-14 at 15:50 +0300, Avi Kivity wrote: Farkas Levente wrote: hi, i try to setup a centos host server with kvm and a few guest os for the first time. imho there is only a very limited docs about kvm (even if i try to read them:-). so there are a few general questions: - which is the recommended host config?: - should i used x86_64 or i386 host kernel? i don't know in advance, but probably most guest os will be 32 bit. is there any advantage or disadvantage to use x86_64 as a host os? If you have more than 1GB of RAM, 64-bit will be slightly faster. Otherwise there is no preference. One other difference is that x86_64 host can run either 32 or 64 bit guest. i386 can only run 32 bit. -Greg - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] a few may be wiki question
hi, first of all thanks for the quick reply! Avi Kivity wrote: Farkas Levente wrote: - i read in faq 3.6: for the host. 1GB is probably a minimum configuration for the host OS. does this means i have to reserve 1GB for the host os? No. That is the total amount of RAM on the host (and it's a recommendation -- you can work with less if you like). it's strange for me just because eg with xen dom0 we use 256MB and it was enough since dom0 don't have any real load. it's not the case with kvm? It depends on what the host is doing. If it isn't running any workload, even 128MB should be enough. who much ram should i use for the guest os? That's for you to choose; select as much memory as the guest needs and you can give it. eg if i use 6 guest then i need at least 6GB of ram? If each guest gets 1GB, yes. But you can give guests less memory. - is dynamic use of RAM for host operating system supported? What's that? ok i try explain our plan and ask a better question about the memory setup. this may clean things a bit. i like to setup a server for the development dept. which compiles softwares. we need to compile on different platforms so we need: - one main server for the development (svn, trac, pxe boot, web, email etc, plus compile and test) centos 5 normally just this guest have some load. - mandrake 8.2 and mandrake 10 (to compile and test) don't have any load, but during compile they have high cpu and disk load. - windows may be two different 2000 and XP (to compile and test) don't have any load, but during compile they have high cpu and disk load. so i need a host and about 4 guest (i assume it also not recommended to use the host for others just to run the guests?!). i assume 4GB ram and think about: - 256MB for the host. is there any reason to give more memory for the host if it's only running the guests (kernel, ntp, local mail, ssh nothing else running on it). - -m 2000 for centos 5 - -m 768 for each mandrake and windows fist of all is it possible to give more dynamic memory for guests as the sum of the whole memory? if not what is the purpose of dynamic memory? is the host can also dynamically get/steal memory from guests? or even i can give -m 2000 for all guest and the host and they will try to compete for the memory? so in short in the above setup what is the recommended config for the host and for the guest os? - what is the recommended guest disk image format? should i use an lvm partition as guest os partition (like in xen)? what is the recommended format assuming that may be later i'd like to add new guests and what is the performance differences (ie. which is the fastest format)? Depends on workload. lvm is fastest, qcow2 is most flexible and managable. If your guest is not issuing significant disk I/O, I'd recommend qcow2. Otherwise lvm. what does the flexible and managable means? i plan the whole system is on 2 x 250gb hdd in a raid1 and the host and each guest has an lvm partition as /. -- Levente Si vis pacem para bellum! - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] a few may be wiki question
Farkas Levente wrote: - is dynamic use of RAM for host operating system supported? What's that? ok i try explain our plan and ask a better question about the memory setup. this may clean things a bit. i like to setup a server for the development dept. which compiles softwares. we need to compile on different platforms so we need: - one main server for the development (svn, trac, pxe boot, web, email etc, plus compile and test) centos 5 normally just this guest have some load. - mandrake 8.2 and mandrake 10 (to compile and test) don't have any load, but during compile they have high cpu and disk load. - windows may be two different 2000 and XP (to compile and test) don't have any load, but during compile they have high cpu and disk load. so i need a host and about 4 guest (i assume it also not recommended to use the host for others just to run the guests?!). i assume 4GB ram and think about: - 256MB for the host. is there any reason to give more memory for the host if it's only running the guests (kernel, ntp, local mail, ssh nothing else running on it). - -m 2000 for centos 5 - -m 768 for each mandrake and windows fist of all is it possible to give more dynamic memory for guests as the sum of the whole memory? if not what is the purpose of dynamic memory? is the host can also dynamically get/steal memory from guests? or even i can give -m 2000 for all guest and the host and they will try to compete for the memory? There are two answers to this: - balloon driver (like in Xen) which allows the host to move memory from one guest to another (or from host to guest) - swapping, which allows the host to move guest memory to disk and allocate it to another guest Unfortunately the balloon driver has not been publicly released yet, and swapping is still in early development, so for now you will have to use static allocation. so in short in the above setup what is the recommended config for the host and for the guest os? It really depends on the workload. 256MB for the host is fine, though. - what is the recommended guest disk image format? should i use an lvm partition as guest os partition (like in xen)? what is the recommended format assuming that may be later i'd like to add new guests and what is the performance differences (ie. which is the fastest format)? Depends on workload. lvm is fastest, qcow2 is most flexible and managable. If your guest is not issuing significant disk I/O, I'd recommend qcow2. Otherwise lvm. what does the flexible and managable means? i plan the whole system is on 2 x 250gb hdd in a raid1 and the host and each guest has an lvm partition as /. Flexible means you don't need to allocate all disk space up front, it grows as necessary. With lvm you can defer allocation, but you need manual intervention (and changes in the guest) in order to use more storage. It's also easier to back up, move around, etc. If you have enough space, then lvm can be a good choice. Certainly it gives the best performance. -- error compiling committee.c: too many arguments to function - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] a few may be wiki question
Avi Kivity wrote: There are two answers to this: - balloon driver (like in Xen) which allows the host to move memory from one guest to another (or from host to guest) - swapping, which allows the host to move guest memory to disk and allocate it to another guest Unfortunately the balloon driver has not been publicly released yet, and swapping is still in early development, so for now you will have to use static allocation. ie. the sum of the host and the guests memory should have to be equal with the total physical memory? but then what this faq means? http://kvm.qumranet.com/kvmwiki/FAQ#head-03de45d48dbc4f37baa6e42b8c14a5bd0182b2e2 -- Levente Si vis pacem para bellum! - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] a few may be wiki question
Farkas Levente wrote: Avi Kivity wrote: There are two answers to this: - balloon driver (like in Xen) which allows the host to move memory from one guest to another (or from host to guest) - swapping, which allows the host to move guest memory to disk and allocate it to another guest Unfortunately the balloon driver has not been publicly released yet, and swapping is still in early development, so for now you will have to use static allocation. ie. the sum of the host and the guests memory should have to be equal with the total physical memory? At present, yes. but then what this faq means? http://kvm.qumranet.com/kvmwiki/FAQ#head-03de45d48dbc4f37baa6e42b8c14a5bd0182b2e2 No idea. I didn't add it :) -- error compiling committee.c: too many arguments to function - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel