I want to add more context, how things are done under Kubernetes, Ovirt and OpenStackKubernetes
- you can request both regular memory and hugepages after it if you want to use hugepages, you can use the hugepages mount for memory allocation
- k8s does not allow to allocate more hugepages than floor(hugepages_memory_size / hugepages_size), for example when you specified "hugepages-2Mi: 101Mi" on a pod, a process under the pod cannot use more than 50 2Mi hugepages
Ovirt
- to configure hugepages, you need to specify the VM memory and the size of hugepages(2Mi, 1Gi)
- in the case when a VM memory does not divisible by hugepages size, it will ceil the number of hugepages(a user requested 1.5Gi of memory with hugepages of size 1Gi, the VM will allocate 2 hugepages), the Ovirt scheduler will check if some host has 2 hugepages of size 1Gi, if yes, it will start the VM, if not it will reject the start and will show validation error
I less familiar with the OpenStack, so if I wrong please correct me, I took all information from [1][1] https://specs.openstack.org/openstack/nova-specs/specs/kilo/implemented/virt-driver-large-pages.html
- you need to specify hugepages size on the flavor level, under OpenStack it has more options(large|any|2MB|1GB)
- If the flavor memory size is not a multiple of the specified huge page size this would be considered as an error which would cause the instance to fail to boot
On Monday, June 4, 2018 at 6:35:26 PM UTC+3, aluk...@redhat.com wrote:Hi guys,I am currently working on hugepages support for VM's, the PR[1] is pretty straightforward, but before continuing I want to hear some opinions about VM API and validation aspects.How hugepages VM API must look?I thought to use resources section to specify the number of hugepages that I needed, similar to Kubernetes approach[2], butso by my opinion resource section does not suite good for VM hugepages representation, I prefer to use some new field to specify hugepages size(2Mi, 1Gi) with memory request.
- unlike pods, a VM cannot use both regular memory and hugepages, so specifying both memory and hugepages resources looks too complicate for me
- hugepages resource does not support over-commitment, so you can specify both limit and request, but you do not need(if you will specify only limit, k8s will add request automatically, but if you will specify only request, k8s will complain that limit is missing)
What do we want to do in cases when VM memory request does not divisible by hugepage size?
- create VM with hugepages number equals to "ceil(memory request / hugepage size), for example in the case of 21Mi, we will set 11 2Mi hugepages on a virt-launcher pod
- just show validation error, without VM creation
--
You received this message because you are subscribed to the Google Groups "kubevirt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev+unsubscribe@googlegroups.com.
To post to this group, send email to kubevi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubevirt-dev/4cfec6ff-6085-49ee-90a4-554590d83e3a%40googlegroups.com.
On Tue, Jun 5, 2018 at 9:58 AM, <aluk...@redhat.com> wrote:I want to add more context, how things are done under Kubernetes, Ovirt and OpenStackKubernetes
- you can request both regular memory and hugepages after it if you want to use hugepages, you can use the hugepages mount for memory allocation
- k8s does not allow to allocate more hugepages than floor(hugepages_memory_size / hugepages_size), for example when you specified "hugepages-2Mi: 101Mi" on a pod, a process under the pod cannot use more than 50 2Mi hugepages
Ovirt
- to configure hugepages, you need to specify the VM memory and the size of hugepages(2Mi, 1Gi)
- in the case when a VM memory does not divisible by hugepages size, it will ceil the number of hugepages(a user requested 1.5Gi of memory with hugepages of size 1Gi, the VM will allocate 2 hugepages), the Ovirt scheduler will check if some host has 2 hugepages of size 1Gi, if yes, it will start the VM, if not it will reject the start and will show validation error
I less familiar with the OpenStack, so if I wrong please correct me, I took all information from [1][1] https://specs.openstack.org/openstack/nova-specs/specs/kilo/implemented/virt-driver-large-pages.html
- you need to specify hugepages size on the flavor level, under OpenStack it has more options(large|any|2MB|1GB)
- If the flavor memory size is not a multiple of the specified huge page size this would be considered as an error which would cause the instance to fail to boot
Hey Artyom,thanks for providing this additional context.As you nicely noted, for the VM guest either memory or hugepages can be allocated. However - and I know wes spoke about it, just noting it - qemu libvirt etc still need memory, thus if HP are requested, we also need to requets memory (the overhead amount).
To view this discussion on the web visit https://groups.google.com/d/msgid/kubevirt-dev/CA%2BPVUaQwg1OARD99hQOacOWWizWuGF0DRhHVatPnXi%3DyQ_N5eQ%40mail.gmail.com.
On Wed, Jun 6, 2018 at 8:59 AM, Fabian Deutsch <fdeu...@redhat.com> wrote:On Tue, Jun 5, 2018 at 9:58 AM, <aluk...@redhat.com> wrote:I want to add more context, how things are done under Kubernetes, Ovirt and OpenStackKubernetes
- you can request both regular memory and hugepages after it if you want to use hugepages, you can use the hugepages mount for memory allocation
- k8s does not allow to allocate more hugepages than floor(hugepages_memory_size / hugepages_size), for example when you specified "hugepages-2Mi: 101Mi" on a pod, a process under the pod cannot use more than 50 2Mi hugepages
Ovirt
- to configure hugepages, you need to specify the VM memory and the size of hugepages(2Mi, 1Gi)
- in the case when a VM memory does not divisible by hugepages size, it will ceil the number of hugepages(a user requested 1.5Gi of memory with hugepages of size 1Gi, the VM will allocate 2 hugepages), the Ovirt scheduler will check if some host has 2 hugepages of size 1Gi, if yes, it will start the VM, if not it will reject the start and will show validation error
I less familiar with the OpenStack, so if I wrong please correct me, I took all information from [1][1] https://specs.openstack.org/openstack/nova-specs/specs/kilo/implemented/virt-driver-large-pages.html
- you need to specify hugepages size on the flavor level, under OpenStack it has more options(large|any|2MB|1GB)
- If the flavor memory size is not a multiple of the specified huge page size this would be considered as an error which would cause the instance to fail to boot
Hey Artyom,thanks for providing this additional context.As you nicely noted, for the VM guest either memory or hugepages can be allocated. However - and I know wes spoke about it, just noting it - qemu libvirt etc still need memory, thus if HP are requested, we also need to requets memory (the overhead amount).How closely are we aiming to guessimate the overhead? My understanding is traditionally this has been challenging and other offerings in the virtualization space using this stack have used a fixed value per host (which is imperfect as the amount required for QEMU can fluctuate based on the number of devices etc. of the guest itself)?
Thanks,Steve
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev...@googlegroups.com.
To post to this group, send email to kubevi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubevirt-dev/4cfec6ff-6085-49ee-90a4-554590d83e3a%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "kubevirt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev...@googlegroups.com.
To post to this group, send email to kubevi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubevirt-dev/CA%2BPVUaQwg1OARD99hQOacOWWizWuGF0DRhHVatPnXi%3DyQ_N5eQ%40mail.gmail.com.
--Stephen Gordon,
Principal Product Manager,
Red Hat
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubevirt-dev/872b931b-d24f-4b16-9cd9-51f93f7b6d4d%40googlegroups.com.
On Tue, Jun 5, 2018 at 9:58 AM, <aluk...@redhat.com> wrote:I want to add more context, how things are done under Kubernetes, Ovirt and OpenStackKubernetes
- you can request both regular memory and hugepages after it if you want to use hugepages, you can use the hugepages mount for memory allocation
- k8s does not allow to allocate more hugepages than floor(hugepages_memory_size / hugepages_size), for example when you specified "hugepages-2Mi: 101Mi" on a pod, a process under the pod cannot use more than 50 2Mi hugepages
Ovirt
- to configure hugepages, you need to specify the VM memory and the size of hugepages(2Mi, 1Gi)
- in the case when a VM memory does not divisible by hugepages size, it will ceil the number of hugepages(a user requested 1.5Gi of memory with hugepages of size 1Gi, the VM will allocate 2 hugepages), the Ovirt scheduler will check if some host has 2 hugepages of size 1Gi, if yes, it will start the VM, if not it will reject the start and will show validation error
I less familiar with the OpenStack, so if I wrong please correct me, I took all information from [1][1] https://specs.openstack.org/openstack/nova-specs/specs/kilo/implemented/virt-driver-large-pages.html
- you need to specify hugepages size on the flavor level, under OpenStack it has more options(large|any|2MB|1GB)
- If the flavor memory size is not a multiple of the specified huge page size this would be considered as an error which would cause the instance to fail to boot
Hey Artyom,thanks for providing this additional context.As you nicely noted, for the VM guest either memory or hugepages can be allocated. However - and I know wes spoke about it, just noting it - qemu libvirt etc still need memory, thus if HP are requested, we also need to requets memory (the overhead amount).
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev...@googlegroups.com.
To post to this group, send email to kubevi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubevirt-dev/4cfec6ff-6085-49ee-90a4-554590d83e3a%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "kubevirt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev...@googlegroups.com.
To post to this group, send email to kubevi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubevirt-dev/CA%2BPVUaQwg1OARD99hQOacOWWizWuGF0DRhHVatPnXi%3DyQ_N5eQ%40mail.gmail.com.
On 7 Jun 2018, at 23:21, Itamar Heim <ih...@redhat.com> wrote:On Wed, Jun 6, 2018, 08:59 Fabian Deutsch <fdeu...@redhat.com> wrote:On Tue, Jun 5, 2018 at 9:58 AM, <aluk...@redhat.com> wrote:I want to add more context, how things are done under Kubernetes, Ovirt and OpenStackKubernetes
- you can request both regular memory and hugepages after it if you want to use hugepages, you can use the hugepages mount for memory allocation
- k8s does not allow to allocate more hugepages than floor(hugepages_memory_size / hugepages_size), for example when you specified "hugepages-2Mi: 101Mi" on a pod, a process under the pod cannot use more than 50 2Mi hugepages
Ovirt
- to configure hugepages, you need to specify the VM memory and the size of hugepages(2Mi, 1Gi)
- in the case when a VM memory does not divisible by hugepages size, it will ceil the number of hugepages(a user requested 1.5Gi of memory with hugepages of size 1Gi, the VM will allocate 2 hugepages), the Ovirt scheduler will check if some host has 2 hugepages of size 1Gi, if yes, it will start the VM, if not it will reject the start and will show validation error
I less familiar with the OpenStack, so if I wrong please correct me, I took all information from [1][1] https://specs.openstack.org/openstack/nova-specs/specs/kilo/implemented/virt-driver-large-pages.html
- you need to specify hugepages size on the flavor level, under OpenStack it has more options(large|any|2MB|1GB)
- If the flavor memory size is not a multiple of the specified huge page size this would be considered as an error which would cause the instance to fail to boot
Hey Artyom,thanks for providing this additional context.As you nicely noted, for the VM guest either memory or hugepages can be allocated. However - and I know wes spoke about it, just noting it - qemu libvirt etc still need memory, thus if HP are requested, we also need to requets memory (the overhead amount).Would libvirt and qemu consume hugepages for themselves?
To view this discussion on the web visit https://groups.google.com/d/msgid/kubevirt-dev/CAGpOhB4AAEodWmOThVO36EqdaakJ2j%2B78TDXtM-rAc9vsOsEQg%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubevirt-dev/872b931b-d24f-4b16-9cd9-51f93f7b6d4d%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "kubevirt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev+unsubscribe@googlegroups.com.
To post to this group, send email to kubevi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubevirt-dev/2ef34055-9189-423e-9c44-80a0f609417b%40googlegroups.com.
- fabianHey Artyom,has been a few days - what is your current approach, and how does the API look now?
On Mon, Jun 4, 2018 at 5:35 PM, <aluk...@redhat.com> wrote:
Hi guys,I am currently working on hugepages support for VM's, the PR[1] is pretty straightforward, but before continuing I want to hear some opinions about VM API and validation aspects.How hugepages VM API must look?I thought to use resources section to specify the number of hugepages that I needed, similar to Kubernetes approach[2], butso by my opinion resource section does not suite good for VM hugepages representation, I prefer to use some new field to specify hugepages size(2Mi, 1Gi) with memory request.
- unlike pods, a VM cannot use both regular memory and hugepages, so specifying both memory and hugepages resources looks too complicate for me
- hugepages resource does not support over-commitment, so you can specify both limit and request, but you do not need(if you will specify only limit, k8s will add request automatically, but if you will specify only request, k8s will complain that limit is missing)
What do we want to do in cases when VM memory request does not divisible by hugepage size?
- create VM with hugepages number equals to "ceil(memory request / hugepage size), for example in the case of 21Mi, we will set 11 2Mi hugepages on a virt-launcher pod
- just show validation error, without VM creation
--
You received this message because you are subscribed to the Google Groups "kubevirt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev+unsubscribe@googlegroups.com.
To post to this group, send email to kubevi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubevirt-dev/bc3e16f7-cc66-4360-9f89-a40209aeefc5%40googlegroups.com.