Skip to content

Instantly share code, notes, and snippets.

@aclamk
aclamk / adjust_count.txt
Created February 28, 2024 13:33
objdump -d -r -S -C ./src/common/CMakeFiles/common-common-objs.dir/mempool.cc.o
void mempool::pool_t::adjust_count(ssize_t items, ssize_t bytes)
{
530: 41 55 push %r13
532: 49 89 f5 mov %rsi,%r13
535: 41 54 push %r12
537: 49 89 d4 mov %rdx,%r12
53a: 55 push %rbp
53b: 48 89 fd mov %rdi,%rbp
53e: 53 push %rbx
53f: 48 83 ec 08 sub $0x8,%rsp
@aclamk
aclamk / rocks-hack.diff
Created February 19, 2024 09:43
rocksb hacks to split wal / memtable
diff --git a/db/db_impl/db_impl.h b/db/db_impl/db_impl.h
index 725e77c18..f362eb6b0 100644
--- a/db/db_impl/db_impl.h
+++ b/db/db_impl/db_impl.h
@@ -232,6 +232,8 @@ class DBImpl : public DB {
using DB::Write;
virtual Status Write(const WriteOptions& options,
WriteBatch* updates) override;
+ virtual Status WriteHack(const WriteOptions& options,
+ WriteBatch* updates) override;
@aclamk
aclamk / nocrc.txt
Created February 14, 2024 10:04
write_lat for BlueStore, 0 - 100usec, 2usec granularity , no CRC
{
"bluestore": {
"write_lat": {
"axes": [
{
"name": "zero",
"min": 0,
"quant_size": 1,
"buckets": 1,
"scale_type": "linear",
@aclamk
aclamk / lat.txt
Last active February 14, 2024 08:14
write_lat for BlueStore, 0 - 100usec, 2usec granularity
{
"bluestore": {
"write_lat": {
"axes": [
{
"name": "zero",
"min": 0,
"quant_size": 1,
"buckets": 1,
"scale_type": "linear",
@aclamk
aclamk / btree.txt
Created January 24, 2023 13:55
btree warning
akupczyk@o08 build-rel]$ ninja ceph_test_objectstore
[1/3] Building CXX object src/os/CMakeFiles/os.dir/bluestore/BlueStore.cc.o
In file included from ../src/include/cpp-btree/btree_set.h:49,
from ../src/os/bluestore/BlueStore.cc:28:
../src/include/cpp-btree/btree.h: In member function ‘btree::internal::btree<Params>::iterator btree::internal::btree<Params>::internal_emplace(btree::internal::btree<Params>::iterator, Args&& ...) [with Args = {const long unsigned int&}; Params = btree::internal::set_params<long unsigned int, std::less<long unsigned int>, mempool::pool_allocator<mempool::mempool_bluestore_fsck, long unsigned int>, 256, false>]’:
../src/include/cpp-btree/btree.h:515:84: warning: array subscript 32 is outside array bounds of ‘btree::internal::AlignedAlloc<8, mempool::pool_allocator<mempool::mempool_bluestore_fsck, long unsigned int> >::M [32]’ [-Warray-bounds]
515 | btree_node*& mutable_child(int i) { return GetField<&internal_fields::children>()[i]; }
|
@aclamk
aclamk / buffer.txt
Created December 21, 2022 10:58
~Buffer called
#0 0x00007ffff39aaa4f in raise () from /lib64/libc.so.6
#1 0x00007ffff397ddb5 in abort () from /lib64/libc.so.6
#2 0x00007ffff397dc89 in __assert_fail_base.cold.0 () from /lib64/libc.so.6
#3 0x00007ffff39a33a6 in __assert_fail () from /lib64/libc.so.6
#4 0x00005555561364d1 in boost::intrusive::detail::destructor_impl<boost::intrusive::generic_hook<(boost::intrusive::algo_types)0, boost::intrusive::list_node_traits<void*>, boost::intrusive::member_tag, (boost::intrusive::link_mode_type)1, (boost::intrusive::base_hook_type)0> > (hook=...)
at /opt/rh/gcc-toolset-11/root/usr/include/c++/11/bits/node_handle.h:215
#5 boost::intrusive::generic_hook<(boost::intrusive::algo_types)0, boost::intrusive::list_node_traits<void*>, boost::intrusive::member_tag, (boost::intrusive::link_mode_type)1, (boost::intrusive::base_hook_type)0>::~generic_hook (this=0x55557a63c9f0, __in_chrg=<optimized out>)
at boost/include/boost/intrusive/detail/generic_hook.hpp:193
#6 boost::intrusive::list_member_hook<>::~list_member_
@aclamk
aclamk / osd_superblock.bin
Created November 14, 2022 13:10
Example superblock
00000000 08 05 f9 01 00 00 89 33 1c 34 a1 2d 43 90 b9 a5 |.......3.4.-C...|
00000010 78 e4 f3 64 12 f4 00 00 00 00 0c 00 00 00 01 00 |x..d............|
00000020 00 00 0c 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000040 00 00 00 00 00 00 fe f7 01 00 00 00 00 00 0f 00 |................|
00000050 00 00 01 00 00 00 00 00 00 00 1a 00 00 00 69 6e |..............in|
00000060 69 74 69 61 6c 20 66 65 61 74 75 72 65 20 73 65 |itial feature se|
00000070 74 28 7e 76 2e 31 38 29 02 00 00 00 00 00 00 00 |t(~v.18)........|
00000080 0d 00 00 00 70 67 69 6e 66 6f 20 6f 62 6a 65 63 |....pginfo objec|
00000090 74 03 00 00 00 00 00 00 00 0e 00 00 00 6f 62 6a |t............obj|
@aclamk
aclamk / append-deferred.txt
Created October 27, 2022 10:40
Checking when deferred happens in case of appending data to object
[akupczyk@o08 aclamk-defer]$ ./bin/ceph_test_objectstore --gtest_filter=\*DeferredWrite\*Append\* --debug_rocksdb=0/0 --log_to_stderr=false
Note: Google Test filter = *DeferredWrite*Append*
[==========] Running 6 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 6 tests from BlueStore/DeferredWriteTest
[ RUN ] BlueStore/DeferredWriteTest.AppendData/0
test-1 devblock=4096/alloc=4096/blob=16384/defer=32768
ofs 0 defer 1 new 0
ofs 1 defer 1 new 0
ofs 2 defer 1 new 0
@aclamk
aclamk / 32-no.txt
Created September 14, 2022 12:15
32 AU per blob, no reuse
ITERATION 0
writing (to head) ...
H: [ ~ ]
H: [ ~ ~ ]
H: [ ~ ~ ~ ]
H: [ ~ ~ ~ ~ ]
snap...
objects:
H:[ A A A A ]
1:[ A A A A ]
@aclamk
aclamk / 16-no.txt
Created September 14, 2022 12:12
16 AU per blob, no reuse
ITERATION 0
writing (to head) ...
H: [ ~ ]
H: [ ~ ~ ]
H: [ ~ ~ ~ ]
H: [ ~ ~ ~ ~ ]
snap...
objects:
H:[ A A A A ]
1:[ A A A A ]