looking at the old article https://lwn.net/Articles/376606/
vm.nr_overcommit_hugepages "Knowing the exact huge page requirements in advance may not be possible. For example, the huge page requirements may be expected to vary throughout the lifetime of the system. In this case, the maximum number of additional huge pages that should be allocated is specified with the vm.nr_overcommit_hugepages. When a huge page pool does not have sufficient pages to satisfy a request for huge pages, an attempt to allocate up to nr_overcommit_hugepages is made. If an allocation fails, the result will be that mmap() will fail to avoid page fault failures as described in Huge Page Fault Behaviour in part 1. " So, maybe if we vm.nr_overcommit_hugepages, application can reserve hugepages without need to increase them manually I need to test that ----- Mail original ----- De: "aderumier" <aderum...@odiso.com> À: "dietmar" <diet...@proxmox.com> Cc: "pve-devel" <pve-devel@pve.proxmox.com> Envoyé: Jeudi 12 Mai 2016 14:05:56 Objet: Re: [pve-devel] [PATCH 1/2] add hugepages option >>who mount that? Do I still need above setup? How do I know the number >>of required hugepages in advance? How can we make that more convenient for >>the user? It's quite possible to increase/decrease hugepage online, at least of 2MB hugepages, through sysfs. echo X > /proc/sys/vm/nr_hugepages can be done at vm start/stop for example For 1GB hugepages, it's more difficult because of memory fragmentation. But basicaly, THP can already do the job for 2MB hugepage for 1GB,THP don't work. and recommendation are to define them at start, because they need contigous memory ----- Mail original ----- De: "dietmar" <diet...@proxmox.com> À: "aderumier" <aderum...@odiso.com>, "pve-devel" <pve-devel@pve.proxmox.com> Envoyé: Jeudi 12 Mai 2016 12:57:42 Objet: Re: [pve-devel] [PATCH 1/2] add hugepages option > host configuration > ------------------ > hugepages need to be allocated at boot > > for 4GB of 2M hugepages > > /etc/default/grub > ----------------- > GRUB_CMDLINE_LINUX_DEFAULT="quiet hugepagesz=2M hugepages=2048" > > /etc/fstab > ---------- > hugetlbfs /dev/hugepages hugetlbfs pagesize=2048k 0 0 > > for 4GB for 1GB hugepages > > /etc/default/grub > ----------------- > GRUB_CMDLINE_LINUX_DEFAULT="quiet default_hugepagesz=1G hugepagesz=1G > hugepages=4" It is still unclear to me how to setup hugepages. On my host /dev/hugepages is already mounted: # mount|grep hugecgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb,release_agent=/run/cgmanager/agents/cgm-release-agent.hugetlb,nsroot=/) hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime) hugetlb on /run/lxcfs/controllers/hugetlb type cgroup (rw,relatime,hugetlb,release_agent=/run/cgmanager/agents/cgm-release-agent.hugetlb,nsroot=/) who mount that? Do I still need above setup? How do I know the number of required hugepages in advance? How can we make that more convenient for the user? _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel