Skip to content

Instantly share code, notes, and snippets.

@aclamk
aclamk / EC-2-2 padding
Created September 3, 2025 13:59
Example to show that padding in EC data causes data to be more compressible
Compression factor = 2.0
usually 8K compresses a bit above 4K
As a result, in 8K blob nothing gets compressed.
object_size 64 k
SHARD 0
disk=[0xe9000~2000]
disk=[0xe0000~1000,0xe6000~1000]
@aclamk
aclamk / EC-2-2
Created September 3, 2025 12:35
Showing that EC-2-2 has 2 shards compressible, 2 shards non-compressible
compression ratio 20
SHARD 0
disk=[0xdc000~3000] len=10000->2773
disk=[0xdf000~3000] len=10000->249c
disk=[0xd1000~2000,0xd5000~1000] len=10000->294a
disk=[0xe8000~3000] len=10000->2a5b
disk=[0xd6000~3000] len=10000->2b57
disk=[0xd9000~3000] len=10000->2ad9
disk=[0xe5000~3000] len=10000->2369
disk=[0xe2000~3000] len=10000->2492
@aclamk
aclamk / jenkins-bluefs-1
Created October 21, 2024 06:23
jenkins killed by bluefs 1
185/293 Test #177: unittest_mon_monmap ....................... Passed 0.21 sec
Start 178: unittest_mon_pgmap
186/293 Test #178: unittest_mon_pgmap ........................ Passed 0.23 sec
Start 179: unittest_mon_montypes
187/293 Test #179: unittest_mon_montypes ..................... Passed 0.13 sec
Start 180: unittest_mon_election
188/293 Test #180: unittest_mon_election ..................... Passed 2.27 sec
Start 181: unittest_mgr_mgrcap
189/293 Test #181: unittest_mgr_mgrcap ....................... Passed 0.31 sec
Start 182: unittest_mgr_ttlcache
@aclamk
aclamk / code
Created September 25, 2024 17:55
Log z OSD (filtrowany) i kod z OSD::shutdown()
dout(10) << "Store synced" << dendl;
op_tracker.on_shutdown();
ClassHandler::get_instance().shutdown();
client_messenger->shutdown();
cluster_messenger->shutdown();
hb_front_client_messenger->shutdown();
hb_back_client_messenger->shutdown();
objecter_messenger->shutdown();
@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_