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

Does not respect NUMA constraints #99

Open
xeniorn opened this issue Jan 24, 2023 · 5 comments
Open

Does not respect NUMA constraints #99

xeniorn opened this issue Jan 24, 2023 · 5 comments

Comments

@xeniorn
Copy link

xeniorn commented Jan 24, 2023

Running numactl --cpubind=0 --membind=0 -- vmtouch -ldw targetfile shows locked memory over all available NUMA nodes.

Expected behavior would be for all the memory to be membound to NUMA node0.

Possibly I'm doing it in a wrong way.

Would such functionality be possible with the current binaries? Otherwise, could it be considered as a feature?

@hoytech
Copy link
Owner

hoytech commented Jan 25, 2023

Currently vmtouch is not NUMA-aware at all. It might be possible, but vmtouch hasn't done anything special to enable it.

I don't think I have easy access to any hardware that would work for this testing. If you get any more results from your experiments, please let us know! It's possible that vmtouch could gain some new flags that let us do NUMA stuff, I just don't have the time to look into it now.

@xeniorn
Copy link
Author

xeniorn commented Jan 25, 2023

I see, thank you. I was actually hoping the numactl wrapper would ensure this happens regardless of whether vmtouch is aware of it or not, i.e. that it would disallow the vmtouch process to handle/touch the memory outside its allocated NUMA node, but it doesn't seem to be the case. Perhaps it only provides hints to NUMA-aware applications and doesn't enforce anything.

I will write here if I end up having any further insights.

@hoytech
Copy link
Owner

hoytech commented Jan 25, 2023

One thing you might want to look into is how NUMA affects the page-cache. Your command is touching (what I assume is) a regular file, so it's locking memory backed by the page-cache.

@xeniorn
Copy link
Author

xeniorn commented Jan 25, 2023

Yes, it's a regular ~170G file. I was checking beforehand with vmtouch -v {file}, and it was saying 0/x pages are resident - would this have shown the "page cache" part too or it reports a different kind of "residence in RAM"?

@hoytech
Copy link
Owner

hoytech commented Jan 25, 2023

vmtouch just mmap()s the file and calls mincore(), so for regular files it's always just reporting the residency status of the page-cache. You have to be doing something a bit special for it to report on any other type of memory.

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

2 participants