Open wxwmd opened 1 year ago
UCX caches memory registrations until the memory is released (by munmap/madvise/..) or until ucp_context is destroyed. This behavior amortized the cost of memory registrations during runtime. In version 1.14.1, it's possible to limit the number of memory registrations using these variables:
$ ucx_info -fc |grep IB_RCACHE_MAX -B 6
#
# Maximal number of regions in the registration cache
#
# syntax: unsigned long: <number>, "inf", or "auto"
# inherits: UCX_RCACHE_MAX_REGIONS
#
UCX_IB_RCACHE_MAX_REGIONS=inf
--
#
# Maximal total size of registration cache regions
#
# syntax: memory units: <number>[b|kb|mb|gb], "inf", or "auto"
# inherits: UCX_RCACHE_MAX_SIZE
#
UCX_IB_RCACHE_MAX_SIZE=inf
Describe the bug
I am using ucx 1.14.1 to build my application. However, I am unable to immediately deregister memory using
UcpMemory.deregister()
. Instead, the UcpMemory is deregistered when the application finishes executing.For example, when i run the following code, which register UcpMemory and then deregister it, the output is :
the num of mr is still 6 after
ucpMemory.deregister()
.Once the program is finished, i noticed that the UcpMemory is deregistered: