Closed cliuquan closed 1 month ago
pmdk version: 1.12.1-rc1.
This Issue may be related to this commit b1d9a57f0277f530b18ff685dca1189b2086b111, which fix bug to ensure zones are reclaimed prior to free.
thanks.
Hi. We currently operate on very limited resources. Can you give me some information on how important this issue is to you and the project you are working on right now? Thanks.
Please let me know if the information I am asking for is confidential. We can sort it out outside of the GitHub.
Hi. We use PMDK in our storage system, which is used for the company's cloud services and stores a large amount of user data. This issue will cause our storage system reporting insufficient storage space, causing the storage system to be unavailable and interrupting user services.
I'm on it.
Is this method current or not of register custom class, does any guidance documents or API can share?
Yes. It is still supported. Note that it is still an experimental API.
The documentation for the CTL PMEMOBJ APIs is available here: https://github.com/pmem/pmdk/blob/master/doc/libpmemobj/pmemobj_ctl_get.3.md. Specifically, you can find details explaining the meaning of some structure fields in the related header: https://github.com/pmem/pmdk/blob/master/src/include/libpmemobj/ctl.h.
Ref: https://pmem.io/pmdk/manpages/linux/master/pmem_ctl/pmem_ctl.5/
for this method, the information of class can persistent when using pmemobj_ctl_set to register? Do we need to register again after open?
The allocation classes are part of the runtime state of the library and must be created after every open.
From above steps, we can see that chunk free space is about 200k during repeat malloc and free the custom class. We think a chunk size in PMDK is 256k
The values between 0-127 are reserved for the default allocation classes of the library and can be used only for reading.
The recommended method for retrieving information about all allocation classes is to call this entry point for all class ids between 0 and 254 and discard those results for which the function returns an error. For reading, function returns 0 if successful, if the allocation class does not exist it sets the errno to ENOENT and returns -1;
Hi @cliuquan. I hope you managed to find all the answers you needed. Please re-open if necessary.
QUESTION: Some questions about custom class
Details
Issue Step:
From above steps, we can see that chunk free space is about 200k during repeat malloc and free the custom class. We think a chunk size in PMDK is 256k, so to open objpool will trigger to process undo log and earlier reclaim of zone, after the open then to register new class, meanwhile malloc a new 256k chunk for this class, instead of previous 200k old chunk.
Questions
test log: