Giter VIP home page Giter VIP logo

Comments (3)

luochenglcs avatar luochenglcs commented on September 18, 2024

numastat -m gets Hugepages memory just from /sys/devices/system/node/node$/meminfo:

[root@localhost home]# cat /sys/devices/system/node/node0/meminfo 
...
Node 0 HugePages_Total:     1
Node 0 HugePages_Free:      1
Node 0 HugePages_Surp:      0

I think we can get correct node hugepages memory from /sys/devices/system/node/node0/hugepages/.

[root@localhost home]# ll /sys/devices/system/node/node0/hugepages/
total 0
drwxr-xr-x 2 root root 0 Dec  8 21:10 hugepages-1048576kB
drwxr-xr-x 2 root root 0 Dec  8 21:10 hugepages-2048kB
drwxr-xr-x 2 root root 0 Dec  8 21:10 hugepages-32768kB
drwxr-xr-x 2 root root 0 Dec  8 21:10 hugepages-64kB
[root@localhost home]# cd /sys/devices/system/node/node0/hugepages/
[root@localhost hugepages]# for i in `ls`; do echo $i; cat $i/nr_hugepages;done
hugepages-1048576kB
1
hugepages-2048kB
512
hugepages-32768kB
0
hugepages-64kB
0
[root@localhost hugepages]# 

from numactl.

luochenglcs avatar luochenglcs commented on September 18, 2024

4 GB hugepage memory(2 x 1 GB Huge Pages, 1024 x 2 MB Huge Pages:

[root@localhost numactl]# cat /proc/cmdline 
BOOT_IMAGE=/Image.gz root=/dev/mapper/openeuler-root ro rd.lvm.lv=openeuler/root rd.lvm.lv=openeuler/swap video=VGA-1:640x480-32@60me console=ttyAMA0 crashkernel=512M smmu.bypassdev=0x1000:0x17 smmu.bypassdev=0x1000:0x15 video=efifb:off earlycon default_hugepagesz=1G hugepagesz=1G hugepages=2 hugepagesz=2M hugepages=1024

[root@localhost numactl]# ./numastat -m

Per-node system memory usage (in MBs):
                          Node 0          Node 1           Total
                 --------------- --------------- ---------------
....
HugePages_Total          2048.00         2048.00         4096.00
HugePages_Free           2048.00         2048.00         4096.00
HugePages_Surp              0.00            0.00            0.00
...

After update system hugepages memory info from sysfs/node/hugepages directory, we can obtain correct system hugepages meminfo.

from numactl.

luochenglcs avatar luochenglcs commented on September 18, 2024

resolved.

from numactl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.