BlueStore in-memory Onode footprint
Hey All!
Recently I realized that I'm unable to fit all my onodes ( 32768 objects/4Mb each/4K alloc unit/no csum) in 15G RAM cache.
Hence decided to estimate Onode in-memory size.
At first I filled 4Mb object with a single 4M write - mempools indicate ~5K mem usage for total onode metadata. Good enough.
Secondly I refill that object with 4K writes. Resulting memusage = 574K!!! Onode itself 704 bytes in 1 object. And 4120 other metadata items occupies all other space.
Then I removed SharedBlob from mempools. Resulting mem usage = 355K. The same Onode size. And 3096 other metadata objects. Hence we had 1024 SharedBlob instances thata took ~ 220K.
And finally I removed Blob instances from measurements. Resulting mem usage = 99K. And 2072 other objects. Hence Blob instances take another ~250K
Yeah, that's the worst case( actually csum enable will give even more mem use) but shouldn't we revisit some Onode internals due to such numbers?
Thanks,
Igor
Quoted 14 lines · Igor Fedotov
Hey All!
Recently I realized that I'm unable to fit all my onodes ( 32768 objects/4Mb each/4K alloc unit/no csum) in 15G RAM cache.
Hence decided to estimate Onode in-memory size.
At first I filled 4Mb object with a single 4M write - mempools indicate ~5K mem usage for total onode metadata. Good enough.
Secondly I refill that object with 4K writes. Resulting memusage = 574K!!! Onode itself 704 bytes in 1 object. And 4120 other metadata items occupies all other space.
Quoted 7 lines
Then I removed SharedBlob from mempools. Resulting mem usage = 355K. The same Onode size. And 3096 other metadata objects. Hence we had 1024 SharedBlob instances thata took ~ 220K.
And finally I removed Blob instances from measurements. Resulting mem usage = 99K. And 2072 other objects. Hence Blob instances take another ~250K
Yikes!
BTW you can get a full breakdown by type with 'mempool debug = true' in ceph.conf (-o 'mempool debug = true' on vstart.sh command line) without having to recompile. Do you mind repeating the test and including the full breakdown?
Quoted 2 lines
Yeah, that's the worst case( actually csum enable will give even more mem use) but shouldn't we revisit some Onode internals due to such numbers?
Yep!
sage
Will do shortly..
Quoted 34 lines · Sage Weil
Quoted 14 lines · Igor Fedotov
Hey All!
Recently I realized that I'm unable to fit all my onodes ( 32768 objects/4Mb each/4K alloc unit/no csum) in 15G RAM cache.
Hence decided to estimate Onode in-memory size.
At first I filled 4Mb object with a single 4M write - mempools indicate ~5K mem usage for total onode metadata. Good enough.
Secondly I refill that object with 4K writes. Resulting memusage = 574K!!! Onode itself 704 bytes in 1 object. And 4120 other metadata items occupies all other space.
Quoted 7 lines
Then I removed SharedBlob from mempools. Resulting mem usage = 355K. The same Onode size. And 3096 other metadata objects. Hence we had 1024 SharedBlob instances thata took ~ 220K.
And finally I removed Blob instances from measurements. Resulting mem usage = 99K. And 2072 other objects. Hence Blob instances take another ~250K
Yikes!
BTW you can get a full breakdown by type with 'mempool debug = true' in ceph.conf (-o 'mempool debug = true' on
vstart.shcommand line) without having to recompile. Do you mind repeating the test and including the full breakdown?Quoted 2 lines
Yeah, that's the worst case( actually csum enable will give even more mem use) but shouldn't we revisit some Onode internals due to such numbers?
Yep!
sage
Sage,
here is the PR that contains the test case for Onode size measurement:
https://github.com/ceph/ceph/pull/12532
Quoted 34 lines · Sage Weil
Quoted 14 lines · Igor Fedotov
Hey All!
Recently I realized that I'm unable to fit all my onodes ( 32768 objects/4Mb each/4K alloc unit/no csum) in 15G RAM cache.
Hence decided to estimate Onode in-memory size.
At first I filled 4Mb object with a single 4M write - mempools indicate ~5K mem usage for total onode metadata. Good enough.
Secondly I refill that object with 4K writes. Resulting memusage = 574K!!! Onode itself 704 bytes in 1 object. And 4120 other metadata items occupies all other space.
Quoted 7 lines
Then I removed SharedBlob from mempools. Resulting mem usage = 355K. The same Onode size. And 3096 other metadata objects. Hence we had 1024 SharedBlob instances thata took ~ 220K.
And finally I removed Blob instances from measurements. Resulting mem usage = 99K. And 2072 other objects. Hence Blob instances take another ~250K
Yikes!
BTW you can get a full breakdown by type with 'mempool debug = true' in ceph.conf (-o 'mempool debug = true' on
vstart.shcommand line) without having to recompile. Do you mind repeating the test and including the full breakdown?Quoted 2 lines
Yeah, that's the worst case( actually csum enable will give even more mem use) but shouldn't we revisit some Onode internals due to such numbers?
Yep!
sage
Here is mempool's detailed report:
BTW. bluestore_alloc pool's stats look suspicious too.
"total": {
"items": 1529590,
"bytes": 18036016
},mempool dump:
{
"buffer_meta": {
"total": {
"items": 4,
"bytes": 384
},
"ceph::buffer::raw_char": {
"items": 0,
"bytes": 0
},
"ceph::buffer::raw_malloc": {
"items": 0,
"bytes": 0
},
"ceph::buffer::raw_mmap_pages": {
"items": 0,
"bytes": 0
},
"ceph::buffer::raw_pipe": {
"items": 0,
"bytes": 0
},
"ceph::buffer::raw_posix_aligned": {
"items": 4,
"bytes": 384
},
"ceph::buffer::raw_static": {
"items": 0,
"bytes": 0
},
"ceph::buffer::raw_unshareable": {
"items": 0,
"bytes": 0
}
},
"buffer_data": {
"total": {
"items": 2105456,
"bytes": 2105456
},
"char": {
"items": 2105456,
"bytes": 2105456
}
},
"osd": {
"total": {
"items": 0,
"bytes": 0
}
},
"bluestore_meta_onode": {
"total": {
"items": 1,
"bytes": 704
},
"BlueStore::Onode": {
"items": 1,
"bytes": 704
}
},
"bluestore_meta_other": {
"total": {
"items": 4120,
"bytes": 574760
},
"BlueStore::Blob": {
"items": 1024,
"bytes": 253952
},
"BlueStore::Buffer": {
"items": 0,
"bytes": 0
},
"BlueStore::Extent": {
"items": 1024,
"bytes": 49152
},
"BlueStore::ExtentMap::Shard": {
"items": 18,
"bytes": 1008
},
"BlueStore::SharedBlob": {
"items": 1024,
"bytes": 221184
},
"std::_Rb_tree_node<std::pair<int const,
boost::intrusive_ptr<BlueStore::Blob> > >": {
"items": 0,
"bytes": 0
},
"std::_Rb_tree_node<std::pair<unsigned long const,
bluestore_extent_ref_map_t::record_t> >": {
"items": 1024,
"bytes": 49152
},
"std::_Rb_tree_node<std::pair<unsigned long const,
std::unique_ptr<BlueStore::Buffer, std::default_delete<BlueStore::Buffer> > > >": {
"items": 0,
"bytes": 0
},
"std::__detail::_Hash_node<std::pair<coll_t const,
boost::intrusive_ptr<BlueStore::Collection> >, true>": {
"items": 1,
"bytes": 112
},
"std::__detail::_Hash_node<std::pair<ghobject_t const,
boost::intrusive_ptr<BlueStore::Onode> >, true>": {
"items": 1,
"bytes": 168
},
"std::__detail::_Hash_node<std::pair<unsigned long const,
BlueStore::SharedBlob*>, false>": {
"items": 0,
"bytes": 0
},
"std::__detail::_Hash_node_base*": {
"items": 4,
"bytes": 32
},
"std::pair<coll_t const,
boost::intrusive_ptr<BlueStore::Collection> >": {
"items": 0,
"bytes": 0
},
"std::pair<ghobject_t const,
boost::intrusive_ptr<BlueStore::Onode> >": {
"items": 0,
"bytes": 0
}
},
"bluestore_alloc": {
"total": {
"items": 1529590,
"bytes": 18036016
},
"AllocExtent": {
"items": 0,
"bytes": 0
},
"BitAllocator": {
"items": 2,
"bytes": 464
},
"BitMapArea": {
"items": 0,
"bytes": 0
},
"BitMapAreaIN": {
"items": 0,
"bytes": 0
},
"BitMapAreaLeaf": {
"items": 438,
"bytes": 45552
},
"BitMapZone": {
"items": 89950,
"bytes": 6476400
},
"BmapEntry": {
"items": 1439200,
"bytes": 11513600
}
},
"bluefs": {
"total": {
"items": 65,
"bytes": 3744
},
"BlueFS::Dir": {
"items": 1,
"bytes": 88
},
"BlueFS::File": {
"items": 9,
"bytes": 1368
},
"BlueFS::FileLock": {
"items": 1,
"bytes": 8
},
"BlueFS::FileReader": {
"items": 1,
"bytes": 128
},
"BlueFS::FileReaderBuffer": {
"items": 0,
"bytes": 0
},
"BlueFS::FileWriter": {
"items": 3,
"bytes": 960
},
"bluefs_extent_t": {
"items": 9,
"bytes": 144
},
"std::_Rb_tree_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, boost::intrusive_ptr<BlueFS::Dir> > >": {
"items": 1,
"bytes": 72
},
"std::_Rb_tree_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, boost::intrusive_ptr<BlueFS::File> > >": {
"items": 8,
"bytes": 576
},
"std::__detail::_Hash_node<std::pair<unsigned long const,
boost::intrusive_ptr<BlueFS::File> >, false>": {
"items": 9,
"bytes": 216
},
"std::__detail::_Hash_node_base*": {
"items": 23,
"bytes": 184
},
"std::pair<unsigned long const,
boost::intrusive_ptr<BlueFS::File> >": {
"items": 0,
"bytes": 0
}
}
}Quoted 34 lines · Sage Weil
Quoted 14 lines · Igor Fedotov
Hey All!
Recently I realized that I'm unable to fit all my onodes ( 32768 objects/4Mb each/4K alloc unit/no csum) in 15G RAM cache.
Hence decided to estimate Onode in-memory size.
At first I filled 4Mb object with a single 4M write - mempools indicate ~5K mem usage for total onode metadata. Good enough.
Secondly I refill that object with 4K writes. Resulting memusage = 574K!!! Onode itself 704 bytes in 1 object. And 4120 other metadata items occupies all other space.
Quoted 7 lines
Then I removed SharedBlob from mempools. Resulting mem usage = 355K. The same Onode size. And 3096 other metadata objects. Hence we had 1024 SharedBlob instances thata took ~ 220K.
And finally I removed Blob instances from measurements. Resulting mem usage = 99K. And 2072 other objects. Hence Blob instances take another ~250K
Yikes!
BTW you can get a full breakdown by type with 'mempool debug = true' in ceph.conf (-o 'mempool debug = true' on
vstart.shcommand line) without having to recompile. Do you mind repeating the test and including the full breakdown?Quoted 2 lines
Yeah, that's the worst case( actually csum enable will give even more mem use) but shouldn't we revisit some Onode internals due to such numbers?
Yep!
sage
I'm not sure what the conclusion from this is.
The point of the sharding exercise was to eliminate the need to serialize/deserialize all 1024 Extents/Blobs/SharedBlobs on each I/O transaction.
This shows that a fully populated oNode with ALL of the shards present is a large number. But that ought to be a rare occurrence.
This test shows that each Blob is 248 bytes and that each SharedBlob is 216 bytes. That matches the sizeof(...), so the MemPool logic got the right answer! Yay!
Looking at the Blob I see:
Bluestore_blob_t 72 bytes
Bufferlist 88 bytes
Extentrefmap 64 bytes
That's most the 248. I suspect that trying to fix this will require a new strategy, etc.
Allen Samuels
SanDisk |a Western Digital brand
2880 Junction Avenue, San Jose, CA 95134
T: +1 408 801 7030| M: +1 408 780 6416
[email protected]
Quoted 50 lines
-----Original Message-----
From: [email protected] [mailto:ceph-devel- [email protected]] On Behalf Of Sage Weil
Sent: Friday, December 16, 2016 7:20 AM
To: Igor Fedotov <[email protected]>
Cc: ceph-devel <[email protected]>
Subject: Re: BlueStore in-memory Onode footprintQuoted 14 lines · Igor Fedotov
Hey All!
Recently I realized that I'm unable to fit all my onodes ( 32768 objects/4Mb each/4K alloc unit/no csum) in 15G RAM cache.
Hence decided to estimate Onode in-memory size.
At first I filled 4Mb object with a single 4M write - mempools indicate ~5K mem usage for total onode metadata. Good enough.
Secondly I refill that object with 4K writes. Resulting memusage = 574K!!! Onode itself 704 bytes in 1 object. And 4120 other metadata items occupies all other space.
Quoted 8 lines
Then I removed SharedBlob from mempools. Resulting mem usage = 355K. The same Onode size. And 3096 other metadata objects. Hence we had 1024 SharedBlob instances thata took ~ 220K.
And finally I removed Blob instances from measurements. Resulting mem usage = 99K. And 2072 other objects. Hence Blob instances take another ~250K
Yikes!
BTW you can get a full breakdown by type with 'mempool debug = true' in ceph.conf (-o 'mempool debug = true' on
vstart.shcommand line) without having to recompile. Do you mind repeating the test and including the full breakdown?Quoted 2 lines
Yeah, that's the worst case( actually csum enable will give even more mem use) but shouldn't we revisit some Onode internals due to such
numbers?
Yep!
sage
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected] More majordomo info at
http://vger.kernel.org/majordomo-info.html
Quoted 13 lines · Allen Samuels
I'm not sure what the conclusion from this is.
The point of the sharding exercise was to eliminate the need to serialize/deserialize all 1024 Extents/Blobs/SharedBlobs on each I/O transaction.
This shows that a fully populated oNode with ALL of the shards present is a large number. But that ought to be a rare occurrence.
This test shows that each Blob is 248 bytes and that each SharedBlob is 216 bytes. That matches the sizeof(...), so the MemPool logic got the right answer! Yay!
Quoted 8 lines
Looking at the Blob I see:
Bluestore_blob_t72 bytes
Bufferlist 88 bytes
Extentrefmap 64 bytesThat's most the 248. I suspect that trying to fix this will require a new strategy, etc.
Well, one thing we might consider: right now the prune cache content at the granularity of onode. We might want to put the shards in an LRU too and prune old shards...
sage
Quoted 60 lines
Allen Samuels
SanDisk |a Western Digital brand
2880 Junction Avenue, San Jose, CA 95134
T: +1 408 801 7030| M: +1 408 780 6416
[email protected]Quoted 50 lines
-----Original Message-----
From: [email protected] [mailto:ceph-devel- [email protected]] On Behalf Of Sage Weil
Sent: Friday, December 16, 2016 7:20 AM
To: Igor Fedotov <[email protected]>
Cc: ceph-devel <[email protected]>
Subject: Re: BlueStore in-memory Onode footprintQuoted 14 lines · Igor Fedotov
Hey All!
Recently I realized that I'm unable to fit all my onodes ( 32768 objects/4Mb each/4K alloc unit/no csum) in 15G RAM cache.
Hence decided to estimate Onode in-memory size.
At first I filled 4Mb object with a single 4M write - mempools indicate ~5K mem usage for total onode metadata. Good enough.
Secondly I refill that object with 4K writes. Resulting memusage = 574K!!! Onode itself 704 bytes in 1 object. And 4120 other metadata items occupies all other space.
Quoted 8 lines
Then I removed SharedBlob from mempools. Resulting mem usage = 355K. The same Onode size. And 3096 other metadata objects. Hence we had 1024 SharedBlob instances thata took ~ 220K.
And finally I removed Blob instances from measurements. Resulting mem usage = 99K. And 2072 other objects. Hence Blob instances take another ~250K
Yikes!
BTW you can get a full breakdown by type with 'mempool debug = true' in ceph.conf (-o 'mempool debug = true' on
vstart.shcommand line) without having to recompile. Do you mind repeating the test and including the full breakdown?Quoted 2 lines
Yeah, that's the worst case( actually csum enable will give even more mem use) but shouldn't we revisit some Onode internals due to such
numbers?
Yep!
sage
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected] More majordomo info at
http://vger.kernel.org/majordomo-info.html
Quoted 29 lines
-----Original Message-----
From: Sage Weil [mailto:[email protected]]
Sent: Friday, December 16, 2016 2:33 PM
To: Allen Samuels <[email protected]>
Cc: Igor Fedotov <[email protected]>; ceph-devel <ceph- [email protected]>
Subject: RE: BlueStore in-memory Onode footprintQuoted 20 lines · Allen Samuels
I'm not sure what the conclusion from this is.
The point of the sharding exercise was to eliminate the need to serialize/deserialize all 1024 Extents/Blobs/SharedBlobs on each I/O transaction.
This shows that a fully populated oNode with ALL of the shards present is a large number. But that ought to be a rare occurrence.
This test shows that each Blob is 248 bytes and that each SharedBlob is
216 bytes. That matches the sizeof(...), so the MemPool logic got the right answer! Yay!Looking at the Blob I see:
Bluestore_blob_t72 bytes
Bufferlist 88 bytes
Extentrefmap 64 bytes
Quoted 6 lines
Quoted 2 lines
That's most the 248. I suspect that trying to fix this will require a new strategy, etc.
Well, one thing we might consider: right now the prune cache content at the granularity of onode. We might want to put the shards in an LRU too and prune old shards...
Not sure I really see the value of that. Seems to me that Igor's test case is pretty rare.
I think in this case, you don't need to work well -- you just need to work.
As long as the pruning is based on the actual memory consumption rather than the oNode count I think we're fine.
Realistically, retaining deserialized oNodes is only valuable for sequential read/write cases. In which case you don't need A large number of oNodes, just a few per client connection ought to do it.
Quoted 65 lines
sage
Quoted 27 lines
Allen Samuels
SanDisk |a Western Digital brand
2880 Junction Avenue, San Jose, CA 95134
T: +1 408 801 7030| M: +1 408 780 6416 [email protected]Quoted 20 lines
-----Original Message-----
From: [email protected] [mailto:ceph-devel- [email protected]] On Behalf Of Sage Weil
Sent: Friday, December 16, 2016 7:20 AM
To: Igor Fedotov <[email protected]>
Cc: ceph-devel <[email protected]>
Subject: Re: BlueStore in-memory Onode footprintQuoted 11 lines · Igor Fedotov
Hey All!
Recently I realized that I'm unable to fit all my onodes ( 32768 objects/4Mb each/4K alloc unit/no csum) in 15G RAM cache.
Hence decided to estimate Onode in-memory size.
At first I filled 4Mb object with a single 4M write - mempools indicate ~5K mem usage for total onode metadata. Good enough.
Secondly I refill that object with 4K writes. Resulting memusage =
574K!!!
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Onode itself 704 bytes in 1 object. And 4120 other metadata items occupies all other space.
Then I removed SharedBlob from mempools. Resulting mem usage =
355K.
Quoted 29 lines
Quoted 27 lines
Quoted 7 lines
The same Onode size. And 3096 other metadata objects. Hence we had 1024 SharedBlob instances thata took ~ 220K.
And finally I removed Blob instances from measurements. Resulting mem usage = 99K. And 2072 other objects. Hence Blob instances take another ~250K
Yikes!
BTW you can get a full breakdown by type with 'mempool debug = true' in ceph.conf (-o 'mempool debug = true' on
vstart.shcommand line) without having to recompile. Do you mind repeating the test and including the full breakdown?Quoted 3 lines
Yeah, that's the worst case( actually csum enable will give even more mem use) but shouldn't we revisit some Onode internals due to such
numbers?
Yep!
sage
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 1 line · Allen Samuels
I'm not sure what the conclusion from this is.
IMHO the numbers I shared are pretty high and we should consider some ways to reduce them.
Quoted 4 lines
The point of the sharding exercise was to eliminate the need to serialize/deserialize all 1024 Extents/Blobs/SharedBlobs on each I/O transaction.
This shows that a fully populated oNode with ALL of the shards present is a large number. But that ought to be a rare occurrence.
Actually we have pretty high number for each Blob entry. And this means that cache effectiveness is badly affected in general case since we're able to cache less entries in total.
Quoted 67 lines
This test shows that each Blob is 248 bytes and that each SharedBlob is 216 bytes. That matches the sizeof(...), so the MemPool logic got the right answer! Yay!
Looking at the Blob I see:
Bluestore_blob_t72 bytes
Bufferlist 88 bytes
Extentrefmap 64 bytesThat's most the 248. I suspect that trying to fix this will require a new strategy, etc.
Allen Samuels
SanDisk |a Western Digital brand
2880 Junction Avenue, San Jose, CA 95134
T: +1 408 801 7030| M: +1 408 780 6416
[email protected]Quoted 49 lines
-----Original Message-----
From: [email protected] [mailto:ceph-devel- [email protected]] On Behalf Of Sage Weil
Sent: Friday, December 16, 2016 7:20 AM
To: Igor Fedotov <[email protected]>
Cc: ceph-devel <[email protected]>
Subject: Re: BlueStore in-memory Onode footprintQuoted 14 lines · Igor Fedotov
Hey All!
Recently I realized that I'm unable to fit all my onodes ( 32768 objects/4Mb each/4K alloc unit/no csum) in 15G RAM cache.
Hence decided to estimate Onode in-memory size.
At first I filled 4Mb object with a single 4M write - mempools indicate ~5K mem usage for total onode metadata. Good enough.
Secondly I refill that object with 4K writes. Resulting memusage = 574K!!! Onode itself 704 bytes in 1 object. And 4120 other metadata items occupies all other space.
Quoted 8 lines
Then I removed SharedBlob from mempools. Resulting mem usage = 355K. The same Onode size. And 3096 other metadata objects. Hence we had 1024 SharedBlob instances thata took ~ 220K.
And finally I removed Blob instances from measurements. Resulting mem usage = 99K. And 2072 other objects. Hence Blob instances take another ~250K
Yikes!
BTW you can get a full breakdown by type with 'mempool debug = true' in ceph.conf (-o 'mempool debug = true' on
vstart.shcommand line) without having to recompile. Do you mind repeating the test and including the full breakdown?Quoted 2 lines
Yeah, that's the worst case( actually csum enable will give even more mem use) but shouldn't we revisit some Onode internals due to such
numbers?
Yep!
sage
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected] More majordomo info at
http://vger.kernel.org/majordomo-info.html
FWIW, the actual memory cost is higher than the numbers we've quoted -- possibly considerably higher. That's because it principally consists of a large number of small allocations and there's been no attempt to adjust for the allocator overhead itself.
I'm not that concerned with the amount of memory consumed by a decoded oNode/Shard. That's because I don't expect to have a lot of them around. Realistically, I only see a benefit in caching decoded oNode/Shards that are being sequentially used. I doubt that we need more than 2 or 3 of these per client connection (hundreds in total?). For random accessed oNode/Shards, you'll be better off trying to cache them in the encoded format within the KV subsystem itself.
Hence I care A LOT about the time needed to serialize/deserialize the oNode/Shard. We should be focused on that part of the problem.
I believe that as we optimize the TIME required to serialize/deserialize we will end up also shrinking the SPACE required as an unintended consequence.
Allen Samuels
SanDisk |a Western Digital brand
2880 Junction Avenue, Milpitas, CA 95134
T: +1 408 801 7030| M: +1 408 780 6416
[email protected]
Quoted 98 lines
-----Original Message-----
From: Igor Fedotov [mailto:[email protected]]
Sent: Monday, December 19, 2016 6:46 AM
To: Allen Samuels <[email protected]>; Sage Weil <[email protected]>
Cc: ceph-devel <[email protected]>
Subject: Re: BlueStore in-memory Onode footprintQuoted 1 line · Allen Samuels
I'm not sure what the conclusion from this is.
IMHO the numbers I shared are pretty high and we should consider some ways to reduce them.
Quoted 2 lines
The point of the sharding exercise was to eliminate the need to
serialize/deserialize all 1024 Extents/Blobs/SharedBlobs on each I/O transaction.
Quoted 2 lines
This shows that a fully populated oNode with ALL of the shards present is a
large number. But that ought to be a rare occurrence.
Actually we have pretty high number for each Blob entry. And this means that cache effectiveness is badly affected in general case since we're able to cache less entries in total.Quoted 2 lines
This test shows that each Blob is 248 bytes and that each SharedBlob is 216
bytes. That matches the sizeof(...), so the MemPool logic got the right answer! Yay!
Quoted 8 lines
Looking at the Blob I see:
Bluestore_blob_t72 bytes
Bufferlist 88 bytes
Extentrefmap 64 bytesThat's most the 248. I suspect that trying to fix this will require a new
strategy, etc.
Quoted 31 lines
Allen Samuels
SanDisk |a Western Digital brand
2880 Junction Avenue, San Jose, CA 95134
T: +1 408 801 7030| M: +1 408 780 6416 [email protected]Quoted 24 lines
-----Original Message-----
From: [email protected] [mailto:ceph-devel- [email protected]] On Behalf Of Sage Weil
Sent: Friday, December 16, 2016 7:20 AM
To: Igor Fedotov <[email protected]>
Cc: ceph-devel <[email protected]>
Subject: Re: BlueStore in-memory Onode footprintQuoted 15 lines · Igor Fedotov
Hey All!
Recently I realized that I'm unable to fit all my onodes ( 32768 objects/4Mb each/4K alloc unit/no csum) in 15G RAM cache.
Hence decided to estimate Onode in-memory size.
At first I filled 4Mb object with a single 4M write - mempools indicate ~5K mem usage for total onode metadata. Good enough.
Secondly I refill that object with 4K writes. Resulting memusage = 574K!!! Onode itself 704 bytes in 1 object. And 4120 other metadata items occupies all other space.
Then I removed SharedBlob from mempools. Resulting mem usage =
355K.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
The same Onode size. And 3096 other metadata objects. Hence we had 1024 SharedBlob instances thata took ~ 220K.
And finally I removed Blob instances from measurements. Resulting
mem
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
usage = 99K. And 2072 other objects. Hence Blob instances take another ~250K
Yikes!
BTW you can get a full breakdown by type with 'mempool debug = true' in ceph.conf (-o 'mempool debug = true' on
vstart.shcommand line)without
Quoted 5 lines
Quoted 5 lines
having to recompile. Do you mind repeating the test and including the full breakdown?
Quoted 2 lines
Yeah, that's the worst case( actually csum enable will give even more mem use) but shouldn't we revisit some Onode internals due to such
Quoted 7 lines
Quoted 7 lines
numbers?
Yep!
sage
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" inthe
Quoted 1 line
Quoted 1 line
body of a message to [email protected] More majordomo info
at
Quoted 1 line
Quoted 1 line
Quoted 19 lines · Igor Fedotov
Hey All!
Recently I realized that I'm unable to fit all my onodes ( 32768 objects/4Mb each/4K alloc unit/no csum) in 15G RAM cache.
Hence decided to estimate Onode in-memory size.
At first I filled 4Mb object with a single 4M write - mempools indicate ~5K mem usage for total onode metadata. Good enough.
Secondly I refill that object with 4K writes. Resulting memusage = 574K!!! Onode itself 704 bytes in 1 object. And 4120 other metadata items occupies all other space.
Then I removed SharedBlob from mempools. Resulting mem usage = 355K. The same Onode size. And 3096 other metadata objects. Hence we had 1024 SharedBlob instances thata took ~ 220K.
Quoted 6 lines
And finally I removed Blob instances from measurements. Resulting mem usage = 99K. And 2072 other objects. Hence Blob instances take another ~250K
Yeah, that's the worst case( actually csum enable will give even more mem use) but shouldn't we revisit some Onode internals due to such numbers?
Hrm, that's quite a bit higher than it was last time I looked. Can you dump the hex for one of those during your run?
Quoted 11 lines
Thanks,
Igor
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html