Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numa meminfo hugepage size is incorrect #39

Open
khunafin opened this issue Oct 12, 2021 · 2 comments
Open

Numa meminfo hugepage size is incorrect #39

khunafin opened this issue Oct 12, 2021 · 2 comments

Comments

@khunafin
Copy link

What happened:
I try to get Hugepagesize for numa node

rootPath := "/"
p := printer.NewSvc(true)
meminfo := mem.NewInfoSvc(p, rootPath)

numaStatSvc := numa.NewStatSvc(p)
numaNodeSvc := numa.NewNodeSvc(meminfo, numaStatSvc)
numaSvc := numa.NewSvc(p, numaNodeSvc, rootPath)
data, _ := numaSvc.GetData()
for _, d := range data {
fmt.Printf("Node%v Hugepagesize = %v\n", d.ID, d.Memory.Hugepagesize)
}

Output is:

Node0 Hugepagesize = 0
Node1 Hugepagesize = 0
#  /proc/meminfo | grep Hugepagesize
Hugepagesize:       2048 kB
# /sys/devices/system/node/node*/meminfo | grep Hugepagesize <- no info about Hugepagesize

What you expected to happen:
May be get same as in /sys/devices/system/node/node*/meminfo file or get system default value?

@aiivashchenko
Copy link
Contributor

It does not persist in NUMA meminfo, right? As I think it was the only difference between system wide meminfo and node meminfo.
That time I decided not to duplicate logic and structs just for a single field. But if it is really required, we can do.
If you need that data, you can get it from MemInfoSvc

@LanDeleih
Copy link
Collaborator

@khunafin Hey. Is it still needed to be done, or we may close it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants