Re: omap vs. xattr in librados

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 11, 2018 at 10:44 AM Gregory Farnum <gfarnum@xxxxxxxxxx> wrote:
<snip>
In general, if the key-value storage is of unpredictable or non-trivial size, you should use omap.

At the bottom layer where the data is actually stored, they're likely to be in the same places (if using BlueStore, they are the same — in FileStore, a rados xattr *might* be in the local FS xattrs, or it might not). It is somewhat more likely that something stored in an xattr will get pulled into memory at the same time as the object's internal metadata, but that only happens if it's quite small (think the xfs or ext4 xattr rules). 

Based on this description, if I'm planning on using Bluestore, there is no particular reason to ever prefer using xattrs over omap (outside of ease of use in the API), correct?

Thanks,
Ben

On Tue, Sep 11, 2018 at 10:44 AM Gregory Farnum <gfarnum@xxxxxxxxxx> wrote:
On Tue, Sep 11, 2018 at 7:48 AM Benjamin Cherian <benjamin.cherian@xxxxxxxxx> wrote:
Hi,

I'm interested in writing a relatively simple application that would use librados for storage. Are there recommendations for when to use the omap as opposed to an xattr? In theory, you could use either a set of xattrs or an omap as a kv store associated with a specific object. Are there recommendations for what kind of data xattrs and omaps are intended to store?

In general, if the key-value storage is of unpredictable or non-trivial size, you should use omap.

At the bottom layer where the data is actually stored, they're likely to be in the same places (if using BlueStore, they are the same — in FileStore, a rados xattr *might* be in the local FS xattrs, or it might not). It is somewhat more likely that something stored in an xattr will get pulled into memory at the same time as the object's internal metadata, but that only happens if it's quite small (think the xfs or ext4 xattr rules).

If you have 250KB of key-value data, omap is definitely the place for it.
-Greg


Just for background, I have some metadata i'd like to associate with each object (total size of all kv pairs in object metadata is ~250k, some values a few bytes, while others are 10-20k.) The object will store actual data (a relatively large FP array) as a binary blob (~3-5 MB).


Thanks,
Ben
--
Regards,

Benjamin Cherian
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux