Memory
-
5-level paging in KVM
Latest kernels such as RHEL8 and above are supporting 5-level page table. You can check if this is available/enabled by looking at /boot/config-$(uname -r). If you don’t want to use 5-level page table, you can disable that by adding ‘no5lvl’ as a kernel parameter in grub file (/boot/grub2/grubenv) and reboot the system. This 5 level… Continue reading
-
What’s virtual address limit of 32bit/64bit Linux kernel?
RHEL 5 code 32bit: include/asm-i386/processor.h /* * User space process size: 3GB (default). */ #define TASK_SIZE (PAGE_OFFSET) 64bit: include/asm-x86_64/processor.h /* * User space process size. 47bits minus one guard page. */ #define TASK_SIZE64 (0x800000000000UL – 4096) /* This decides where the kernel will search for a free chunk of vm * space during mmap’s. */… Continue reading
-
Personal memo for ‘Automatic NUMA Balancing’
Automatic NUMA Balancing It is described in Documentation/sysctl/kernel.txt numa_balancing Enables/disables automatic page fault based NUMA memory balancing. Memory is moved automatically to nodes that access it often. Enables/disables automatic NUMA memory balancing. On NUMA machines, there is a performance penalty if remote memory is accessed by a CPU. When this feature is enabled the kernel… Continue reading
-
How to check which applications are using hugepages
You can find how much is allocated and how much is actually used by HugePages by run the following command. $ grep -i huge /proc/meminfo AnonHugePages: 776192 kB HugePages_Total: 241 HugePages_Free: 113 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB But, there’s a time you also want to know which applications are actually used HugePages. You… Continue reading
-
Meaning of the SysRq-‘m’ output
When you feel curious about what memory status is at some point, you can use SysRq facility. After enabling the sysrq featulre by execute following command, you just need to press ‘SysRq’ + ‘m’ or trigger the command. echo 1 > /proc/sys/kernel/sysrq Above command enables the SysRq feature. To get memory status, you can run… Continue reading
About Me
A software engineer who loves any technologies that makes life easier. That’s why I love Linux and Mac at the same time.