From: "Michał Sokołowski" <michal@sarach.com.pl>
To: "Tomasz Kłoczko" <kloczko.tomasz@gmail.com>
Cc: Linux fs Btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: defragmenting best practice?
Date: Fri, 15 Sep 2017 16:11:50 +0200 [thread overview]
Message-ID: <59BBDFA6.4020500@sarach.com.pl> (raw)
In-Reply-To: <CABB28CxYR35HQgvf5PvRpDkGvtBxMR1LBDQO60N6QZ1cBmZGjQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2877 bytes --]
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.
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 3849 bytes --]
next prev parent reply other threads:[~2017-09-15 14:11 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-31 7:05 btrfs filesystem defragment -r -- does it affect subvolumes? Ulli Horlacher
2017-09-12 16:28 ` defragmenting best practice? Ulli Horlacher
2017-09-12 17:27 ` Austin S. Hemmelgarn
2017-09-14 7:54 ` Duncan
2017-09-14 12:28 ` Austin S. Hemmelgarn
2017-09-14 11:38 ` Kai Krakow
2017-09-14 13:31 ` Tomasz Kłoczko
2017-09-14 15:24 ` Kai Krakow
2017-09-14 15:47 ` Kai Krakow
2017-09-14 17:48 ` Tomasz Kłoczko
2017-09-14 18:53 ` Austin S. Hemmelgarn
2017-09-15 2:26 ` Tomasz Kłoczko
2017-09-15 12:23 ` Austin S. Hemmelgarn
2017-09-14 20:17 ` Kai Krakow
2017-09-15 10:54 ` Michał Sokołowski
2017-09-15 11:13 ` Peter Grandi
2017-09-15 13:07 ` Tomasz Kłoczko
2017-09-15 14:11 ` Michał Sokołowski [this message]
2017-09-15 16:35 ` Peter Grandi
2017-09-15 17:08 ` Kai Krakow
2017-09-15 19:10 ` Tomasz Kłoczko
2017-09-20 6:38 ` Dave
2017-09-20 7:34 ` Dmitry Kudriavtsev
2017-09-20 11:46 ` Austin S. Hemmelgarn
2017-09-21 20:10 ` Kai Krakow
2017-09-21 23:30 ` Dave
2017-09-21 23:58 ` Kai Krakow
2017-09-22 11:22 ` Austin S. Hemmelgarn
2017-09-22 20:29 ` Marc Joliet
2017-09-21 11:09 ` Duncan
2017-10-31 21:47 ` Dave
2017-10-31 23:06 ` Peter Grandi
2017-11-01 0:37 ` Dave
2017-11-01 12:21 ` Austin S. Hemmelgarn
2017-11-02 1:39 ` Dave
2017-11-02 11:07 ` Austin S. Hemmelgarn
2017-11-03 2:59 ` Dave
2017-11-03 7:12 ` Kai Krakow
2017-11-03 5:58 ` Marat Khalili
2017-11-03 7:19 ` Kai Krakow
2017-11-01 17:48 ` Peter Grandi
2017-11-02 0:09 ` Dave
2017-11-02 11:17 ` Austin S. Hemmelgarn
2017-11-02 18:09 ` Dave
2017-11-02 18:37 ` Austin S. Hemmelgarn
2017-11-02 0:43 ` Peter Grandi
2017-11-02 21:16 ` Kai Krakow
2017-11-03 2:47 ` Dave
2017-11-03 7:26 ` Kai Krakow
2017-11-03 11:30 ` Austin S. Hemmelgarn
[not found] ` <CAH=dxU47-52-asM5vJ_-qOpEpjZczHw7vQzgi1-TeKm58++zBQ@mail.gmail.com>
2017-12-11 5:18 ` Dave
2017-12-11 6:10 ` Timofey Titovets
2017-11-01 7:43 ` Sean Greenslade
2017-11-01 13:31 ` Duncan
2017-11-01 23:36 ` Dave
2017-09-21 19:28 ` Sean Greenslade
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=59BBDFA6.4020500@sarach.com.pl \
--to=michal@sarach.com.pl \
--cc=kloczko.tomasz@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.