On 09/15/2017 03:07 PM, Tomasz Kłoczko wrote: > [...] > Case #1 > 2x 7200 rpm HDD -> md raid 1 -> host BTRFS rootfs -> qemu cow2 storage > -> guest BTRFS filesystem > SQL table row insertions per second: 1-2 > > Case #2 > 2x 7200 rpm HDD -> md raid 1 -> host BTRFS rootfs -> qemu raw storage -> > guest EXT4 filesystem > SQL table row insertions per second: 10-15 > Q -1) why you are comparing btrfs against ext4 on top of the btrfs > which is doing own COW operations on bottom of such sandwiches .. if > we SUPPOSE to be talking about impact of the fragmentation on top of > btrfs?
Tomasz, you seem to be convinced that fragmentation does not matter. I found this (extremely bad, true) example says otherwise. > Q 0) what do you think that you measure here? Cow's fragmentation impact on SQL write performance. > Q 1) how did you produce those time measurements? time command? > looking on the watch? Time command (real) of bash script inserting 1000 rows (index and 128B random string). > Q 2) why there are ranges of timings? did you repeat some operations > few times (how many times and with or without dropping caches or doing > reboots?) Yes, we've repeated it. With and without flushing cache (it didn't seem to have any impact). I cannot remember whenever there were any reboots. Those big time ranges are because, I don't have exact numbers on me. It was quick and dirty task to find, prove and remove performance bottleneck at minimal cost. AFAIR removing storage cow2 and guest BTRFS storage gave us ~ 10 times boost. Surprisingly for us this boost seems to be consistent (it does not degrade noticeably over time - 2 months from the change). > Q 3) What kind of SQL engine? with what kind of settings? with what > kind of tables? (indexes? foreign keys?) What kind of transactions > semantics? PostgreSQL and MySQL both gave us those results. * > Q 4) where is the example set of inserts which I can replay in my > setup? did you drop caches before batch of inserts? (do you know that > every insert generates as well some number of read IOs so information > is something is already cached before batch of inserts is *crucial*) > Did you restart SQL engine? > Q 5) are both test have been executed on the same box? if not which > one version of the kernel(s) have been used? Same distribution, machine and kernel. * > Q 6) ) effectively how many IOs have been done during those tests? how > did you measured those numbers (dtrace? perf? systemtap?) I didn't check that. * > Q7) why you are running your tests over qemu? Is it anything more > running on the host system during those tests? Because of "production" environment location. No, there was not. *) If you're really interested in (which I doubt), then I can put example environment somewhere and gather more data.
smime.p7s
Description: S/MIME Cryptographic Signature