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
prov/efa: unable to register more than 95GB of memory #9739
Comments
What is the output of |
It's not a bug. EFA device has limit for the number of host pages that you can register. If you are currently allocating your memory with the regular page (4k), using huge page (can be 2M on some platform) can save the number of pages and allow you to register larger memory. |
Thank you for your suggestions. We will try them and get back to you with the results. |
We haven't had any luck registering more than 95GB of memory using hugepages. Can you provide some guidance on how to make this work?
We also tried using transparent 2MB hugepages and |
I don't think EFA support transparent huge pages. If you have EFA installer installed on your instance, you should be able to see there are huge page reserved
You can increase this count to allow larger size of huge page allocation Libfabric uses this to allocate buffer from the huge page pool
And EFA provider allocates its internal buffer pool from the huge page pool by default. Did you use the same mmap call in your application to allocate huge page memory? |
Yes, we used This would return Another aspect we tried was adding |
@shijin-aws / @j-xiong : Any further suggestions here for how to make progress? Have you successfully been able to register 96+GB of memory in your work? |
Have you tried increasing the count at |
As I mentioned earlier, You need to increase |
OK I just make a quick test on c7i.48xlarge and make fabtests allocated a 100GB buffer backed by huge pages
I need to increase the nr_hugepages to 61121 , which will make it reserve 2MiB * 61121 ~ 120GB memory for hugepages.
And finally the registration succeeded.
Let me know if you still have questions @bradcray |
Resolved by chapel-lang/chapel#24971. |
Just pointing out one of the issues we ran into implementing chapel-lang/chapel#24971 due to some missing cleanup on our end. We had some missing In summary, when the EFA teardown was not invoked, subsequent runs would fail until the compute nodes were restarted. Is this intentional? |
EFA provider uses MR cache for host memory by default and all mr dereg are actually deferred: it will be put into an LRU list if its use cnt is 0, or put into the dead region list if application frees the buffer. EFA domain close will cleanup the MR cache by flushing all MRs in the LRU list and dead region list. If you don't close your MRs by fi_close, I expect it should still be flushed as long as you freed it. |
Describe the bug
While developing the Chapel runtime for the EFA provider we encountered an error in which a single process cannot register more than 95GB of memory. 95GB succeeds, 96GB fails with the following error:
To Reproduce
We do not have a simple reproducer, we currently test using the full Chapel runtime. We observed the error on AWS
c7i.48xlarge
which has one EFA NIC and 384GB of memory.Expected behavior
I expect to be able to register more than 25% of the physical memory of the machine.
Output
The output with
FI_LOG_LEVEL=Debug
contained:Environment:
This is on an AWS
c7i.48xlarge
instance using libfabric 1.19, theefa
provider, andexport FI_EFA_USE_DEVICE_RDMA=1
.Additional context
The text was updated successfully, but these errors were encountered: