1

I would like to investigate where the memory for a specific process is allocated.

To be more specific: I am running an OpenMP parallel Fortran binary on a ccNUMA machine with two physical CPUs. My concern is that this program violates the first touch rule when initializing its variables. This would lead to memory being allocated in a non-balanced fashion, i.e. most of the memory would be allocated in the address space of only one physical CPU instead of balancing it between both CPUs. In turn, this would lead to poor scaling for this memory-bandwidth limited application.

Unfortunately, I don't have access to the source code. So looking at the memory allocation seems like a good way way to find out. Other ideas are welcome.

Edit due to comments: OpenSUSE Leap 42.3, kernel version 4.4.103-36-default

2

Under Linux, you can query the virtual address space of some process using proc(5) & pmap(1).

So for process 1234, run cat /proc/1234/maps, pmap 1234, cat /proc/1234/numa_maps

See also numa(7), numa_maps(5), set_mempolicy(2), numactl(8).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.