Usable space with libpmemobj

50 views
Skip to first unread message

Narayan Venkat

unread,
Sep 19, 2016, 7:44:27 PM9/19/16
to pmem
Is there a good rule of thumb to determine what percentage of a pmemobj pool is usable. In the case of pmemblk this is easily obtained using the pmemblk_nblock() API call. My goal here is to answer one of two questions - what percentage of pmemobj pool is usable ? or how big should the pool be if I want to allocate N objects of specific size ? 

On a related note, if the answer to the above is non-trivial,  is there a way to grow a pmemobj pool ? Pool sets today is a static specification and does not easily permit taking a existing pool and adding additional files on one or more devices.




Piotr Balcer

unread,
Sep 20, 2016, 3:21:14 AM9/20/16
to pmem
W dniu wtorek, 20 września 2016 01:44:27 UTC+2 użytkownik Narayan Venkat napisał:
Is there a good rule of thumb to determine what percentage of a pmemobj pool is usable. In the case of pmemblk this is easily obtained using the pmemblk_nblock() API call. My goal here is to answer one of two questions - what percentage of pmemobj pool is usable ? or how big should the pool be if I want to allocate N objects of specific size ? 

On a related note, if the answer to the above is non-trivial,  is there a way to grow a pmemobj pool ? Pool sets today is a static specification and does not easily permit taking a existing pool and adding additional files on one or more devices.





Hi,
The only reliable way to determine how many objects of a given size you can
allocate from a pool is simply allocating objects in a loop until you hit
OOM. There are simply too many factors you would have to account for in
calculation like this. For approximations please see my previous answer to
"Available Space for a given Object Store", it contains some basic numbers
you can use to predict available free space.

As for growing a pool - it's currently impossible from the user perspective.
From a technical point fs-like management (growing, shrinking etc)
presents some unique challenges (we can't move objects around), but we've
been getting this request rather often recently so we might put some effort
into solving it - no promises though :)

Piotr

Narayan Venkat

unread,
Sep 20, 2016, 9:21:42 AM9/20/16
to pmem
Thanks for ptr to the post ..

Narayan

 
Reply all
Reply to author
Forward
0 new messages