bluestore prefer wal size
Hey Nick,
I've updated/improved the prefer wal size PR (that sends small writes through the wal). See
https://github.com/ceph/ceph/pull/13217
if you want to try it out.
Thanks!
sage
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): bb0bdeb6.AEMAHeJMfMsAAAAAAAAAAFklQUsAADNJBWwAAAAAAACRXwBYklNO@mailjet.com
Quoted 10 lines · Nick Fisk
Further update,
I set
bluestore_debug_omit_block_device_writeto true and this gave me near filestore performance, albeit still with very high write amp on the SSD's. So its definitely something around that part of the code waiting on the writes to the spinning disks, puzzled why the commit didn't help.I also set debug logging to 20/20 for bdev,bluefs,osd,bluestore and a grep didn't reveal any of the debug in that commit eg "defering small 0x". So possibly something isn't working as expected?
Oh, yeah, the option isn't working then. I saw the line in my debug output.. are you sure you set bluestore_prefer_wal_size ?
sage
Quoted 74 lines
Nick
-----Original Message-----
From: Nick Fisk [mailto:[email protected]]
Sent: 01 February 2017 19:03
To: 'Sage Weil' <[email protected]>; 'Mark Nelson' <[email protected]>
Cc: [email protected]
Subject: RE: bluestore prefer wal sizeHi Sage,
First results not looking good. It looks like write IO to the SSD's (sdd and sdi) is now massively amplified, by somewhere in the region of about 10x. But I'm still only getting around 100 4kb's seq write iops from the fio client. This is in comparison to 2500-3000 iops on the SSD's and ~200 iops per spinning disk (sdc,sde,sdg,sdh).
rbd engine: RBD version: 0.1.11
Jobs: 1 (f=1): [W(1)] [100.0% done] [0KB/476KB/0KB /s] [0/119/0 iops] [eta 00m:00s]rbd_iodepth32: (groupid=0, jobs=1): err= 0: pid=31171: Wed Feb 1 18:56:51 2017
write: io=27836KB, bw=475020B/s, iops=115, runt= 60006msecslat (usec): min=6, max=142, avg=10.98, stdev= 8.38 clat (msec): min=1, max=271, avg= 8.61, stdev= 3.63 lat (msec): min=1, max=271, avg= 8.62, stdev= 3.63 clat percentiles (msec): | 1.00th=[ 8], 5.00th=[ 9], 10.00th=[ 9], 20.00th=[ 9], | 30.00th=[ 9], 40.00th=[ 9], 50.00th=[ 9], 60.00th=[ 9], | 70.00th=[ 9], 80.00th=[ 9], 90.00th=[ 9], 95.00th=[ 9], | 99.00th=[ 17], 99.50th=[ 25], 99.90th=[ 33], 99.95th=[ 36], | 99.99th=[ 273] bw (KB /s): min= 191, max= 480, per=100.00%, avg=464.18, stdev=34.60 lat (msec) : 2=0.01%, 4=0.04%, 10=97.69%, 20=1.55%, 50=0.69% lat (msec) : 500=0.01% cpu : usr=0.13%, sys=0.12%, ctx=7224, majf=0, minf=5 IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0% submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0% complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0% issued : total=r=0/w=6959/d=0, short=r=0/w=0/d=0, drop=r=0/w=0/d=0 latency : target=0, window=0, percentile=100.00%, depth=1I've checked via the admin socket and the prefer wal option is set to 8192.
Random capture of iostat
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await
r_awaitw_awaitsvctm %utilsda 0.00 77.00 0.00 5.50 0.00 338.00 122.91 0.05 11.64 0.00 11.64 8.73 4.80 sdb 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 sdc 0.00 0.00 0.00 151.50 0.00 302.00 3.99 0.54 3.59 0.00 3.59 3.58 54.20 sdd 0.00 0.00 0.00 1474.00 0.00 4008.00 5.44 0.09 0.06 0.00 0.06 0.06 9.20 sde 0.00 0.00 0.00 217.00 0.00 434.00 4.00 0.91 4.20 0.00 4.20 4.20 91.20 sdf 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 sdg 0.00 0.00 0.00 66.50 0.00 134.00 4.03 0.18 2.68 0.00 2.68 2.68 17.80 sdh 0.00 0.00 0.00 217.00 0.00 434.00 4.00 0.80 3.71 0.00 3.71 3.71 80.40 sdi 0.00 0.00 0.00 1134.00 0.00 3082.00 5.44 0.09 0.08 0.00 0.08 0.07 8.40-----Original Message-----
From: Sage Weil [mailto:[email protected]]
Sent: 01 February 2017 15:34
To: [email protected]
Cc: [email protected]
Subject: bluestore prefer wal sizeHey Nick,
I've updated/improved the prefer wal size PR (that sends small writes through the wal). See
https://github.com/ceph/ceph/pull/13217if you want to try it out.
Thanks!
sage
A message that is not in the archive (sent off-list or not yet received): 45ba3843.AEEAHxSt8JAAAAAAAAAAAFklQUsAADNJBWwAAAAAAACRXwBYkldP@mailjet.com
Quoted 16 lines · Nick Fisk
Quoted 16 lines
-----Original Message-----
From: Sage Weil [mailto:[email protected]]
Sent: 01 February 2017 21:39
To: Nick Fisk <[email protected]>
Cc: 'Mark Nelson' <[email protected]>; [email protected]
Subject: RE: bluestore prefer wal sizeQuoted 6 lines · Nick Fisk
Further update,
I set
bluestore_debug_omit_block_device_writeto true and this gave me near filestore performance, albeit still with very high write amp on the SSD's. So its definitely something around that part of the code waiting on the writes to the spinning disks, puzzled why the commit didn'thelp.
Quoted 1 line
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
I also set debug logging to 20/20 for bdev,bluefs,osd,bluestore and a grep didn't reveal any of the debug in that commit eg "defering small 0x". So possibly something isn't working as expected?
Oh, yeah, the option isn't working then. I saw the line in my debug output.. are you sure you set
bluestore_prefer_wal_size?Yep 100%, I even did a config show on the admin socket to confirm the value. I will rebuild the OSD's and try again and do a bit more digging to see if I can work out why it's not entering that if statement.
Oh, I know what the problem is. Will push a fixed patch shortly.
sage
Quoted 103 lines
Quoted 100 lines
sage
Quoted 7 lines
Nick
-----Original Message-----
From: Nick Fisk [mailto:[email protected]]
Sent: 01 February 2017 19:03
To: 'Sage Weil' <[email protected]>; 'Mark Nelson'Quoted 6 lines
Cc: [email protected]
Subject: RE: bluestore prefer wal sizeHi Sage,
First results not looking good. It looks like write IO to the SSD's (sdd and sdi)
is now massively amplified, by somewhere in the region of about 10x. But I'm still only getting around 100 4kb's seq write iops from the fio client. This is in comparison to 2500-3000 iops on the SSD's and ~200 iops per spinning disk (sdc,sde,sdg,sdh).
Quoted 5 lines
rbd engine: RBD version: 0.1.11
Jobs: 1 (f=1): [W(1)] [100.0% done] [0KB/476KB/0KB /s] [0/119/0 iops] [eta 00m:00s]rbd_iodepth32: (groupid=0, jobs=1): err= 0: pid=31171: Wed Feb 118:56:51 2017
Quoted 13 lines
write: io=27836KB, bw=475020B/s, iops=115, runt= 60006msec
slat (usec): min=6, max=142, avg=10.98, stdev= 8.38 clat (msec): min=1, max=271, avg= 8.61, stdev= 3.63 lat (msec): min=1, max=271, avg= 8.62, stdev= 3.63 clat percentiles (msec): | 1.00th=[ 8], 5.00th=[ 9], 10.00th=[ 9], 20.00th=[ 9], | 30.00th=[ 9], 40.00th=[ 9], 50.00th=[ 9], 60.00th=[ 9], | 70.00th=[ 9], 80.00th=[ 9], 90.00th=[ 9], 95.00th=[ 9], | 99.00th=[ 17], 99.50th=[ 25], 99.90th=[ 33], 99.95th=[ 36], | 99.99th=[ 273] bw (KB /s): min= 191, max= 480, per=100.00%, avg=464.18, stdev=34.60 lat (msec) : 2=0.01%, 4=0.04%, 10=97.69%, 20=1.55%, 50=0.69% lat (msec) : 500=0.01%Quoted 8 lines
cpu : usr=0.13%, sys=0.12%, ctx=7224, majf=0, minf=5
IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%,
=64=0.0%submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, =64=0.0% complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, =64=0.0% issued : total=r=0/w=6959/d=0, short=r=0/w=0/d=0,drop=r=0/w=0/d=0
Quoted 7 lines
latency : target=0, window=0, percentile=100.00%, depth=1I've checked via the admin socket and the prefer wal option is set to 8192.
Random capture of iostat
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz
await
r_awaitw_awaitsvctm %utilQuoted 1 line
sda 0.00 77.00 0.00 5.50 0.00 338.00 122.91 0.05 11.64
0.00 11.64 8.73 4.80
Quoted 1 line
sdb 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 0.00
Quoted 1 line
sdc 0.00 0.00 0.00 151.50 0.00 302.00 3.99 0.54 3.59
0.00 3.59 3.58 54.20
Quoted 1 line
sdd 0.00 0.00 0.00 1474.00 0.00 4008.00 5.44 0.09 0.06
0.00 0.06 0.06 9.20
Quoted 1 line
sde 0.00 0.00 0.00 217.00 0.00 434.00 4.00 0.91 4.20
0.00 4.20 4.20 91.20
Quoted 1 line
sdf 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 0.00
Quoted 1 line
sdg 0.00 0.00 0.00 66.50 0.00 134.00 4.03 0.18 2.68
0.00 2.68 2.68 17.80
Quoted 1 line
sdh 0.00 0.00 0.00 217.00 0.00 434.00 4.00 0.80 3.71
0.00 3.71 3.71 80.40
Quoted 1 line
sdi 0.00 0.00 0.00 1134.00 0.00 3082.00 5.44 0.09 0.08
0.00 0.08 0.07 8.40
Quoted 24 lines
-----Original Message-----
From: Sage Weil [mailto:[email protected]]
Sent: 01 February 2017 15:34
To: [email protected]
Cc: [email protected]
Subject: bluestore prefer wal sizeHey Nick,
I've updated/improved the prefer wal size PR (that sends small writes through the wal). See
https://github.com/ceph/ceph/pull/13217if you want to try it out.
Thanks!
sage
Quoted 22 lines · Sage Weil
Quoted 20 lines · Nick Fisk
Quoted 20 lines
-----Original Message-----
From: Sage Weil [mailto:[email protected]]
Sent: 01 February 2017 21:39
To: Nick Fisk <[email protected]>
Cc: 'Mark Nelson' <[email protected]>; [email protected]
Subject: RE: bluestore prefer wal sizeQuoted 6 lines · Nick Fisk
Further update,
I set
bluestore_debug_omit_block_device_writeto true and this gave me near filestore performance, albeit still with very high write amp on the SSD's. So its definitely something around that part of the code waiting on the writes to the spinning disks, puzzled why the commit didn'thelp.
Quoted 4 lines
I also set debug logging to 20/20 for bdev,bluefs,osd,bluestore and a grep didn't reveal any of the debug in that commit eg "defering small 0x". So possibly something isn't working as expected?
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Oh, yeah, the option isn't working then. I saw the line in my debug output.. are you sure you set
bluestore_prefer_wal_size?Yep 100%, I even did a config show on the admin socket to confirm the value. I will rebuild the OSD's and try again and do a bit more digging to see if I can work out why it's not entering that if statement.
Oh, I know what the problem is. Will push a fixed patch shortly.
Try now?
sage
Quoted 112 lines
sage
Quoted 93 lines
Quoted 93 lines
sage
Quoted 7 lines
Nick
-----Original Message-----
From: Nick Fisk [mailto:[email protected]]
Sent: 01 February 2017 19:03
To: 'Sage Weil' <[email protected]>; 'Mark Nelson'Quoted 6 lines
Cc: [email protected]
Subject: RE: bluestore prefer wal sizeHi Sage,
First results not looking good. It looks like write IO to the SSD's (sdd and sdi)
is now massively amplified, by somewhere in the region of about 10x. But I'm still only getting around 100 4kb's seq write iops from the fio client. This is in comparison to 2500-3000 iops on the SSD's and ~200 iops per spinning disk (sdc,sde,sdg,sdh).
Quoted 5 lines
rbd engine: RBD version: 0.1.11
Jobs: 1 (f=1): [W(1)] [100.0% done] [0KB/476KB/0KB /s] [0/119/0 iops] [eta 00m:00s]rbd_iodepth32: (groupid=0, jobs=1): err= 0: pid=31171: Wed Feb 118:56:51 2017
Quoted 13 lines
write: io=27836KB, bw=475020B/s, iops=115, runt= 60006msec
slat (usec): min=6, max=142, avg=10.98, stdev= 8.38 clat (msec): min=1, max=271, avg= 8.61, stdev= 3.63 lat (msec): min=1, max=271, avg= 8.62, stdev= 3.63 clat percentiles (msec): | 1.00th=[ 8], 5.00th=[ 9], 10.00th=[ 9], 20.00th=[ 9], | 30.00th=[ 9], 40.00th=[ 9], 50.00th=[ 9], 60.00th=[ 9], | 70.00th=[ 9], 80.00th=[ 9], 90.00th=[ 9], 95.00th=[ 9], | 99.00th=[ 17], 99.50th=[ 25], 99.90th=[ 33], 99.95th=[ 36], | 99.99th=[ 273] bw (KB /s): min= 191, max= 480, per=100.00%, avg=464.18, stdev=34.60 lat (msec) : 2=0.01%, 4=0.04%, 10=97.69%, 20=1.55%, 50=0.69% lat (msec) : 500=0.01%Quoted 8 lines
cpu : usr=0.13%, sys=0.12%, ctx=7224, majf=0, minf=5
IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%,
=64=0.0%submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, =64=0.0% complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, =64=0.0% issued : total=r=0/w=6959/d=0, short=r=0/w=0/d=0,drop=r=0/w=0/d=0
Quoted 7 lines
latency : target=0, window=0, percentile=100.00%, depth=1I've checked via the admin socket and the prefer wal option is set to 8192.
Random capture of iostat
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz
await
r_awaitw_awaitsvctm %utilQuoted 1 line
sda 0.00 77.00 0.00 5.50 0.00 338.00 122.91 0.05 11.64
0.00 11.64 8.73 4.80
Quoted 1 line
sdb 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 0.00
Quoted 1 line
sdc 0.00 0.00 0.00 151.50 0.00 302.00 3.99 0.54 3.59
0.00 3.59 3.58 54.20
Quoted 1 line
sdd 0.00 0.00 0.00 1474.00 0.00 4008.00 5.44 0.09 0.06
0.00 0.06 0.06 9.20
Quoted 1 line
sde 0.00 0.00 0.00 217.00 0.00 434.00 4.00 0.91 4.20
0.00 4.20 4.20 91.20
Quoted 1 line
sdf 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 0.00
Quoted 1 line
sdg 0.00 0.00 0.00 66.50 0.00 134.00 4.03 0.18 2.68
0.00 2.68 2.68 17.80
Quoted 1 line
sdh 0.00 0.00 0.00 217.00 0.00 434.00 4.00 0.80 3.71
0.00 3.71 3.71 80.40
Quoted 1 line
sdi 0.00 0.00 0.00 1134.00 0.00 3082.00 5.44 0.09 0.08
0.00 0.08 0.07 8.40
Quoted 17 lines
-----Original Message-----
From: Sage Weil [mailto:[email protected]]
Sent: 01 February 2017 15:34
To: [email protected]
Cc: [email protected]
Subject: bluestore prefer wal sizeHey Nick,
I've updated/improved the prefer wal size PR (that sends small writes through the wal). See
https://github.com/ceph/ceph/pull/13217if you want to try it out.
Quoted 10 lines
Quoted 7 lines
Quoted 7 lines
Thanks!
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
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): d0caeb89.AEUAHScduCcAAAAAAAAAAFPDZXcAADNJBWwAAAAAAACRXwBYk0Zd@mailjet.com
Hi Nick,
Quoted 5 lines · Nick Fisk
Further update
If I do random writes instead of sequential, I see the "defering small write via wal" action. But from the
do_alloc_writefunction not small write.
Ie. log entry is:_do_alloc_writedefering small0x1000write via wal
I just ran some tests using the branch with 4k random and sequential writes against a single OSD. I see deferring small write via wal from do_alloc_write both for both sequential and random when bluestore_prefer_wal_size is set to be larger than the IO size. Otherwise, I don't see the messages. I am also preconditioning with 4MB writes.
So far I've just been testing on NVMe, but I should be able to do some mixed tests soon to see if there are any interesting performance implications.
Mark
Quoted 210 lines
And that’s for a 4kb random write on an RBD that has been fully conditioned via fio 4MB writes
So it's something in the sequential nature of the test which trips it up as I don't see any sign of deferred writes
From looking at the code in the small write function, I can only see two possibilities that would stop if from reaching the prefer wal IF statement
while (ep != o->extent_map.extent_map.end()) { if (ep->blob_start() >= end) { break;and
if ((
b_off%chunk_size== 0 &&b_len%chunk_size== 0) &&b->get_blob().get_ondisk_length() >= b_off + b_len && b->get_blob().is_unused(b_off, b_len) && b->get_blob().is_allocated(b_off, b_len)) {Unfortunately, that’s about as far as I have got, before my knowledge of Bluestore becomes a limitation.
Don't know if that triggers any thoughts?
Quoted 187 lines
2017-02-02 10:39:31.988782 7ff7282ff700 10 bluestore(/var/lib/ceph/osd/ceph-4) queue_transactions existing 0x56102a5a4900 osr(9.73 0x56102a5db1a0) 2017-02-02 10:39:31.988786 7ff7282ff700 20 bluestore(/var/lib/ceph/osd/ceph-4) _txc_create osr 0x56102a5a4900 = 0x56102ab4be40 seq 260 2017-02-02 10:39:31.988797 7ff7282ff700 15 bluestore(/var/lib/ceph/osd/ceph-4) _setattrs 9.73_head #9:cff290b9:::rbd_data.36646a74b0dc51.0000000000000001:head# 2 key s 2017-02-02 10:39:31.988802 7ff7282ff700 10 bluestore(/var/lib/ceph/osd/ceph-4) _setattrs 9.73_head #9:cff290b9:::rbd_data.36646a74b0dc51.0000000000000001:head# 2 key s = 0 2017-02-02 10:39:31.988806 7ff7282ff700 15 bluestore(/var/lib/ceph/osd/ceph-4) _write 9.73_head #9:cff290b9:::rbd_data.36646a74b0dc51.0000000000000001:head# 0xfb000~ 1000 2017-02-02 10:39:31.988809 7ff7282ff700 20 bluestore(/var/lib/ceph/osd/ceph-4) _do_write #9:cff290b9:::rbd_data.36646a74b0dc51.0000000000000001:head# 0xfb000~1000 - have 0x400000 (4194304) bytes fadvise_flags 0x0 2017-02-02 10:39:31.988812 7ff7282ff700 20 bluestore(/var/lib/ceph/osd/ceph-4) _do_write prefer csum_order 12 target_blob_size 0x80000 2017-02-02 10:39:31.988814 7ff7282ff700 10 bluestore(/var/lib/ceph/osd/ceph-4) _do_write_small 0xfb000~1000 2017-02-02 10:39:31.988816 7ff7282ff700 20 bluestore(/var/lib/ceph/osd/ceph-4) _do_write_small considering Blob(0x56102aac05a0 blob([0x256480000~80000] mutable+csum crc32c/0x1000) ref_map(0x0~80000=1) SharedBlob(0x56102aa76260)) bstart 0x80000 2017-02-02 10:39:31.988821 7ff7282ff700 20 bluestore.BufferSpace(0x56102aa762b8 in 0x56102a1337a0) _discard 0x7b000~1000 2017-02-02 10:39:31.988827 7ff7282ff700 20 bluestore(/var/lib/ceph/osd/ceph-4) _do_write_small wal write 0x7b000~1000 of mutable Blob(0x56102aac05a0 blob([0x256480000~80000] mutable+csum crc32c/0x1000) ref_map(0x0~80000=1) SharedBlob(0x56102aa76260)) at [0x2564fb000~1000] 2017-02-02 10:39:31.988832 7ff7282ff700 20 bluestore(/var/lib/ceph/osd/ceph-4) _do_write_small lex 0xfb000~1000: 0x7b000~1000 Blob(0x56102aac05a0 blob([0x256480000~80000] mutable+csum crc32c/0x1000) ref_map(0x0~7b000=1,0x7b000~1000=2,0x7c000~4000=1) SharedBlob(0x56102aa76260)) 2017-02-02 10:39:31.988836 7ff7282ff700 20 bluestore(/var/lib/ceph/osd/ceph-4) _do_alloc_write txc 0x56102ab4be40 0 blobs 2017-02-02 10:39:31.988837 7ff7282ff700 10 bitmapalloc:reserve instance 94627427524464 num_used 345738 total 7627973 2017-02-02 10:39:31.988840 7ff7282ff700 20 bluestore(/var/lib/ceph/osd/ceph-4) _wctx_finish lex_old 0xfb000~1000: 0x7b000~1000 Blob(0x56102aac05a0 blob([0x256480000~80000] mutable+csum crc32c/0x1000) ref_map(0x0~7b000=1,0x7b000~1000=2,0x7c000~4000=1) SharedBlob(0x56102aa76260)) 2017-02-02 10:39:31.988844 7ff7282ff700 20 bluestore.extentmap(0x56102a8ee3f0) compress_extent_map 0xfb000~1000 next shard 0x100000 merging 0x80000~7b000: 0x0~7b000 Blob(0x56102aac05a0 blob([0x256480000~80000] mutable+csum crc32c/0x1000) ref_map(0x0~80000=1) SharedBlob(0x56102aa76260)) and 0xfb000~1000: 0x7b000~1000 Blob(0x56102aac05a0 blob([0x256480000~80000] mutable+csum crc32c/0x1000) ref_map(0x0~80000=1) SharedBlob(0x56102aa76260)) 2017-02-02 10:39:31.988850 7ff7282ff700 20 bluestore.extentmap(0x56102a8ee3f0) compress_extent_map 0xfb000~1000 next shard 0x100000 merging 0x80000~7c000: 0x0~7c000 Blob(0x56102aac05a0 blob([0x256480000~80000] mutable+csum crc32c/0x1000) ref_map(0x0~80000=1) SharedBlob(0x56102aa76260)) and 0xfc000~4000: 0x7c000~4000 Blob(0x56102aac05a0 blob([0x256480000~80000] mutable+csum crc32c/0x1000) ref_map(0x0~80000=1) SharedBlob(0x56102aa76260)) 2017-02-02 10:39:31.988868 7ff7282ff700 20 bluestore.extentmap(0x56102a8ee3f0) dirty_range mark shard 0x80000 dirty 2017-02-02 10:39:31.988870 7ff7282ff700 10 bluestore(/var/lib/ceph/osd/ceph-4) _write 9.73_head #9:cff290b9:::rbd_data.36646a74b0dc51.0000000000000001:head# 0xfb000~1000 = 0 2017-02-02 10:39:31.988875 7ff7282ff700 15 bluestore(/var/lib/ceph/osd/ceph-4) _omap_setkeys 9.73_head #9:ce000000::::head# 2017-02-02 10:39:31.988882 7ff7282ff700 10 bluestore(/var/lib/ceph/osd/ceph-4) _omap_setkeys 9.73_head #9:ce000000::::head# = 0 2017-02-02 10:39:31.988885 7ff7282ff700 20 bluestore(/var/lib/ceph/osd/ceph-4) _txc_write_nodes txc 0x56102ab4be40 onodes 0x56102a8ee300 shared_blobs 2017-02-02 10:39:31.988894 7ff7282ff700 20 bluestore.extentmap(0x56102a8ee3f0) update shard 0x80000 is 531 bytes (was 531) from 1 extents 2017-02-02 10:39:31.988902 7ff7282ff700 20 bluestore(/var/lib/ceph/osd/ceph-4) onode #9:cff290b9:::rbd_data.36646a74b0dc51.0000000000000001:head# is 424 (422 bytes onode + 2 bytes spanning blobs + 0 bytes inline extents) 2017-02-02 10:39:31.988914 7ff7282ff700 10 bluestore(/var/lib/ceph/osd/ceph-4) _txc_state_proc txc 0x56102ab4be40 prepare 2017-02-02 10:39:31.988916 7ff7282ff700 20 bluestore(/var/lib/ceph/osd/ceph-4) _txc_finish_io 0x56102ab4be40 2017-02-02 10:39:31.988917 7ff7282ff700 10 bluestore(/var/lib/ceph/osd/ceph-4) _txc_state_proc txc 0x56102ab4be40 io_done 2017-02-02 10:39:31.988918 7ff7282ff700 20 bluestore.BufferSpace(0x56102aa762b8 in 0x56102a1337a0) finish_write buffer(0x56102adb1830 space 0x56102aa762b8 0x7b000~1000 writing nocache) 2017-02-02 10:39:31.988939 7ff72e30b700 20 bluestore(/var/lib/ceph/osd/ceph-4) _kv_sync_thread wake 2017-02-02 10:39:31.988941 7ff72e30b700 20 bluestore(/var/lib/ceph/osd/ceph-4) _kv_sync_thread committing 1 submitting 1 cleaning 0 2017-02-02 10:39:31.988952 7ff72e30b700 20 bluestore(/var/lib/ceph/osd/ceph-4) _txc_finalize_kv txc 0x56102ab4be40 allocated 0x[] released 0x[] 2017-02-02 10:39:31.988999 7ff72e30b700 10 bluestore(/var/lib/ceph/osd/ceph-4) _balance_bluefs_freespace bluefs 9535 M free (0.999896) bluestore 222 G free (0.954675), bluefs_ratio 0.0402143 2017-02-02 10:39:31.989400 7ff72e30b700 20 bluestore(/var/lib/ceph/osd/ceph-4) _kv_sync_thread committed 1 cleaned 0 in 0.000456 2017-02-02 10:39:31.989405 7ff72e30b700 10 bluestore(/var/lib/ceph/osd/ceph-4) _txc_state_proc txc 0x56102ab4be40 kv_submitted 2017-02-02 10:39:31.989407 7ff72e30b700 20 bluestore(/var/lib/ceph/osd/ceph-4) _txc_finish_kv txc 0x56102ab4be40 2017-02-02 10:39:31.989413 7ff72e30b700 20 bluestore(/var/lib/ceph/osd/ceph-4) _wal_apply txc 0x56102ab4be40 seq 255 2017-02-02 10:39:31.989414 7ff72e30b700 20 bluestore(/var/lib/ceph/osd/ceph-4) _do_wal_op write [0x2564fb000~1000]Quoted 117 lines
sage
Quoted 114 lines
sage
Quoted 95 lines
Quoted 95 lines
sage
Quoted 7 lines
Nick
-----Original Message-----
From: Nick Fisk [mailto:[email protected]]
Sent: 01 February 2017 19:03
To: 'Sage Weil' <[email protected]>; 'Mark Nelson'Quoted 7 lines
Cc: [email protected]
Subject: RE: bluestore prefer wal sizeHi Sage,
First results not looking good. It looks like write IO to the SSD's (sdd and sdi)
is now massively amplified, by somewhere in the region of about 10x. But I'm still only getting around 100 4kb's seq write iops from the fio client. This is in comparison to 2500-3000 iops on the SSD's and ~200 iops per spinning disk (sdc,sde,sdg,sdh).
Quoted 6 lines
rbd engine: RBD version: 0.1.11
Jobs: 1 (f=1): [W(1)] [100.0% done] [0KB/476KB/0KB /s] [0/119/0 iops] [eta 00m:00s]rbd_iodepth32: (groupid=0, jobs=1): err= 0: pid=31171: Wed Feb 118:56:51 2017
Quoted 13 lines
write: io=27836KB, bw=475020B/s, iops=115, runt= 60006msec
slat (usec): min=6, max=142, avg=10.98, stdev= 8.38 clat (msec): min=1, max=271, avg= 8.61, stdev= 3.63 lat (msec): min=1, max=271, avg= 8.62, stdev= 3.63 clat percentiles (msec): | 1.00th=[ 8], 5.00th=[ 9], 10.00th=[ 9], 20.00th=[ 9], | 30.00th=[ 9], 40.00th=[ 9], 50.00th=[ 9], 60.00th=[ 9], | 70.00th=[ 9], 80.00th=[ 9], 90.00th=[ 9], 95.00th=[ 9], | 99.00th=[ 17], 99.50th=[ 25], 99.90th=[ 33], 99.95th=[ 36], | 99.99th=[ 273] bw (KB /s): min= 191, max= 480, per=100.00%, avg=464.18, stdev=34.60 lat (msec) : 2=0.01%, 4=0.04%, 10=97.69%, 20=1.55%, 50=0.69% lat (msec) : 500=0.01%Quoted 8 lines
cpu : usr=0.13%, sys=0.12%, ctx=7224, majf=0, minf=5
IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%,
=64=0.0%submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, =64=0.0% complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, =64=0.0% issued : total=r=0/w=6959/d=0, short=r=0/w=0/d=0,drop=r=0/w=0/d=0
Quoted 7 lines
latency : target=0, window=0, percentile=100.00%, depth=1I've checked via the admin socket and the prefer wal option is set to 8192.
Random capture of iostat
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz
await
r_awaitw_awaitsvctm %utilQuoted 1 line
sda 0.00 77.00 0.00 5.50 0.00 338.00 122.91 0.05 11.64
0.00 11.64 8.73 4.80
Quoted 1 line
sdb 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 0.00
Quoted 1 line
sdc 0.00 0.00 0.00 151.50 0.00 302.00 3.99 0.54 3.59
0.00 3.59 3.58 54.20
Quoted 1 line
sdd 0.00 0.00 0.00 1474.00 0.00 4008.00 5.44 0.09 0.06
0.00 0.06 0.06 9.20
Quoted 1 line
sde 0.00 0.00 0.00 217.00 0.00 434.00 4.00 0.91 4.20
0.00 4.20 4.20 91.20
Quoted 1 line
sdf 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 0.00
Quoted 1 line
sdg 0.00 0.00 0.00 66.50 0.00 134.00 4.03 0.18 2.68
0.00 2.68 2.68 17.80
Quoted 1 line
sdh 0.00 0.00 0.00 217.00 0.00 434.00 4.00 0.80 3.71
0.00 3.71 3.71 80.40
Quoted 1 line
sdi 0.00 0.00 0.00 1134.00 0.00 3082.00 5.44 0.09 0.08
0.00 0.08 0.07 8.40
Quoted 17 lines
-----Original Message-----
From: Sage Weil [mailto:[email protected]]
Sent: 01 February 2017 15:34
To: [email protected]
Cc: [email protected]
Subject: bluestore prefer wal sizeHey Nick,
I've updated/improved the prefer wal size PR (that sends small writes through the wal). See
https://github.com/ceph/ceph/pull/13217if you want to try it out.
Quoted 10 lines
Quoted 7 lines
Quoted 7 lines
Thanks!
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
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): 5ed3f3b2.ADsAAGRwZ_AAAAAAAAAAAFPDZXcAADNJBWwAAAAAAACRXwBYlFIS@mailjet.com
Hi Nick,
So I'm still catching up to your testing, but last night I ran through a number of tests with a single OSD, a single client, and iodepth=1 fio rbd tests:
https://drive.google.com/uc?export=download&id=0B2gTBZrkrnpZWE85OFI3Q2xQZ00
I tested HDD, HDD+NVMe, and NVMe configurations looking at filestore, bluestore with 1k and 16k prefer wal sizes. I believe I'm seeing similar results to what you saw. On NVMe we are pretty similar likely due to the raw backend throughput the NVMe drives can maintain but on HDD, bluestore is doing quite a bit worse than filestore for this specific use case. During the bluestore HDD tests, I watched disk access and it appears we are saturating the disk with small writes despite the low client performance. I'll be digging into this more today but I wanted to send out an update to let you know I believe I've reproduced your results and am looking into it.
Thanks!
Mark
Quoted 399 lines · Nick Fisk
Quoted 47 lines
-----Original Message-----
From: Nick Fisk [mailto:[email protected]]
Sent: 02 February 2017 21:15
To: 'Mark Nelson' <[email protected]>; 'Sage Weil' <[email protected]>
Cc: [email protected]
Subject: RE: bluestore prefer wal sizeHi Mark,
Quoted 25 lines
-----Original Message-----
From: Mark Nelson [mailto:[email protected]]
Sent: 02 February 2017 20:17
To: [email protected]; 'Sage Weil' <[email protected]>
Cc: [email protected]
Subject: Re: bluestore prefer wal sizeHi Nick,
Quoted 4 lines · Nick Fisk
Further update
If I do random writes instead of sequential, I see the "defering small write
via wal" action. But from the
do_alloc_writefunction not small write.Quoted 2 lines
Ie. log entry is:
_do_alloc_writedefering small0x1000write via walI just ran some tests using the branch with 4k random and sequential writes against a single OSD. I see deferring small write via wal from
do_alloc_writeboth for both sequential and random whenbluestore_prefer_wal_sizeis set to be larger than the IO size. Otherwise, I don't see the messages. I am also preconditioning with 4MB writes.Quoted 2 lines
So far I've just been testing on NVMe, but I should be able to do some mixed tests soon to see if there are any interesting performance implications.
I've just looked at the RBD I ran those random tests on and I realized that it was only about 90% pre-conditioned due to me leaving the
time_basedfio option on. After filling completely with writes, now both random and sequential are doing_do_write_smallwrites and no deferring wal writes.From looking through the code today, as far as I understand it
Write_small= write to existing object undermin_allow_sizeWrite_big= write to existing object overmin_allow_sizeAlloc_write= write to a new objectQuoted 7 lines
Is that correct?
If it is, I'm interested in why you are seeing
alloc_writes, as I don't see them if the RBD is fully pre-conditioned? Unless there is something changing with themin_alloc_sizeas you are using non rotational media, which is causing this change?I'm adding a few extra dout's to the
write_smallfunction to try and see what's going on, hopefully I will know more tomorrow.Morning,
So, results are in. I added some debugging before the IF statement (https://github.com/liewegas/ceph/blob/944b4d3a3869a472c1e66a4fa73c12766c7801ac/src/os/bluestore/BlueStore.cc#L7885)
So the following section now looks like below:
dout(20) << __func__ << " before IF 0x" << std::hex << b_off << "~" << b_len << " - " << b->get_blob().get_ondisk_length() << " - " << b->get_blob().is_unused(b_off, b_len) << " - " << b->get_blob().is_allocated(b_off, b_len) << " - " << dendl; if ((b_off % chunk_size == 0 && b_len % chunk_size == 0) && b->get_blob().get_ondisk_length() >= b_off + b_len && b->get_blob().is_unused(b_off, b_len) && b->get_blob().is_allocated(b_off, b_len)) {And the output was
_do_write_smallbefore IF 0xf000~1000 - 10000 - 0 - 1 -So the " b->get_blob().is_unused(b_off,
b_len)" call is returning false, which stops it going into the IF block and doing the prefer wal write. Is that expected?Nick
Quoted 323 lines
Nick
Quoted 321 lines
Mark
Quoted 17 lines
And that’s for a 4kb random write on an RBD that has been fully conditioned via fio 4MB writes
So it's something in the sequential nature of the test which trips it up as I don't see any sign of deferred writes
From looking at the code in the small write function, I can only see two possibilities that would stop if from reaching the prefer wal IF statement
while (ep != o->extent_map.extent_map.end()) { if (ep->blob_start() >= end) { break;and
Quoted 7 lines
if ((
b_off%chunk_size== 0 &&b_len%chunk_size== 0) &&b->get_blob().get_ondisk_length() >= b_off + b_len && b->get_blob().is_unused(b_off, b_len) && b->get_blob().is_allocated(b_off, b_len)) {Unfortunately, that’s about as far as I have got, before my knowledge of
Bluestore becomes a limitation.
Quoted 15 lines
Don't know if that triggers any thoughts?
Quoted 12 lines
2017-02-02 10:39:31.988782 7ff7282ff700 10 bluestore(/var/lib/ceph/osd/ceph-4) queue_transactions existing 0x56102a5a4900 osr(9.73 0x56102a5db1a0) 2017-02-02 10:39:31.988786 7ff7282ff700 20 bluestore(/var/lib/ceph/osd/ceph-4) _txc_create osr 0x56102a5a4900 = 0x56102ab4be40 seq 260 2017-02-02 10:39:31.988797 7ff7282ff700 15bluestore(/var/lib/ceph/osd/ceph-4)
_setattrs9.73_head #9:cff290b9:::rbd_data.36646a74b0dc51.0000000000000001:head# 2 keys
Quoted 3 lines
Quoted 3 lines
2017-02-02 10:39:31.988802 7ff7282ff700 10bluestore(/var/lib/ceph/osd/ceph-4)
_setattrs9.73_head #9:cff290b9:::rbd_data.36646a74b0dc51.0000000000000001:head# 2 keys
Quoted 4 lines
Quoted 4 lines
= 0
2017-02-02 10:39:31.988806 7ff7282ff700 15bluestore(/var/lib/ceph/osd/ceph-4)
_write9.73_head #9:cff290b9:::rbd_data.36646a74b0dc51.0000000000000001:head#0xfb000~
Quoted 14 lines
Quoted 14 lines
1000
2017-02-02 10:39:31.988809 7ff7282ff700 20 bluestore(/var/lib/ceph/osd/ceph-4) _do_write #9:cff290b9:::rbd_data.36646a74b0dc51.0000000000000001:head# 0xfb000~1000 - have 0x400000 (4194304) bytes fadvise_flags 0x0 2017-02-02 10:39:31.988812 7ff7282ff700 20 bluestore(/var/lib/ceph/osd/ceph-4) _do_write prefer csum_order 12 target_blob_size 0x80000 2017-02-02 10:39:31.988814 7ff7282ff700 10 bluestore(/var/lib/ceph/osd/ceph-4) _do_write_small 0xfb000~1000 2017-02-02 10:39:31.988816 7ff7282ff700 20bluestore(/var/lib/ceph/osd/ceph-4)
_do_write_smallconsidering Blob(0x56102aac05a0 blob([0x256480000~80000] mutable+csumQuoted 8 lines
Quoted 8 lines
crc32c/0x1000)
ref_map(0x0~80000=1)SharedBlob(0x56102aa76260)) bstart0x800002017-02-02 10:39:31.988821 7ff7282ff700 20 bluestore.BufferSpace(0x56102aa762b8 in 0x56102a1337a0) _discard 0x7b000~1000 2017-02-02 10:39:31.988827 7ff7282ff700 20bluestore(/var/lib/ceph/osd/ceph-4)
_do_write_smallwal write 0x7b000~1000 of mutable Blob(0x56102aac05a0blob([0x256480000~80000]
Quoted 15 lines
Quoted 15 lines
mutable+csum crc32c/0x1000)
ref_map(0x0~80000=1)
SharedBlob(0x56102aa76260)) at [0x2564fb000~1000]2017-02-02 10:39:31.988832 7ff7282ff700 20bluestore(/var/lib/ceph/osd/ceph-4)
_do_write_smalllex 0xfb000~1000: 0x7b000~1000
Blob(0x56102aac05a0blob([0x256480000~80000] mutable+csum crc32c/0x1000)ref_map(0x0~7b000=1,0x7b000~1000=2,0x7c000~4000=1)SharedBlob(0x56102aa76260))2017-02-02 10:39:31.988836 7ff7282ff700 20 bluestore(/var/lib/ceph/osd/ceph-4) _do_alloc_write txc 0x56102ab4be40 0 blobs 2017-02-02 10:39:31.988837 7ff7282ff700 10 bitmapalloc:reserve instance 94627427524464 num_used 345738 total 7627973 2017-02-02 10:39:31.988840 7ff7282ff700 20Quoted 8 lines
Quoted 8 lines
bluestore(/var/lib/ceph/osd/ceph-4)
_wctx_finishlex_old0xfb000~1000: 0x7b000~1000
Blob(0x56102aac05a0blob([0x256480000~80000] mutable+csum crc32c/0x1000)ref_map(0x0~7b000=1,0x7b000~1000=2,0x7c000~4000=1)SharedBlob(0x56102aa76260))2017-02-02 10:39:31.988844 7ff7282ff700 20
bluestore.extentmap(0x56102a8ee3f0)compress_extent_map0xfb000~1000
Quoted 9 lines
Quoted 9 lines
next shard
0x100000merging 0x80000~7b000: 0x0~7b000 Blob(0x56102aac05a0blob([0x256480000~80000] mutable+csum crc32c/0x1000)ref_map(0x0~80000=1)SharedBlob(0x56102aa76260)) and 0xfb000~1000:
0x7b000~1000 Blob(0x56102aac05a0blob([0x256480000~80000] mutable+csum crc32c/0x1000)ref_map(0x0~80000=1)SharedBlob(0x56102aa76260))2017-02-02 10:39:31.988850 7ff7282ff700 20
bluestore.extentmap(0x56102a8ee3f0)compress_extent_map0xfb000~1000
Quoted 19 lines
Quoted 19 lines
next shard
0x100000merging 0x80000~7c000: 0x0~7c000 Blob(0x56102aac05a0blob([0x256480000~80000] mutable+csum crc32c/0x1000)ref_map(0x0~80000=1)SharedBlob(0x56102aa76260)) and 0xfc000~4000:
0x7c000~4000 Blob(0x56102aac05a0blob([0x256480000~80000] mutable+csum crc32c/0x1000)ref_map(0x0~80000=1)SharedBlob(0x56102aa76260))2017-02-02 10:39:31.988868 7ff7282ff700 20 bluestore.extentmap(0x56102a8ee3f0) dirty_range mark shard 0x80000 dirty 2017-02-02 10:39:31.988870 7ff7282ff700 10 bluestore(/var/lib/ceph/osd/ceph-4) _write 9.73_head #9:cff290b9:::rbd_data.36646a74b0dc51.0000000000000001:head# 0xfb000~1000 = 0 2017-02-02 10:39:31.988875 7ff7282ff700 15 bluestore(/var/lib/ceph/osd/ceph-4) _omap_setkeys 9.73_head #9:ce000000::::head# 2017-02-02 10:39:31.988882 7ff7282ff700 10bluestore(/var/lib/ceph/osd/ceph-4)
_omap_setkeys9.73_headQuoted 8 lines
Quoted 8 lines
#9:ce000000::::head# = 0
2017-02-02 10:39:31.988885 7ff7282ff700 20 bluestore(/var/lib/ceph/osd/ceph-4) _txc_write_nodes txc 0x56102ab4be40 onodes 0x56102a8ee300 shared_blobs 2017-02-02 10:39:31.988894 7ff7282ff700 20
bluestore.extentmap(0x56102a8ee3f0)update shard0x80000is 531 bytes(was 531) from 1 extents
Quoted 1 line
Quoted 1 line
2017-02-02 10:39:31.988902 7ff7282ff700 20bluestore(/var/lib/ceph/osd/ceph-4) onode
Quoted 83 lines
Quoted 83 lines
#9:cff290b9:::rbd_data.36646a74b0dc51.0000000000000001:head# is 424 (422 bytes onode + 2 bytes spanning blobs + 0 bytes inline extents)
2017-02-02 10:39:31.988914 7ff7282ff700 10 bluestore(/var/lib/ceph/osd/ceph-4) _txc_state_proc txc 0x56102ab4be40 prepare 2017-02-02 10:39:31.988916 7ff7282ff700 20 bluestore(/var/lib/ceph/osd/ceph-4) _txc_finish_io 0x56102ab4be40 2017-02-02 10:39:31.988917 7ff7282ff700 10 bluestore(/var/lib/ceph/osd/ceph-4) _txc_state_proc txc 0x56102ab4be40 io_done 2017-02-02 10:39:31.988918 7ff7282ff700 20
bluestore.BufferSpace(0x56102aa762b8 in 0x56102a1337a0)finish_write
buffer(0x56102adb1830 space0x56102aa762b80x7b000~1000 writing nocache)2017-02-02 10:39:31.988939 7ff72e30b700 20 bluestore(/var/lib/ceph/osd/ceph-4) _kv_sync_thread wake 2017-02-02 10:39:31.988941 7ff72e30b700 20 bluestore(/var/lib/ceph/osd/ceph-4) _kv_sync_thread committing 1 submitting 1 cleaning 0 2017-02-02 10:39:31.988952 7ff72e30b700 20 bluestore(/var/lib/ceph/osd/ceph-4) _txc_finalize_kv txc 0x56102ab4be40 allocated 0x[] released 0x[] 2017-02-02 10:39:31.988999 7ff72e30b700 10bluestore(/var/lib/ceph/osd/ceph-4)
_balance_bluefs_freespacebluefs
9535 M free
(0.999896) bluestore 222 G free (0.954675),bluefs_ratio0.04021432017-02-02 10:39:31.989400 7ff72e30b700 20 bluestore(/var/lib/ceph/osd/ceph-4) _kv_sync_thread committed 1 cleaned 0 in 0.000456 2017-02-02 10:39:31.989405 7ff72e30b700 10 bluestore(/var/lib/ceph/osd/ceph-4) _txc_state_proc txc 0x56102ab4be40 kv_submitted 2017-02-02 10:39:31.989407 7ff72e30b700 20 bluestore(/var/lib/ceph/osd/ceph-4) _txc_finish_kv txc 0x56102ab4be40 2017-02-02 10:39:31.989413 7ff72e30b700 20 bluestore(/var/lib/ceph/osd/ceph-4) _wal_apply txc 0x56102ab4be40 seq 255 2017-02-02 10:39:31.989414 7ff72e30b700 20bluestore(/var/lib/ceph/osd/ceph-4)
_do_wal_opwrite [0x2564fb000~1000]Quoted 36 lines
sage
Quoted 33 lines
sage
Quoted 30 lines
Quoted 30 lines
sage
Quoted 7 lines
Nick
-----Original Message-----
From: Nick Fisk [mailto:[email protected]]
Sent: 01 February 2017 19:03
To: 'Sage Weil' <[email protected]>; 'Mark Nelson'Quoted 7 lines
Cc: [email protected]
Subject: RE: bluestore prefer wal sizeHi Sage,
First results not looking good. It looks like write IO to the SSD's (sdd and sdi)
is now massively amplified, by somewhere in the region of about 10x. But I'm still only getting around 100 4kb's seq write iops from the fio client. This is in comparison to 2500-3000 iops on the SSD's and ~200 iops per spinning disk (sdc,sde,sdg,sdh).
Quoted 6 lines
rbd engine: RBD version: 0.1.11
Jobs: 1 (f=1): [W(1)] [100.0% done] [0KB/476KB/0KB /s] [0/119/0 iops] [eta 00m:00s]rbd_iodepth32: (groupid=0, jobs=1): err= 0: pid=31171: Wed Feb 118:56:51 2017
Quoted 12 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
write: io=27836KB, bw=475020B/s, iops=115, runt= 60006msec
slat (usec): min=6, max=142, avg=10.98, stdev= 8.38 clat (msec): min=1, max=271, avg= 8.61, stdev= 3.63 lat (msec): min=1, max=271, avg= 8.62, stdev= 3.63Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
clat percentiles (msec): | 1.00th=[ 8], 5.00th=[ 9], 10.00th=[ 9], 20.00th=[ 9], | 30.00th=[ 9], 40.00th=[ 9], 50.00th=[ 9], 60.00th=[ 9], | 70.00th=[ 9], 80.00th=[ 9], 90.00th=[ 9], 95.00th=[ 9], | 99.00th=[ 17], 99.50th=[ 25], 99.90th=[ 33], 99.95th=[ 36], | 99.99th=[ 273] bw (KB /s): min= 191, max= 480, per=100.00%,avg=464.18,
stdev=34.60
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
lat (msec) : 2=0.01%, 4=0.04%, 10=97.69%, 20=1.55%, 50=0.69% lat (msec) : 500=0.01%cpu : usr=0.13%, sys=0.12%, ctx=7224, majf=0, minf=5
IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%,32=0.0%,
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
=64=0.0%
submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%,64=0.0%,
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 4 lines
=64=0.0%
complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, =64=0.0% issued : total=r=0/w=6959/d=0, short=r=0/w=0/d=0,drop=r=0/w=0/d=0
Quoted 4 lines
latency : target=0, window=0, percentile=100.00%, depth=1I've checked via the admin socket and the prefer wal option is set to
8192.
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Random capture of iostat
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz
avgqu-sz
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
await
r_awaitw_awaitsvctm %utilQuoted 1 line
sda 0.00 77.00 0.00 5.50 0.00 338.00 122.91 0.05
11.64
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
0.00 11.64 8.73 4.80
Quoted 1 line
sdb 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
0.00 0.00 0.00 0.00
Quoted 1 line
sdc 0.00 0.00 0.00 151.50 0.00 302.00 3.99 0.54
3.59
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
0.00 3.59 3.58 54.20
Quoted 1 line
sdd 0.00 0.00 0.00 1474.00 0.00 4008.00 5.44 0.09
0.06
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
0.00 0.06 0.06 9.20
Quoted 1 line
sde 0.00 0.00 0.00 217.00 0.00 434.00 4.00 0.91
4.20
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
0.00 4.20 4.20 91.20
Quoted 1 line
sdf 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
0.00 0.00 0.00 0.00
Quoted 1 line
sdg 0.00 0.00 0.00 66.50 0.00 134.00 4.03 0.18
2.68
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
0.00 2.68 2.68 17.80
Quoted 1 line
sdh 0.00 0.00 0.00 217.00 0.00 434.00 4.00 0.80
3.71
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
0.00 3.71 3.71 80.40
Quoted 1 line
sdi 0.00 0.00 0.00 1134.00 0.00 3082.00 5.44 0.09
0.08
Quoted 35 lines
Quoted 34 lines
Quoted 34 lines
Quoted 34 lines
Quoted 18 lines
Quoted 18 lines
0.00 0.08 0.07 8.40
Quoted 17 lines
-----Original Message-----
From: Sage Weil [mailto:[email protected]]
Sent: 01 February 2017 15:34
To: [email protected]
Cc: [email protected]
Subject: bluestore prefer wal sizeHey Nick,
I've updated/improved the prefer wal size PR (that sends small writes through the wal). See
https://github.com/ceph/ceph/pull/13217if you want to try it out.
Quoted 10 lines
Quoted 7 lines
Quoted 7 lines
Thanks!
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
A message that is not in the archive (sent off-list or not yet received): ba5b6d21.ADsAAGSJJ-oAAAAAAAAAAFJy4NwAADNJBWwAAAAAAACRXwBYlKUc@mailjet.com
Quoted 22 lines · Nick Fisk
Hi Mark,
Quoted 12 lines
-----Original Message-----
From: Mark Nelson [mailto:[email protected]]
Sent: 03 February 2017 15:20
To: [email protected]; 'Sage Weil' <[email protected]>
Cc: [email protected]
Subject: Re: bluestore prefer wal sizeHi Nick,
So I'm still catching up to your testing, but last night I ran through a number of tests with a single OSD, a single client, and iodepth=1 fio rbd tests:
Quoted 7 lines
https://drive.google.com/uc?export=download&id=0B2gTBZrkrnpZWE85OFI3Q2xQZ00
I tested HDD, HDD+NVMe, and NVMe configurations looking at filestore, bluestore with 1k and 16k prefer wal sizes. I believe I'm seeing similar results to what you saw. On NVMe we are pretty similar likely due to the raw backend throughput the NVMe drives can maintain but on HDD, bluestore is doing quite a bit worse than filestore for this specific use case. During the bluestore HDD tests, I watched disk access and it appears we are saturating the disk with small writes despite the low client performance. I'll be digging into this more today but I wanted to send out an update to let you know I believe I've reproduced your results and am looking into it.
Quoted 3 lines
Glad to hear that you can reproduce. After debugging that IF statement, I think I'm at the point where I am out of my depth. But if there is anything I can do, let me know.
I finally got my dev box HDD sorted out and retested this. The IOPS were being halved because bluestore was triggering a rocksdb commit (and the associated latency) just to retire the WAL record. I rebased and fixed it so that the WAL entries are deleted lazily (in the next commit round) and it's 2x faster than before. I'm getting ~110 IOPS with rados bench 4k writes with queue depth 1 (6TB 7200rpm WD black). That's in the neighborhood of what I'd expect from a spinner... it's basically seeking back and forth between two write positions (the rocksdb log and the new object data where the allocator position is). We could probably bring this up a bit by making the WAL work be batched on HDD (build up several IOs worth and dispatch it all at once to reduce seeks). That'll take a bit more work, though.
With WAL on an NVMe, I get about ~450 IOPS.
Want to give it a try?
sage
Quoted 418 lines
Quoted 415 lines
Thanks!
MarkQuoted 36 lines · Nick Fisk
Quoted 36 lines
-----Original Message-----
From: Nick Fisk [mailto:[email protected]]
Sent: 02 February 2017 21:15
To: 'Mark Nelson' <[email protected]>; 'Sage Weil' <[email protected]>
Cc: [email protected]
Subject: RE: bluestore prefer wal sizeHi Mark,
Quoted 25 lines
-----Original Message-----
From: Mark Nelson [mailto:[email protected]]
Sent: 02 February 2017 20:17
To: [email protected]; 'Sage Weil' <[email protected]>
Cc: [email protected]
Subject: Re: bluestore prefer wal sizeHi Nick,
Quoted 4 lines · Nick Fisk
Further update
If I do random writes instead of sequential, I see the "defering small write
via wal" action. But from the
do_alloc_writefunction not small write.Quoted 2 lines
Ie. log entry is:
_do_alloc_writedefering small0x1000write via walI just ran some tests using the branch with 4k random and sequential writes against a single OSD. I see deferring small write via wal from
do_alloc_writeboth for both sequential and random whenbluestore_prefer_wal_sizeis set to be larger than the IO size. Otherwise, I don't see the messages. I am also preconditioning with 4MB writes.Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
So far I've just been testing on NVMe, but I should be able to do
some mixed tests soon to see if there are any interesting performance implications.I've just looked at the RBD I ran those random tests on and I
realized that it was only about 90% pre-conditioned due to me leaving
thetime_basedfio option on. After filling completely with writes, now both random and sequential are doing_do_write_smallwrites and no deferring wal writes.
Quoted 11 lines
Quoted 11 lines
From looking through the code today, as far as I understand it
Write_small= write to existing object undermin_allow_sizeWrite_big= write to existing object overmin_allow_sizeAlloc_write= write to a new objectIs that correct?
If it is, I'm interested in why you are seeing
alloc_writes, as I
don't see them if the RBD is fully pre-conditioned? Unless there is something changing with themin_alloc_sizeas you are using nonrotational media, which is causing this change?
Quoted 6 lines
Quoted 3 lines
I'm adding a few extra dout's to the
write_smallfunction to try and see what's going on, hopefully I will know more tomorrow.Morning,
Quoted 7 lines
So, results are in. I added some debugging before the IF statement
(https://github.com/liewegas/ceph/blob/944b4d3a3869a472c1e66a4fa73c127
66c7801ac/src/os/bluestore/BlueStore.cc#L7885)So the following section now looks like below:
dout(20) << __func__ << " before IF 0x" << std::hex << b_off << "~" << b_len << " - " << b->get_blob().get_ondisk_length() << " -" << b->get_blob().is_unused(b_off,
b_len) << " - " << b->get_blob().is_allocated(b_off,b_len) << " - " << dendl;Quoted 10 lines
if ((b_off % chunk_size == 0 && b_len % chunk_size == 0) && b->get_blob().get_ondisk_length() >= b_off + b_len && b->get_blob().is_unused(b_off, b_len) && b->get_blob().is_allocated(b_off, b_len)) {And the output was
_do_write_smallbefore IF 0xf000~1000 - 10000 - 0 - 1 -So the " b->get_blob().is_unused(b_off,
b_len)" call is returning false, which stops it going into the IF block and doing the prefer walwrite. Is that expected?
Quoted 329 lines
Nick
Quoted 325 lines
Nick
Quoted 323 lines
Mark
Quoted 17 lines
And that’s for a 4kb random write on an RBD that has been fully conditioned via fio 4MB writes
So it's something in the sequential nature of the test which trips it up as I don't see any sign of deferred writes
From looking at the code in the small write function, I can only see two possibilities that would stop if from reaching the prefer wal IF statement
while (ep != o->extent_map.extent_map.end()) { if (ep->blob_start() >= end) { break;and
Quoted 7 lines
if ((
b_off%chunk_size== 0 &&b_len%chunk_size== 0) &&b->get_blob().get_ondisk_length() >= b_off + b_len && b->get_blob().is_unused(b_off, b_len) && b->get_blob().is_allocated(b_off, b_len)) {Unfortunately, that’s about as far as I have got, before my knowledge of
Bluestore becomes a limitation.
Quoted 15 lines
Don't know if that triggers any thoughts?
Quoted 12 lines
2017-02-02 10:39:31.988782 7ff7282ff700 10 bluestore(/var/lib/ceph/osd/ceph-4) queue_transactions existing 0x56102a5a4900 osr(9.73 0x56102a5db1a0) 2017-02-02 10:39:31.988786 7ff7282ff700 20 bluestore(/var/lib/ceph/osd/ceph-4) _txc_create osr 0x56102a5a4900 = 0x56102ab4be40 seq 260 2017-02-02 10:39:31.988797 7ff7282ff700 15bluestore(/var/lib/ceph/osd/ceph-4)
_setattrs9.73_head #9:cff290b9:::rbd_data.36646a74b0dc51.0000000000000001:head# 2 keys
Quoted 3 lines
Quoted 3 lines
2017-02-02 10:39:31.988802 7ff7282ff700 10bluestore(/var/lib/ceph/osd/ceph-4)
_setattrs9.73_head #9:cff290b9:::rbd_data.36646a74b0dc51.0000000000000001:head# 2 keys
Quoted 4 lines
Quoted 4 lines
= 0
2017-02-02 10:39:31.988806 7ff7282ff700 15bluestore(/var/lib/ceph/osd/ceph-4)
_write9.73_head #9:cff290b9:::rbd_data.36646a74b0dc51.0000000000000001:head#0xfb000~
Quoted 14 lines
Quoted 14 lines
1000
2017-02-02 10:39:31.988809 7ff7282ff700 20 bluestore(/var/lib/ceph/osd/ceph-4) _do_write #9:cff290b9:::rbd_data.36646a74b0dc51.0000000000000001:head# 0xfb000~1000 - have 0x400000 (4194304) bytes fadvise_flags 0x0 2017-02-02 10:39:31.988812 7ff7282ff700 20 bluestore(/var/lib/ceph/osd/ceph-4) _do_write prefer csum_order 12 target_blob_size 0x80000 2017-02-02 10:39:31.988814 7ff7282ff700 10 bluestore(/var/lib/ceph/osd/ceph-4) _do_write_small 0xfb000~1000 2017-02-02 10:39:31.988816 7ff7282ff700 20bluestore(/var/lib/ceph/osd/ceph-4)
_do_write_smallconsidering Blob(0x56102aac05a0 blob([0x256480000~80000] mutable+csumQuoted 8 lines
Quoted 8 lines
crc32c/0x1000)
ref_map(0x0~80000=1)SharedBlob(0x56102aa76260)) bstart0x800002017-02-02 10:39:31.988821 7ff7282ff700 20 bluestore.BufferSpace(0x56102aa762b8 in 0x56102a1337a0) _discard 0x7b000~1000 2017-02-02 10:39:31.988827 7ff7282ff700 20bluestore(/var/lib/ceph/osd/ceph-4)
_do_write_smallwal write 0x7b000~1000 of mutable Blob(0x56102aac05a0blob([0x256480000~80000]
Quoted 15 lines
Quoted 15 lines
mutable+csum crc32c/0x1000)
ref_map(0x0~80000=1)
SharedBlob(0x56102aa76260)) at [0x2564fb000~1000]2017-02-02 10:39:31.988832 7ff7282ff700 20bluestore(/var/lib/ceph/osd/ceph-4)
_do_write_smalllex 0xfb000~1000: 0x7b000~1000
Blob(0x56102aac05a0blob([0x256480000~80000] mutable+csum crc32c/0x1000)ref_map(0x0~7b000=1,0x7b000~1000=2,0x7c000~4000=1)SharedBlob(0x56102aa76260))2017-02-02 10:39:31.988836 7ff7282ff700 20 bluestore(/var/lib/ceph/osd/ceph-4) _do_alloc_write txc 0x56102ab4be40 0 blobs 2017-02-02 10:39:31.988837 7ff7282ff700 10 bitmapalloc:reserve instance 94627427524464 num_used 345738 total 7627973 2017-02-02 10:39:31.988840 7ff7282ff700 20Quoted 8 lines
Quoted 8 lines
bluestore(/var/lib/ceph/osd/ceph-4)
_wctx_finishlex_old0xfb000~1000: 0x7b000~1000
Blob(0x56102aac05a0blob([0x256480000~80000] mutable+csum crc32c/0x1000)ref_map(0x0~7b000=1,0x7b000~1000=2,0x7c000~4000=1)SharedBlob(0x56102aa76260))2017-02-02 10:39:31.988844 7ff7282ff700 20
bluestore.extentmap(0x56102a8ee3f0)compress_extent_map0xfb000~1000
Quoted 9 lines
Quoted 9 lines
next shard
0x100000merging 0x80000~7b000: 0x0~7b000 Blob(0x56102aac05a0blob([0x256480000~80000] mutable+csum crc32c/0x1000)ref_map(0x0~80000=1)SharedBlob(0x56102aa76260)) and 0xfb000~1000:
0x7b000~1000 Blob(0x56102aac05a0blob([0x256480000~80000] mutable+csum crc32c/0x1000)ref_map(0x0~80000=1)SharedBlob(0x56102aa76260))2017-02-02 10:39:31.988850 7ff7282ff700 20
bluestore.extentmap(0x56102a8ee3f0)compress_extent_map0xfb000~1000
Quoted 19 lines
Quoted 19 lines
next shard
0x100000merging 0x80000~7c000: 0x0~7c000 Blob(0x56102aac05a0blob([0x256480000~80000] mutable+csum crc32c/0x1000)ref_map(0x0~80000=1)SharedBlob(0x56102aa76260)) and 0xfc000~4000:
0x7c000~4000 Blob(0x56102aac05a0blob([0x256480000~80000] mutable+csum crc32c/0x1000)ref_map(0x0~80000=1)SharedBlob(0x56102aa76260))2017-02-02 10:39:31.988868 7ff7282ff700 20 bluestore.extentmap(0x56102a8ee3f0) dirty_range mark shard 0x80000 dirty 2017-02-02 10:39:31.988870 7ff7282ff700 10 bluestore(/var/lib/ceph/osd/ceph-4) _write 9.73_head #9:cff290b9:::rbd_data.36646a74b0dc51.0000000000000001:head# 0xfb000~1000 = 0 2017-02-02 10:39:31.988875 7ff7282ff700 15 bluestore(/var/lib/ceph/osd/ceph-4) _omap_setkeys 9.73_head #9:ce000000::::head# 2017-02-02 10:39:31.988882 7ff7282ff700 10bluestore(/var/lib/ceph/osd/ceph-4)
_omap_setkeys9.73_headQuoted 8 lines
Quoted 8 lines
#9:ce000000::::head# = 0
2017-02-02 10:39:31.988885 7ff7282ff700 20 bluestore(/var/lib/ceph/osd/ceph-4) _txc_write_nodes txc 0x56102ab4be40 onodes 0x56102a8ee300 shared_blobs 2017-02-02 10:39:31.988894 7ff7282ff700 20
bluestore.extentmap(0x56102a8ee3f0)update shard0x80000is 531 bytes(was 531) from 1 extents
Quoted 1 line
Quoted 1 line
2017-02-02 10:39:31.988902 7ff7282ff700 20bluestore(/var/lib/ceph/osd/ceph-4) onode
Quoted 85 lines
Quoted 85 lines
#9:cff290b9:::rbd_data.36646a74b0dc51.0000000000000001:head# is 424
(422 bytes onode + 2 bytes spanning blobs + 0 bytes inline extents)2017-02-02 10:39:31.988914 7ff7282ff700 10 bluestore(/var/lib/ceph/osd/ceph-4) _txc_state_proc txc 0x56102ab4be40 prepare 2017-02-02 10:39:31.988916 7ff7282ff700 20 bluestore(/var/lib/ceph/osd/ceph-4) _txc_finish_io 0x56102ab4be40 2017-02-02 10:39:31.988917 7ff7282ff700 10 bluestore(/var/lib/ceph/osd/ceph-4) _txc_state_proc txc 0x56102ab4be40 io_done 2017-02-02 10:39:31.988918 7ff7282ff700 20
bluestore.BufferSpace(0x56102aa762b8 in 0x56102a1337a0)finish_write
buffer(0x56102adb1830 space0x56102aa762b80x7b000~1000 writing nocache)2017-02-02 10:39:31.988939 7ff72e30b700 20 bluestore(/var/lib/ceph/osd/ceph-4) _kv_sync_thread wake 2017-02-02 10:39:31.988941 7ff72e30b700 20 bluestore(/var/lib/ceph/osd/ceph-4) _kv_sync_thread committing 1 submitting 1 cleaning 0 2017-02-02 10:39:31.988952 7ff72e30b700 20 bluestore(/var/lib/ceph/osd/ceph-4) _txc_finalize_kv txc 0x56102ab4be40 allocated 0x[] released 0x[] 2017-02-02 10:39:31.988999 7ff72e30b700 10bluestore(/var/lib/ceph/osd/ceph-4)
_balance_bluefs_freespacebluefs
9535 M free
(0.999896) bluestore 222 G free (0.954675),bluefs_ratio0.04021432017-02-02 10:39:31.989400 7ff72e30b700 20 bluestore(/var/lib/ceph/osd/ceph-4) _kv_sync_thread committed 1 cleaned 0 in 0.000456 2017-02-02 10:39:31.989405 7ff72e30b700 10 bluestore(/var/lib/ceph/osd/ceph-4) _txc_state_proc txc 0x56102ab4be40 kv_submitted 2017-02-02 10:39:31.989407 7ff72e30b700 20 bluestore(/var/lib/ceph/osd/ceph-4) _txc_finish_kv txc 0x56102ab4be40 2017-02-02 10:39:31.989413 7ff72e30b700 20 bluestore(/var/lib/ceph/osd/ceph-4) _wal_apply txc 0x56102ab4be40 seq 255 2017-02-02 10:39:31.989414 7ff72e30b700 20bluestore(/var/lib/ceph/osd/ceph-4)
_do_wal_opwrite [0x2564fb000~1000]Quoted 37 lines
sage
Quoted 34 lines
sage
Quoted 31 lines
Quoted 31 lines
sage
Quoted 7 lines
Nick
-----Original Message-----
From: Nick Fisk [mailto:[email protected]]
Sent: 01 February 2017 19:03
To: 'Sage Weil' <[email protected]>; 'Mark Nelson'Quoted 7 lines
Cc: [email protected]
Subject: RE: bluestore prefer wal sizeHi Sage,
First results not looking good. It looks like write IO to the SSD's (sdd and sdi)
is now massively amplified, by somewhere in the region of
about 10x. But I'm still only getting around 100 4kb's seq
write iops from the fio client. This is in comparison to 2500-3000 iops on the SSD's and ~200 iops per spinning disk (sdc,sde,sdg,sdh).Quoted 7 lines
rbd engine: RBD version: 0.1.11
Jobs: 1 (f=1): [W(1)] [100.0% done] [0KB/476KB/0KB /s] [0/119/0 iops] [eta 00m:00s]rbd_iodepth32: (groupid=0, jobs=1): err= 0: pid=31171: Wed Feb
118:56:51 2017
Quoted 12 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
write: io=27836KB, bw=475020B/s, iops=115, runt= 60006msec
slat (usec): min=6, max=142, avg=10.98, stdev= 8.38 clat (msec): min=1, max=271, avg= 8.61, stdev= 3.63 lat (msec): min=1, max=271, avg= 8.62, stdev= 3.63Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
clat percentiles (msec): | 1.00th=[ 8], 5.00th=[ 9], 10.00th=[ 9], 20.00th=[ 9], | 30.00th=[ 9], 40.00th=[ 9], 50.00th=[ 9], 60.00th=[ 9], | 70.00th=[ 9], 80.00th=[ 9], 90.00th=[ 9], 95.00th=[ 9], | 99.00th=[ 17], 99.50th=[ 25], 99.90th=[ 33], 99.95th=[ 36], | 99.99th=[ 273] bw (KB /s): min= 191, max= 480, per=100.00%,avg=464.18,
stdev=34.60
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
lat (msec) : 2=0.01%, 4=0.04%, 10=97.69%, 20=1.55%, 50=0.69% lat (msec) : 500=0.01%cpu : usr=0.13%, sys=0.12%, ctx=7224, majf=0, minf=5
IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%,32=0.0%,
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
=64=0.0%
submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%,64=0.0%,
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 4 lines
=64=0.0%
complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, =64=0.0% issued : total=r=0/w=6959/d=0, short=r=0/w=0/d=0,drop=r=0/w=0/d=0
Quoted 4 lines
latency : target=0, window=0, percentile=100.00%, depth=1I've checked via the admin socket and the prefer wal option is set to
8192.
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Random capture of iostat
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz
avgqu-sz
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
await
r_awaitw_awaitsvctm %utilQuoted 1 line
sda 0.00 77.00 0.00 5.50 0.00 338.00 122.91 0.05
11.64
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
0.00 11.64 8.73 4.80
Quoted 1 line
sdb 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
0.00 0.00 0.00 0.00
Quoted 1 line
sdc 0.00 0.00 0.00 151.50 0.00 302.00 3.99 0.54
3.59
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
0.00 3.59 3.58 54.20
Quoted 1 line
sdd 0.00 0.00 0.00 1474.00 0.00 4008.00 5.44 0.09
0.06
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
0.00 0.06 0.06 9.20
Quoted 1 line
sde 0.00 0.00 0.00 217.00 0.00 434.00 4.00 0.91
4.20
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
0.00 4.20 4.20 91.20
Quoted 1 line
sdf 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
0.00 0.00 0.00 0.00
Quoted 1 line
sdg 0.00 0.00 0.00 66.50 0.00 134.00 4.03 0.18
2.68
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
0.00 2.68 2.68 17.80
Quoted 1 line
sdh 0.00 0.00 0.00 217.00 0.00 434.00 4.00 0.80
3.71
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
0.00 3.71 3.71 80.40
Quoted 1 line
sdi 0.00 0.00 0.00 1134.00 0.00 3082.00 5.44 0.09
0.08
Quoted 35 lines
Quoted 34 lines
Quoted 34 lines
Quoted 34 lines
Quoted 18 lines
Quoted 18 lines
0.00 0.08 0.07 8.40
Quoted 17 lines
-----Original Message-----
From: Sage Weil [mailto:[email protected]]
Sent: 01 February 2017 15:34
To: [email protected]
Cc: [email protected]
Subject: bluestore prefer wal sizeHey Nick,
I've updated/improved the prefer wal size PR (that sends small writes through the wal). See
https://github.com/ceph/ceph/pull/13217if you want to try it out.
Quoted 10 lines
Quoted 7 lines
Quoted 7 lines
Thanks!
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 40 lines · Sage Weil
Quoted 22 lines · Nick Fisk
Hi Mark,
Quoted 12 lines
-----Original Message-----
From: Mark Nelson [mailto:[email protected]]
Sent: 03 February 2017 15:20
To: [email protected]; 'Sage Weil' <[email protected]>
Cc: [email protected]
Subject: Re: bluestore prefer wal sizeHi Nick,
So I'm still catching up to your testing, but last night I ran through a number of tests with a single OSD, a single client, and iodepth=1 fio rbd tests:
Quoted 7 lines
https://drive.google.com/uc?export=download&id=0B2gTBZrkrnpZWE85OFI3Q2xQZ00
I tested HDD, HDD+NVMe, and NVMe configurations looking at filestore, bluestore with 1k and 16k prefer wal sizes. I believe I'm seeing similar results to what you saw. On NVMe we are pretty similar likely due to the raw backend throughput the NVMe drives can maintain but on HDD, bluestore is doing quite a bit worse than filestore for this specific use case. During the bluestore HDD tests, I watched disk access and it appears we are saturating the disk with small writes despite the low client performance. I'll be digging into this more today but I wanted to send out an update to let you know I believe I've reproduced your results and am looking into it.
Quoted 3 lines
Glad to hear that you can reproduce. After debugging that IF statement, I think I'm at the point where I am out of my depth. But if there is anything I can do, let me know.
I finally got my dev box HDD sorted out and retested this. The IOPS were being halved because bluestore was triggering a rocksdb commit (and the associated latency) just to retire the WAL record. I rebased and fixed it so that the WAL entries are deleted lazily (in the next commit round) and it's 2x faster than before. I'm getting ~110 IOPS with rados bench 4k writes with queue depth 1 (6TB 7200rpm WD black). That's in the neighborhood of what I'd expect from a spinner... it's basically seeking back and forth between two write positions (the rocksdb log and the new object data where the allocator position is). We could probably bring this up a bit by making the WAL work be batched on HDD (build up several IOs worth and dispatch it all at once to reduce seeks). That'll take a bit more work, though.
Quoted 3 lines
With WAL on an NVMe, I get about ~450 IOPS.
Want to give it a try?
What's the branch?
Quoted 420 lines
sage
Quoted 417 lines
Quoted 415 lines
Thanks!
MarkQuoted 36 lines · Nick Fisk
Quoted 36 lines
-----Original Message-----
From: Nick Fisk [mailto:[email protected]]
Sent: 02 February 2017 21:15
To: 'Mark Nelson' <[email protected]>; 'Sage Weil' <[email protected]>
Cc: [email protected]
Subject: RE: bluestore prefer wal sizeHi Mark,
Quoted 25 lines
-----Original Message-----
From: Mark Nelson [mailto:[email protected]]
Sent: 02 February 2017 20:17
To: [email protected]; 'Sage Weil' <[email protected]>
Cc: [email protected]
Subject: Re: bluestore prefer wal sizeHi Nick,
Quoted 4 lines · Nick Fisk
Further update
If I do random writes instead of sequential, I see the "defering small write
via wal" action. But from the
do_alloc_writefunction not small write.Quoted 2 lines
Ie. log entry is:
_do_alloc_writedefering small0x1000write via walI just ran some tests using the branch with 4k random and sequential writes against a single OSD. I see deferring small write via wal from
do_alloc_writeboth for both sequential and random whenbluestore_prefer_wal_sizeis set to be larger than the IO size. Otherwise, I don't see the messages. I am also preconditioning with 4MB writes.Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
So far I've just been testing on NVMe, but I should be able to do
some mixed tests soon to see if there are any interesting performance implications.I've just looked at the RBD I ran those random tests on and I
realized that it was only about 90% pre-conditioned due to me leaving
thetime_basedfio option on. After filling completely with writes, now both random and sequential are doing_do_write_smallwrites and no deferring wal writes.
Quoted 11 lines
Quoted 11 lines
From looking through the code today, as far as I understand it
Write_small= write to existing object undermin_allow_sizeWrite_big= write to existing object overmin_allow_sizeAlloc_write= write to a new objectIs that correct?
If it is, I'm interested in why you are seeing
alloc_writes, as I
don't see them if the RBD is fully pre-conditioned? Unless there is something changing with themin_alloc_sizeas you are using nonrotational media, which is causing this change?
Quoted 6 lines
Quoted 3 lines
I'm adding a few extra dout's to the
write_smallfunction to try and see what's going on, hopefully I will know more tomorrow.Morning,
Quoted 7 lines
So, results are in. I added some debugging before the IF statement
(https://github.com/liewegas/ceph/blob/944b4d3a3869a472c1e66a4fa73c127
66c7801ac/src/os/bluestore/BlueStore.cc#L7885)So the following section now looks like below:
dout(20) << __func__ << " before IF 0x" << std::hex << b_off << "~" << b_len << " - " << b->get_blob().get_ondisk_length() << " -" << b->get_blob().is_unused(b_off,
b_len) << " - " << b->get_blob().is_allocated(b_off,b_len) << " - " << dendl;Quoted 10 lines
if ((b_off % chunk_size == 0 && b_len % chunk_size == 0) && b->get_blob().get_ondisk_length() >= b_off + b_len && b->get_blob().is_unused(b_off, b_len) && b->get_blob().is_allocated(b_off, b_len)) {And the output was
_do_write_smallbefore IF 0xf000~1000 - 10000 - 0 - 1 -So the " b->get_blob().is_unused(b_off,
b_len)" call is returning false, which stops it going into the IF block and doing the prefer walwrite. Is that expected?
Quoted 329 lines
Nick
Quoted 325 lines
Nick
Quoted 323 lines
Mark
Quoted 17 lines
And that’s for a 4kb random write on an RBD that has been fully conditioned via fio 4MB writes
So it's something in the sequential nature of the test which trips it up as I don't see any sign of deferred writes
From looking at the code in the small write function, I can only see two possibilities that would stop if from reaching the prefer wal IF statement
while (ep != o->extent_map.extent_map.end()) { if (ep->blob_start() >= end) { break;and
Quoted 7 lines
if ((
b_off%chunk_size== 0 &&b_len%chunk_size== 0) &&b->get_blob().get_ondisk_length() >= b_off + b_len && b->get_blob().is_unused(b_off, b_len) && b->get_blob().is_allocated(b_off, b_len)) {Unfortunately, that’s about as far as I have got, before my knowledge of
Bluestore becomes a limitation.
Quoted 15 lines
Don't know if that triggers any thoughts?
Quoted 12 lines
2017-02-02 10:39:31.988782 7ff7282ff700 10 bluestore(/var/lib/ceph/osd/ceph-4) queue_transactions existing 0x56102a5a4900 osr(9.73 0x56102a5db1a0) 2017-02-02 10:39:31.988786 7ff7282ff700 20 bluestore(/var/lib/ceph/osd/ceph-4) _txc_create osr 0x56102a5a4900 = 0x56102ab4be40 seq 260 2017-02-02 10:39:31.988797 7ff7282ff700 15bluestore(/var/lib/ceph/osd/ceph-4)
_setattrs9.73_head #9:cff290b9:::rbd_data.36646a74b0dc51.0000000000000001:head# 2 keys
Quoted 3 lines
Quoted 3 lines
2017-02-02 10:39:31.988802 7ff7282ff700 10bluestore(/var/lib/ceph/osd/ceph-4)
_setattrs9.73_head #9:cff290b9:::rbd_data.36646a74b0dc51.0000000000000001:head# 2 keys
Quoted 4 lines
Quoted 4 lines
= 0
2017-02-02 10:39:31.988806 7ff7282ff700 15bluestore(/var/lib/ceph/osd/ceph-4)
_write9.73_head #9:cff290b9:::rbd_data.36646a74b0dc51.0000000000000001:head#0xfb000~
Quoted 14 lines
Quoted 14 lines
1000
2017-02-02 10:39:31.988809 7ff7282ff700 20 bluestore(/var/lib/ceph/osd/ceph-4) _do_write #9:cff290b9:::rbd_data.36646a74b0dc51.0000000000000001:head# 0xfb000~1000 - have 0x400000 (4194304) bytes fadvise_flags 0x0 2017-02-02 10:39:31.988812 7ff7282ff700 20 bluestore(/var/lib/ceph/osd/ceph-4) _do_write prefer csum_order 12 target_blob_size 0x80000 2017-02-02 10:39:31.988814 7ff7282ff700 10 bluestore(/var/lib/ceph/osd/ceph-4) _do_write_small 0xfb000~1000 2017-02-02 10:39:31.988816 7ff7282ff700 20bluestore(/var/lib/ceph/osd/ceph-4)
_do_write_smallconsidering Blob(0x56102aac05a0 blob([0x256480000~80000] mutable+csumQuoted 8 lines
Quoted 8 lines
crc32c/0x1000)
ref_map(0x0~80000=1)SharedBlob(0x56102aa76260)) bstart0x800002017-02-02 10:39:31.988821 7ff7282ff700 20 bluestore.BufferSpace(0x56102aa762b8 in 0x56102a1337a0) _discard 0x7b000~1000 2017-02-02 10:39:31.988827 7ff7282ff700 20bluestore(/var/lib/ceph/osd/ceph-4)
_do_write_smallwal write 0x7b000~1000 of mutable Blob(0x56102aac05a0blob([0x256480000~80000]
Quoted 15 lines
Quoted 15 lines
mutable+csum crc32c/0x1000)
ref_map(0x0~80000=1)
SharedBlob(0x56102aa76260)) at [0x2564fb000~1000]2017-02-02 10:39:31.988832 7ff7282ff700 20bluestore(/var/lib/ceph/osd/ceph-4)
_do_write_smalllex 0xfb000~1000: 0x7b000~1000
Blob(0x56102aac05a0blob([0x256480000~80000] mutable+csum crc32c/0x1000)ref_map(0x0~7b000=1,0x7b000~1000=2,0x7c000~4000=1)SharedBlob(0x56102aa76260))2017-02-02 10:39:31.988836 7ff7282ff700 20 bluestore(/var/lib/ceph/osd/ceph-4) _do_alloc_write txc 0x56102ab4be40 0 blobs 2017-02-02 10:39:31.988837 7ff7282ff700 10 bitmapalloc:reserve instance 94627427524464 num_used 345738 total 7627973 2017-02-02 10:39:31.988840 7ff7282ff700 20Quoted 8 lines
Quoted 8 lines
bluestore(/var/lib/ceph/osd/ceph-4)
_wctx_finishlex_old0xfb000~1000: 0x7b000~1000
Blob(0x56102aac05a0blob([0x256480000~80000] mutable+csum crc32c/0x1000)ref_map(0x0~7b000=1,0x7b000~1000=2,0x7c000~4000=1)SharedBlob(0x56102aa76260))2017-02-02 10:39:31.988844 7ff7282ff700 20
bluestore.extentmap(0x56102a8ee3f0)compress_extent_map0xfb000~1000
Quoted 9 lines
Quoted 9 lines
next shard
0x100000merging 0x80000~7b000: 0x0~7b000 Blob(0x56102aac05a0blob([0x256480000~80000] mutable+csum crc32c/0x1000)ref_map(0x0~80000=1)SharedBlob(0x56102aa76260)) and 0xfb000~1000:
0x7b000~1000 Blob(0x56102aac05a0blob([0x256480000~80000] mutable+csum crc32c/0x1000)ref_map(0x0~80000=1)SharedBlob(0x56102aa76260))2017-02-02 10:39:31.988850 7ff7282ff700 20
bluestore.extentmap(0x56102a8ee3f0)compress_extent_map0xfb000~1000
Quoted 19 lines
Quoted 19 lines
next shard
0x100000merging 0x80000~7c000: 0x0~7c000 Blob(0x56102aac05a0blob([0x256480000~80000] mutable+csum crc32c/0x1000)ref_map(0x0~80000=1)SharedBlob(0x56102aa76260)) and 0xfc000~4000:
0x7c000~4000 Blob(0x56102aac05a0blob([0x256480000~80000] mutable+csum crc32c/0x1000)ref_map(0x0~80000=1)SharedBlob(0x56102aa76260))2017-02-02 10:39:31.988868 7ff7282ff700 20 bluestore.extentmap(0x56102a8ee3f0) dirty_range mark shard 0x80000 dirty 2017-02-02 10:39:31.988870 7ff7282ff700 10 bluestore(/var/lib/ceph/osd/ceph-4) _write 9.73_head #9:cff290b9:::rbd_data.36646a74b0dc51.0000000000000001:head# 0xfb000~1000 = 0 2017-02-02 10:39:31.988875 7ff7282ff700 15 bluestore(/var/lib/ceph/osd/ceph-4) _omap_setkeys 9.73_head #9:ce000000::::head# 2017-02-02 10:39:31.988882 7ff7282ff700 10bluestore(/var/lib/ceph/osd/ceph-4)
_omap_setkeys9.73_headQuoted 8 lines
Quoted 8 lines
#9:ce000000::::head# = 0
2017-02-02 10:39:31.988885 7ff7282ff700 20 bluestore(/var/lib/ceph/osd/ceph-4) _txc_write_nodes txc 0x56102ab4be40 onodes 0x56102a8ee300 shared_blobs 2017-02-02 10:39:31.988894 7ff7282ff700 20
bluestore.extentmap(0x56102a8ee3f0)update shard0x80000is 531 bytes(was 531) from 1 extents
Quoted 1 line
Quoted 1 line
2017-02-02 10:39:31.988902 7ff7282ff700 20bluestore(/var/lib/ceph/osd/ceph-4) onode
Quoted 85 lines
Quoted 85 lines
#9:cff290b9:::rbd_data.36646a74b0dc51.0000000000000001:head# is 424
(422 bytes onode + 2 bytes spanning blobs + 0 bytes inline extents)2017-02-02 10:39:31.988914 7ff7282ff700 10 bluestore(/var/lib/ceph/osd/ceph-4) _txc_state_proc txc 0x56102ab4be40 prepare 2017-02-02 10:39:31.988916 7ff7282ff700 20 bluestore(/var/lib/ceph/osd/ceph-4) _txc_finish_io 0x56102ab4be40 2017-02-02 10:39:31.988917 7ff7282ff700 10 bluestore(/var/lib/ceph/osd/ceph-4) _txc_state_proc txc 0x56102ab4be40 io_done 2017-02-02 10:39:31.988918 7ff7282ff700 20
bluestore.BufferSpace(0x56102aa762b8 in 0x56102a1337a0)finish_write
buffer(0x56102adb1830 space0x56102aa762b80x7b000~1000 writing nocache)2017-02-02 10:39:31.988939 7ff72e30b700 20 bluestore(/var/lib/ceph/osd/ceph-4) _kv_sync_thread wake 2017-02-02 10:39:31.988941 7ff72e30b700 20 bluestore(/var/lib/ceph/osd/ceph-4) _kv_sync_thread committing 1 submitting 1 cleaning 0 2017-02-02 10:39:31.988952 7ff72e30b700 20 bluestore(/var/lib/ceph/osd/ceph-4) _txc_finalize_kv txc 0x56102ab4be40 allocated 0x[] released 0x[] 2017-02-02 10:39:31.988999 7ff72e30b700 10bluestore(/var/lib/ceph/osd/ceph-4)
_balance_bluefs_freespacebluefs
9535 M free
(0.999896) bluestore 222 G free (0.954675),bluefs_ratio0.04021432017-02-02 10:39:31.989400 7ff72e30b700 20 bluestore(/var/lib/ceph/osd/ceph-4) _kv_sync_thread committed 1 cleaned 0 in 0.000456 2017-02-02 10:39:31.989405 7ff72e30b700 10 bluestore(/var/lib/ceph/osd/ceph-4) _txc_state_proc txc 0x56102ab4be40 kv_submitted 2017-02-02 10:39:31.989407 7ff72e30b700 20 bluestore(/var/lib/ceph/osd/ceph-4) _txc_finish_kv txc 0x56102ab4be40 2017-02-02 10:39:31.989413 7ff72e30b700 20 bluestore(/var/lib/ceph/osd/ceph-4) _wal_apply txc 0x56102ab4be40 seq 255 2017-02-02 10:39:31.989414 7ff72e30b700 20bluestore(/var/lib/ceph/osd/ceph-4)
_do_wal_opwrite [0x2564fb000~1000]Quoted 37 lines
sage
Quoted 34 lines
sage
Quoted 31 lines
Quoted 31 lines
sage
Quoted 7 lines
Nick
-----Original Message-----
From: Nick Fisk [mailto:[email protected]]
Sent: 01 February 2017 19:03
To: 'Sage Weil' <[email protected]>; 'Mark Nelson'Quoted 7 lines
Cc: [email protected]
Subject: RE: bluestore prefer wal sizeHi Sage,
First results not looking good. It looks like write IO to the
SSD's (sdd and sdi)is now massively amplified, by somewhere in the region of
about 10x. But I'm still only getting around 100 4kb's seq
write iops from the fio client. This is in comparison to 2500-3000 iops on the SSD's and ~200 iops per spinning disk (sdc,sde,sdg,sdh).Quoted 7 lines
rbd engine: RBD version: 0.1.11
Jobs: 1 (f=1): [W(1)] [100.0% done] [0KB/476KB/0KB /s]
[0/119/0 iops] [eta 00m:00s]
rbd_iodepth32: (groupid=0, jobs=1): err= 0: pid=31171: Wed
Feb
118:56:51 2017
Quoted 12 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
write: io=27836KB, bw=475020B/s, iops=115, runt= 60006msec
slat (usec): min=6, max=142, avg=10.98, stdev= 8.38
clat (msec): min=1, max=271, avg= 8.61, stdev= 3.63
lat (msec): min=1, max=271, avg= 8.62, stdev= 3.63Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
clat percentiles (msec):
| 1.00th=[ 8], 5.00th=[ 9], 10.00th=[ 9], 20.00th=[ 9],
| 30.00th=[ 9], 40.00th=[ 9], 50.00th=[ 9], 60.00th=[ 9],
| 70.00th=[ 9], 80.00th=[ 9], 90.00th=[ 9], 95.00th=[ 9],
| 99.00th=[ 17], 99.50th=[ 25], 99.90th=[ 33], 99.95th=[ 36],
| 99.99th=[ 273]
bw (KB /s): min= 191, max= 480, per=100.00%,
avg=464.18,stdev=34.60
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
lat (msec) : 2=0.01%, 4=0.04%, 10=97.69%, 20=1.55%, 50=0.69%
lat (msec) : 500=0.01%
cpu : usr=0.13%, sys=0.12%, ctx=7224, majf=0, minf=5
IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%,32=0.0%,
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
=64=0.0%
submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%,64=0.0%,
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 4 lines
=64=0.0%
complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%,
64=0.0%, =64=0.0%
issued : total=r=0/w=6959/d=0, short=r=0/w=0/d=0,drop=r=0/w=0/d=0
Quoted 4 lines
latency : target=0, window=0, percentile=100.00%, depth=1
I've checked via the admin socket and the prefer wal option
is set to8192.
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Random capture of iostat
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz
avgqu-sz
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
await
r_awaitw_awaitsvctm %utilQuoted 1 line
sda 0.00 77.00 0.00 5.50 0.00 338.00 122.91 0.05
11.64
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
0.00 11.64 8.73 4.80
Quoted 1 line
sdb 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
0.00 0.00 0.00 0.00
Quoted 1 line
sdc 0.00 0.00 0.00 151.50 0.00 302.00 3.99 0.54
3.59
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
0.00 3.59 3.58 54.20
Quoted 1 line
sdd 0.00 0.00 0.00 1474.00 0.00 4008.00 5.44 0.09
0.06
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
0.00 0.06 0.06 9.20
Quoted 1 line
sde 0.00 0.00 0.00 217.00 0.00 434.00 4.00 0.91
4.20
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
0.00 4.20 4.20 91.20
Quoted 1 line
sdf 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
0.00 0.00 0.00 0.00
Quoted 1 line
sdg 0.00 0.00 0.00 66.50 0.00 134.00 4.03 0.18
2.68
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
0.00 2.68 2.68 17.80
Quoted 1 line
sdh 0.00 0.00 0.00 217.00 0.00 434.00 4.00 0.80
3.71
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
0.00 3.71 3.71 80.40
Quoted 1 line
sdi 0.00 0.00 0.00 1134.00 0.00 3082.00 5.44 0.09
0.08
Quoted 35 lines
Quoted 34 lines
Quoted 34 lines
Quoted 34 lines
Quoted 18 lines
Quoted 18 lines
0.00 0.08 0.07 8.40
Quoted 17 lines
-----Original Message-----
From: Sage Weil [mailto:[email protected]]
Sent: 01 February 2017 15:34
To: [email protected]
Cc: [email protected]
Subject: bluestore prefer wal sizeHey Nick,
I've updated/improved the prefer wal size PR (that sends
small writes through the wal). Seehttps://github.com/ceph/ceph/pull/13217
if you want to try it out.
Quoted 10 lines
Quoted 7 lines
Quoted 7 lines
Thanks!
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 34 lines · Mark Nelson
Quoted 33 lines · Sage Weil
Quoted 31 lines · Nick Fisk
Hi Mark,
Quoted 15 lines
-----Original Message-----
From: Mark Nelson [mailto:[email protected]]
Sent: 03 February 2017 15:20
To: [email protected]; 'Sage Weil' <[email protected]>
Cc: [email protected]
Subject: Re: bluestore prefer wal sizeHi Nick,
So I'm still catching up to your testing, but last night I ran through a number of tests with a single OSD, a single client, and iodepth=1 fio rbd tests:
https://drive.google.com/uc?export=download&id=0B2gTBZrkrnpZWE85OFI3Q2xQZ00
Quoted 10 lines
I tested HDD, HDD+NVMe, and NVMe configurations looking at filestore, bluestore with 1k and 16k prefer wal sizes. I believe I'm seeing similar results to what you saw. On NVMe we are pretty similar likely due to the raw backend throughput the NVMe drives can maintain but on HDD, bluestore is doing quite a bit worse than filestore for this specific use case. During the bluestore HDD tests, I watched disk access and it appears we are saturating the disk with small writes despite the low client performance. I'll be digging into this more today but I wanted to send out an update to let you know I believe I've reproduced your results and am looking into it.
Glad to hear that you can reproduce. After debugging that IF statement, I think I'm at the point where I am out of my depth. But if there is anything I can do, let me know.
Quoted 12 lines
Quoted 4 lines
I finally got my dev box HDD sorted out and retested this. The IOPS were being halved because bluestore was triggering a rocksdb commit (and the associated latency) just to retire the WAL record. I rebased and fixed it so that the WAL entries are deleted lazily (in the next commit round) and
Quoted 8 lines
it's 2x faster than before. I'm getting ~110 IOPS with rados bench 4k writes with queue depth 1 (6TB 7200rpm WD black). That's in the neighborhood of what I'd expect from a spinner... it's basically seeking back and forth between two write positions (the rocksdb log and the new object data where the allocator position is). We could probably bring this up a bit by making the WAL work be batched on HDD (build up several IOs worth and dispatch it all at once to reduce seeks). That'll take a bit more work, though.
I've made this change too, and now I get about 400 IOPS out of a straight HDD (no SSD). Much better! I set up the tunables so that it does the batching behavior only for HDD and not for SSD; we may want to revisit that decision later.
Quoted 5 lines
Quoted 3 lines
With WAL on an NVMe, I get about ~450 IOPS.
Want to give it a try?
What's the branch?
wip-bluestore-prefer-wal-size
sage
Quoted 499 lines
Quoted 493 lines
sage
Quoted 488 lines
Quoted 486 lines
Thanks!
MarkQuoted 43 lines · Nick Fisk
Quoted 43 lines
-----Original Message-----
From: Nick Fisk [mailto:[email protected]]
Sent: 02 February 2017 21:15
To: 'Mark Nelson' <[email protected]>; 'Sage Weil' <[email protected]>
Cc: [email protected]
Subject: RE: bluestore prefer wal sizeHi Mark,
Quoted 31 lines
-----Original Message-----
From: Mark Nelson [mailto:[email protected]]
Sent: 02 February 2017 20:17
To: [email protected]; 'Sage Weil' <[email protected]>
Cc: [email protected]
Subject: Re: bluestore prefer wal sizeHi Nick,
Quoted 4 lines · Nick Fisk
Further update
If I do random writes instead of sequential, I see the "defering small write
via wal" action. But from the
do_alloc_writefunction not small write.Quoted 2 lines
Ie. log entry is:
_do_alloc_writedefering small0x1000write via walI just ran some tests using the branch with 4k random and sequential
writes against a single OSD. I see deferring small write via wal fromdo_alloc_writeboth for both sequential and random whenbluestore_prefer_wal_sizeis set to be larger than the IO size. Otherwise, I don't see the messages. I am also preconditioning with
4MB writes.So far I've just been testing on NVMe, but I should be able to do some mixed tests soon to see if there are any interesting performance implications.
Quoted 5 lines
Quoted 5 lines
I've just looked at the RBD I ran those random tests on and I realized that it was only about 90% pre-conditioned due to me leaving
thetime_basedfio option on. After filling completely with writes, now both random and sequential are doing_do_write_smallwrites and no deferring wal writes.
Quoted 9 lines
Quoted 9 lines
From looking through the code today, as far as I understand it
Write_small= write to existing object undermin_allow_sizeWrite_big
= write to existing object overmin_allow_sizeAlloc_write= write to
a new objectQuoted 5 lines
Quoted 5 lines
Is that correct?
If it is, I'm interested in why you are seeing
alloc_writes, as I don't see them if the RBD is fully pre-conditioned? Unless there is something changing with themin_alloc_sizeas you are using nonrotational media, which is causing this change?
Quoted 7 lines
Quoted 4 lines
I'm adding a few extra dout's to the
write_smallfunction to try and see what's going on, hopefully I will know more tomorrow.Morning,
Quoted 8 lines
So, results are in. I added some debugging before the IF statement
(https://github.com/liewegas/ceph/blob/944b4d3a3869a472c1e66a4fa73c127
66c7801ac/src/os/bluestore/BlueStore.cc#L7885)So the following section now looks like below:
dout(20) << __func__ << " before IF 0x" << std::hex << b_off <<"~" <<
b_len<< " - " << b->get_blob().get_ondisk_length() << " -" << b->get_blob().is_unused(b_off,
b_len) << " - " << b->get_blob().is_allocated(b_off,b_len) << " - " << dendl;Quoted 11 lines
if ((b_off % chunk_size == 0 && b_len % chunk_size == 0) && b->get_blob().get_ondisk_length() >= b_off + b_len && b->get_blob().is_unused(b_off, b_len) && b->get_blob().is_allocated(b_off, b_len)) {And the output was
_do_write_smallbefore IF 0xf000~1000 - 10000 - 0 - 1 -So the " b->get_blob().is_unused(b_off,
b_len)" call is returning false, which stops it going into the IF block and doing the prefer walwrite. Is that expected?
Quoted 387 lines
Nick
Quoted 383 lines
Nick
Quoted 381 lines
Mark
Quoted 19 lines
And that’s for a 4kb random write on an RBD that has been fully conditioned via fio 4MB writes
So it's something in the sequential nature of the test which trips
it up as I don't see any sign of deferred writesFrom looking at the code in the small write function, I can only see two possibilities that would stop if from reaching the prefer
wal IF statementwhile (ep != o->extent_map.extent_map.end()) { if (ep->blob_start() >= end) { break;and
Quoted 7 lines
if ((
b_off%chunk_size== 0 &&b_len%chunk_size== 0) &&b->get_blob().get_ondisk_length() >= b_off + b_len && b->get_blob().is_unused(b_off, b_len) && b->get_blob().is_allocated(b_off, b_len)) {Unfortunately, that’s about as far as I have got, before my knowledge of
Bluestore becomes a limitation.
Quoted 18 lines
Don't know if that triggers any thoughts?
Quoted 15 lines
2017-02-02 10:39:31.988782 7ff7282ff700 10bluestore(/var/lib/ceph/osd/ceph-4)
queue_transactionsexisting0x56102a5a4900
osr(9.730x56102a5db1a0)2017-02-02 10:39:31.988786 7ff7282ff700 20bluestore(/var/lib/ceph/osd/ceph-4)
_txc_createosr0x56102a5a4900
=0x56102ab4be40seq 2602017-02-02 10:39:31.988797 7ff7282ff700 15bluestore(/var/lib/ceph/osd/ceph-4)
_setattrs9.73_head #9:cff290b9:::rbd_data.36646a74b0dc51.0000000000000001:head# 2 keys
Quoted 4 lines
Quoted 4 lines
2017-02-02 10:39:31.988802 7ff7282ff700 10bluestore(/var/lib/ceph/osd/ceph-4)
_setattrs9.73_head #9:cff290b9:::rbd_data.36646a74b0dc51.0000000000000001:head# 2 keys
Quoted 4 lines
Quoted 4 lines
= 0
2017-02-02 10:39:31.988806 7ff7282ff700 15bluestore(/var/lib/ceph/osd/ceph-4)
_write9.73_head #9:cff290b9:::rbd_data.36646a74b0dc51.0000000000000001:head#0xfb000~
Quoted 19 lines
Quoted 19 lines
1000
2017-02-02 10:39:31.988809 7ff7282ff700 20 bluestore(/var/lib/ceph/osd/ceph-4) _do_write #9:cff290b9:::rbd_data.36646a74b0dc51.0000000000000001:head# 0xfb000~1000 - have 0x400000 (4194304) bytes fadvise_flags 0x0 2017-02-02 10:39:31.988812 7ff7282ff700 20bluestore(/var/lib/ceph/osd/ceph-4)
_do_writeprefercsum_order12target_blob_size0x800002017-02-02 10:39:31.988814 7ff7282ff700 10 bluestore(/var/lib/ceph/osd/ceph-4) _do_write_small 0xfb000~1000 2017-02-02 10:39:31.988816 7ff7282ff700 20bluestore(/var/lib/ceph/osd/ceph-4)
_do_write_smallconsidering
Blob(0x56102aac05a0blob([0x256480000~80000] mutable+csum crc32c/0x1000)ref_map(0x0~80000=1)SharedBlob(0x56102aa76260))Quoted 8 lines
Quoted 8 lines
bstart
0x800002017-02-02 10:39:31.988821 7ff7282ff700 20 bluestore.BufferSpace(0x56102aa762b8 in 0x56102a1337a0) _discard 0x7b000~1000 2017-02-02 10:39:31.988827 7ff7282ff700 20bluestore(/var/lib/ceph/osd/ceph-4)
_do_write_smallwal write 0x7b000~1000 of mutable Blob(0x56102aac05a0blob([0x256480000~80000]
Quoted 15 lines
Quoted 15 lines
mutable+csum crc32c/0x1000)
ref_map(0x0~80000=1)
SharedBlob(0x56102aa76260)) at [0x2564fb000~1000]2017-02-02 10:39:31.988832 7ff7282ff700 20bluestore(/var/lib/ceph/osd/ceph-4)
_do_write_smalllex 0xfb000~1000: 0x7b000~1000
Blob(0x56102aac05a0blob([0x256480000~80000] mutable+csum crc32c/0x1000)ref_map(0x0~7b000=1,0x7b000~1000=2,0x7c000~4000=1)SharedBlob(0x56102aa76260))2017-02-02 10:39:31.988836 7ff7282ff700 20 bluestore(/var/lib/ceph/osd/ceph-4) _do_alloc_write txc 0x56102ab4be40 0 blobs 2017-02-02 10:39:31.988837 7ff7282ff700 10 bitmapalloc:reserve instance 94627427524464 num_used 345738 total 7627973 2017-02-02 10:39:31.988840 7ff7282ff700 20Quoted 8 lines
Quoted 8 lines
bluestore(/var/lib/ceph/osd/ceph-4)
_wctx_finishlex_old0xfb000~1000: 0x7b000~1000
Blob(0x56102aac05a0blob([0x256480000~80000] mutable+csum crc32c/0x1000)ref_map(0x0~7b000=1,0x7b000~1000=2,0x7c000~4000=1)SharedBlob(0x56102aa76260))2017-02-02 10:39:31.988844 7ff7282ff700 20
bluestore.extentmap(0x56102a8ee3f0)compress_extent_map0xfb000~1000
Quoted 10 lines
Quoted 10 lines
next shard
0x100000merging 0x80000~7b000: 0x0~7b000 Blob(0x56102aac05a0blob([0x256480000~80000] mutable+csum crc32c/0x1000)ref_map(0x0~80000=1)SharedBlob(0x56102aa76260)) and 0xfb000~1000:
0x7b000~1000 Blob(0x56102aac05a0blob([0x256480000~80000] mutable+csum crc32c/0x1000)ref_map(0x0~80000=1)SharedBlob(0x56102aa76260))2017-02-02 10:39:31.988850 7ff7282ff700 20
bluestore.extentmap(0x56102a8ee3f0)compress_extent_map0xfb000~1000
Quoted 22 lines
Quoted 22 lines
next shard
0x100000merging 0x80000~7c000: 0x0~7c000 Blob(0x56102aac05a0blob([0x256480000~80000] mutable+csum crc32c/0x1000)ref_map(0x0~80000=1)SharedBlob(0x56102aa76260)) and 0xfc000~4000:
0x7c000~4000 Blob(0x56102aac05a0blob([0x256480000~80000] mutable+csum crc32c/0x1000)ref_map(0x0~80000=1)SharedBlob(0x56102aa76260))2017-02-02 10:39:31.988868 7ff7282ff700 20 bluestore.extentmap(0x56102a8ee3f0) dirty_range mark shard 0x80000 dirty 2017-02-02 10:39:31.988870 7ff7282ff700 10 bluestore(/var/lib/ceph/osd/ceph-4) _write 9.73_head #9:cff290b9:::rbd_data.36646a74b0dc51.0000000000000001:head# 0xfb000~1000 = 0 2017-02-02 10:39:31.988875 7ff7282ff700 15 bluestore(/var/lib/ceph/osd/ceph-4) _omap_setkeys 9.73_head #9:ce000000::::head# 2017-02-02 10:39:31.988882 7ff7282ff700 10bluestore(/var/lib/ceph/osd/ceph-4)
_omap_setkeys9.73_head #9:ce000000::::head# = 0Quoted 8 lines
Quoted 8 lines
2017-02-02 10:39:31.988885 7ff7282ff700 20 bluestore(/var/lib/ceph/osd/ceph-4) _txc_write_nodes txc 0x56102ab4be40 onodes 0x56102a8ee300 shared_blobs 2017-02-02 10:39:31.988894 7ff7282ff700 20
bluestore.extentmap(0x56102a8ee3f0)update shard0x80000is 531
bytes(was 531) from 1 extents
Quoted 1 line
Quoted 1 line
2017-02-02 10:39:31.988902 7ff7282ff700 20bluestore(/var/lib/ceph/osd/ceph-4) onode
Quoted 111 lines
Quoted 111 lines
#9:cff290b9:::rbd_data.36646a74b0dc51.0000000000000001:head# is
424
(422 bytes onode + 2 bytes spanning blobs + 0 bytes inline extents)2017-02-02 10:39:31.988914 7ff7282ff700 10 bluestore(/var/lib/ceph/osd/ceph-4) _txc_state_proc txc 0x56102ab4be40 prepare 2017-02-02 10:39:31.988916 7ff7282ff700 20 bluestore(/var/lib/ceph/osd/ceph-4) _txc_finish_io 0x56102ab4be40 2017-02-02 10:39:31.988917 7ff7282ff700 10 bluestore(/var/lib/ceph/osd/ceph-4) _txc_state_proc txc 0x56102ab4be40 io_done 2017-02-02 10:39:31.988918 7ff7282ff700 20
bluestore.BufferSpace(0x56102aa762b8 in 0x56102a1337a0)finish_write
buffer(0x56102adb1830 space0x56102aa762b80x7b000~1000 writing
nocache)2017-02-02 10:39:31.988939 7ff72e30b700 20 bluestore(/var/lib/ceph/osd/ceph-4) _kv_sync_thread wake 2017-02-02 10:39:31.988941 7ff72e30b700 20 bluestore(/var/lib/ceph/osd/ceph-4) _kv_sync_thread committing 1 submitting 1 cleaning 0 2017-02-02 10:39:31.988952 7ff72e30b700 20 bluestore(/var/lib/ceph/osd/ceph-4) _txc_finalize_kv txc 0x56102ab4be40 allocated 0x[] released 0x[] 2017-02-02 10:39:31.988999 7ff72e30b700 10bluestore(/var/lib/ceph/osd/ceph-4)
_balance_bluefs_freespacebluefs
9535 M free
(0.999896) bluestore 222 G free (0.954675),bluefs_ratio0.04021432017-02-02 10:39:31.989400 7ff72e30b700 20 bluestore(/var/lib/ceph/osd/ceph-4) _kv_sync_thread committed 1 cleaned 0 in 0.000456 2017-02-02 10:39:31.989405 7ff72e30b700 10 bluestore(/var/lib/ceph/osd/ceph-4) _txc_state_proc txc 0x56102ab4be40 kv_submitted 2017-02-02 10:39:31.989407 7ff72e30b700 20 bluestore(/var/lib/ceph/osd/ceph-4) _txc_finish_kv txc 0x56102ab4be40 2017-02-02 10:39:31.989413 7ff72e30b700 20bluestore(/var/lib/ceph/osd/ceph-4)
_wal_applytxc0x56102ab4be40
seq
2552017-02-02 10:39:31.989414 7ff72e30b700 20bluestore(/var/lib/ceph/osd/ceph-4)
_do_wal_opwrite [0x2564fb000~1000]Quoted 56 lines
sage
Quoted 53 lines
sage
Quoted 50 lines
Quoted 50 lines
sage
Nick
-----Original Message-----
From: Nick Fisk [mailto:[email protected]]
Sent: 01 February 2017 19:03
To: 'Sage Weil' <[email protected]>; 'Mark Nelson'
<[email protected]>
Cc: [email protected]
Subject: RE: bluestore prefer wal sizeHi Sage,
First results not looking good. It looks like write
IO to the
SSD's (sdd and sdi)
is now massively amplified, by somewhere in the region
of
about 10x. But I'm still only getting around 100 4kb's
seq
write iops from the fio client. This is in comparison
to
2500-3000 iops on the SSD's and ~200 iops per spinning
disk (sdc,sde,sdg,sdh).rbd engine: RBD version: 0.1.11
Jobs: 1 (f=1): [W(1)] [100.0% done] [0KB/476KB/0KB
/s]
[0/119/0 iops] [eta 00m:00s]
rbd_iodepth32: (groupid=0, jobs=1): err= 0:
pid=31171: Wed
Feb
1
18:56:51 2017
write: io=27836KB, bw=475020B/s, iops=115, runt=
60006msec
slat (usec): min=6, max=142, avg=10.98, stdev=
8.38
clat (msec): min=1, max=271, avg= 8.61, stdev=
3.63
lat (msec): min=1, max=271, avg= 8.62, stdev=
3.63
clat percentiles (msec):
| 1.00th=[ 8], 5.00th=[ 9], 10.00th=[
9], 20.00th=[ 9],
| 30.00th=[ 9], 40.00th=[ 9], 50.00th=[Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
9], 60.00th=[ 9],
| 70.00th=[ 9], 80.00th=[ 9], 90.00th=[
9], 95.00th=[ 9],
| 99.00th=[ 17], 99.50th=[ 25], 99.90th=[
33], 99.95th=[ 36],
| 99.99th=[ 273]
bw (KB /s): min= 191, max= 480, per=100.00%,
avg=464.18,stdev=34.60
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
lat (msec) : 2=0.01%, 4=0.04%, 10=97.69%,
20=1.55%, 50=0.69%
lat (msec) : 500=0.01%
cpu : usr=0.13%, sys=0.12%, ctx=7224,
majf=0, minf=5
IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%,
16=0.0%,32=0.0%,
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
=64=0.0%
submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%,
32=0.0%,64=0.0%,
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
=64=0.0%
complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%,
32=0.0%,
64=0.0%, =64=0.0%
issued : total=r=0/w=6959/d=0,
short=r=0/w=0/d=0,Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drop=r=0/w=0/d=0
latency : target=0, window=0,
percentile=100.00%, depth=1I've checked via the admin socket and the prefer wal
option
is set to8192.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Random capture of iostat
Device: rrqm/s wrqm/s r/s w/s
rkB/s wkB/s avgrq-szavgqu-sz
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
await r_await w_await svctm %util
sda 0.00 77.00 0.00 5.50
0.00 338.00 122.91 0.0511.64
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
0.00 11.64 8.73 4.80
sdb 0.00 0.00 0.00 0.00
0.00 0.00 0.00 0.000.00
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
0.00 0.00 0.00 0.00
sdc 0.00 0.00 0.00 151.50
0.00 302.00 3.99 0.543.59
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
0.00 3.59 3.58 54.20
sdd 0.00 0.00 0.00 1474.00
0.00 4008.00 5.44 0.090.06
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
0.00 0.06 0.06 9.20
sde 0.00 0.00 0.00 217.00
0.00 434.00 4.00 0.914.20
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
0.00 4.20 4.20 91.20
sdf 0.00 0.00 0.00 0.00
0.00 0.00 0.00 0.000.00
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
0.00 0.00 0.00 0.00
sdg 0.00 0.00 0.00 66.50
0.00 134.00 4.03 0.182.68
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
0.00 2.68 2.68 17.80
sdh 0.00 0.00 0.00 217.00
0.00 434.00 4.00 0.803.71
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
0.00 3.71 3.71 80.40
sdi 0.00 0.00 0.00 1134.00
0.00 3082.00 5.44 0.090.08
Quoted 38 lines
Quoted 37 lines
Quoted 37 lines
Quoted 37 lines
Quoted 19 lines
Quoted 19 lines
0.00 0.08 0.07 8.40
-----Original Message-----
From: Sage Weil [mailto:[email protected]]
Sent: 01 February 2017 15:34
To: [email protected]
Cc: [email protected]
Subject: bluestore prefer wal sizeHey Nick,
I've updated/improved the prefer wal size PR (that
sends
small writes through the wal). Seehttps://github.com/ceph/ceph/pull/13217
if you want to try it out.
Quoted 10 lines
Quoted 7 lines
Thanks!
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--
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 53 lines · Sage Weil
Quoted 34 lines · Mark Nelson
Quoted 33 lines · Sage Weil
Quoted 31 lines · Nick Fisk
Hi Mark,
Quoted 15 lines
-----Original Message-----
From: Mark Nelson [mailto:[email protected]]
Sent: 03 February 2017 15:20
To: [email protected]; 'Sage Weil' <[email protected]>
Cc: [email protected]
Subject: Re: bluestore prefer wal sizeHi Nick,
So I'm still catching up to your testing, but last night I ran through a number of tests with a single OSD, a single client, and iodepth=1 fio rbd tests:
https://drive.google.com/uc?export=download&id=0B2gTBZrkrnpZWE85OFI3Q2xQZ00
Quoted 10 lines
I tested HDD, HDD+NVMe, and NVMe configurations looking at filestore, bluestore with 1k and 16k prefer wal sizes. I believe I'm seeing similar results to what you saw. On NVMe we are pretty similar likely due to the raw backend throughput the NVMe drives can maintain but on HDD, bluestore is doing quite a bit worse than filestore for this specific use case. During the bluestore HDD tests, I watched disk access and it appears we are saturating the disk with small writes despite the low client performance. I'll be digging into this more today but I wanted to send out an update to let you know I believe I've reproduced your results and am looking into it.
Glad to hear that you can reproduce. After debugging that IF statement, I think I'm at the point where I am out of my depth. But if there is anything I can do, let me know.
Quoted 12 lines
Quoted 4 lines
I finally got my dev box HDD sorted out and retested this. The IOPS were being halved because bluestore was triggering a rocksdb commit (and the associated latency) just to retire the WAL record. I rebased and fixed it so that the WAL entries are deleted lazily (in the next commit round) and
Quoted 8 lines
it's 2x faster than before. I'm getting ~110 IOPS with rados bench 4k writes with queue depth 1 (6TB 7200rpm WD black). That's in the neighborhood of what I'd expect from a spinner... it's basically seeking back and forth between two write positions (the rocksdb log and the new object data where the allocator position is). We could probably bring this up a bit by making the WAL work be batched on HDD (build up several IOs worth and dispatch it all at once to reduce seeks). That'll take a bit more work, though.
I've made this change too, and now I get about 400 IOPS out of a straight HDD (no SSD). Much better! I set up the tunables so that it does the batching behavior only for HDD and not for SSD; we may want to revisit that decision later.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
With WAL on an NVMe, I get about ~450 IOPS.
Want to give it a try?
What's the branch?
wip-bluestore-prefer-wal-size
Got a chance to give it a quick shot, but it's consistently stuck creating PGs and eventually the monitor marks OSDs down due to no osd or PG stats. I'll give it a try with a single OSD cluster tomorrow.
Quoted 2 lines
sage