All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Coly Li <i@coly.li>, Michael Lyle <mlyle@lyle.org>
Cc: Junhui Tang <tang.junhui@zte.com.cn>,
	linux-bcache@vger.kernel.org, linux-block@vger.kernel.org,
	Kent Overstreet <kent.overstreet@gmail.com>
Subject: Re: [PATCH 4/5] bcache: writeback: collapse contiguous IO better
Date: Mon, 9 Oct 2017 07:59:03 +0200	[thread overview]
Message-ID: <25f4cd06-c71c-c468-4ab2-c0a62285f2b8@suse.de> (raw)
In-Reply-To: <33e52793-251d-ed58-fb59-5432946efb56@coly.li>

On 10/06/2017 08:09 PM, Coly Li wrote:
> Hi Mike,
> 
> On 2017/10/7 上午1:36, Michael Lyle wrote:
>> It's 240GB (half of a Samsung 850) in front of a 1TB 5400RPM disk.
>>
> 
> Copied.
> 
>> The size isn't critical.  1/8 is chosen to exceed 10% (default
>> writeback dirty data thresh), it might need to be 1/6 on really big
>> environments.  It needs to be big enough that it takes more than 100
>> seconds to write back, but less than 40% of the cache[1].
>>
> 
> OK, I will do similar thing.
> 
>> I am also running this on "mountain", which is my virtualization
>> server.  It has 2x Samsung 950 PRO 512GB NVMe disks (MD raid1) in
>> front of 2x Seagate Ironwolf 6TB (MD raid1) drivers.  I can't run
>> benchmarks on it, but it runs nightly builds and is otherwise lightly
>> loaded in the middle of night.  It does writeback for about 75 minutes
>> on average after a set of nightly builds of my repositories (last 5
>> days 75, 79, 77, 72, 76); without this patch set it was more like 80
>> (77, 80, 74, 85, 84, 76, 82, 84).  It has 128GB of RAM and doesn't do
> 
> Is it the time from writeback starts to dirty reaches dirty target, or
> the time from writeback starts to dirty reaches 0 ?
> 
>> many reads-- most of its hottest working set hits the page cache--
>> bcache serves to accelerate the random writes its workloads generate.
>> This is the workload that I sought to improve with the writeback
>> changes.
>>
>> When you ran the tests, did you compare 1-5 to 1-3?  Because
> 
> Yes, we did same thing. I only add/remove the last 2 patches about bio
> reorder, the first 3 patches are always applied in my testing kernels.
> 
>> otherwise, another uncontrolled factor is the writeback tuning is
>> drastically different with patch 2.  (On most systems patch 2 makes
>> writeback less aggressive overall by default).
> 
> I observe this behavior :-) I always use the new PI controller in my
> testings, it works fine.
> 
>> [1]: If you don't think this is fair--- this would match how I've been
>> suggesting enterprise users set up bcache for various workloads-- a
>> writeback cache isn't going to be very effective at lowering write
>> workload if the size of the most active write working set doesn't fit
>> nicely in the cache.  so e.g. if you deploy under a SQL database the
>> cache should be double the size of the indices to get a real write
>> aggregation benefit; if you deploy under an environment doing builds
>> the cache should be double the size of the amount written during
>> builds; if you deploy under an environment doing rapid VM provisioning
>> the cache should be double the size of the images blitted per
>> provisioning cycle, etc.
>>
> 
> If I use a 1.8T hard disk as cached device, and 1TB SSD as cache device,
> and set fio to write 500G dirty data in total. Is this configuration
> close to the working set and cache size you suggested ?
> 
Weell, for a realistic scenario you should be aiming for having about
one order of magnitude difference between the cache and the cached device.
So for your setup you'd be needing about 4TB of cached device, or using
only parts of the caching device (say around 500G).

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

  parent reply	other threads:[~2017-10-09  5:59 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-27  7:32 [PATCH 4/5] bcache: writeback: collapse contiguous IO better tang.junhui
2017-09-27  7:47 ` Michael Lyle
2017-09-27  7:58   ` Michael Lyle
2017-09-30  2:25 ` Coly Li
2017-09-30  3:17   ` Michael Lyle
2017-09-30  6:58     ` Coly Li
2017-09-30  7:13       ` Michael Lyle
2017-09-30  7:13         ` Michael Lyle
2017-09-30  7:33         ` Michael Lyle
2017-09-30  7:33           ` Michael Lyle
2017-09-30  8:03         ` Coly Li
2017-09-30  8:23           ` Michael Lyle
2017-09-30  8:31             ` Michael Lyle
     [not found]               ` <CAJ+L6qcU+Db5TP1Q2J-V8angdzeW9DFGwc7KQqc4di9CSxusLg@mail.gmail.com>
     [not found]                 ` <CAJ+L6qdu4OSRh7Qdkk-5XBgd4W_N29Y6-wVLf-jFAMKEhQrTbQ@mail.gmail.com>
     [not found]                   ` <CAJ+L6qcyq-E4MrWNfB9kGA8DMD_U1HMxJii-=-qPfv0LeRL45w@mail.gmail.com>
2017-09-30 22:49                     ` Michael Lyle
2017-10-01  4:51                       ` Coly Li
2017-10-01 16:56                         ` Michael Lyle
2017-10-01 16:56                           ` Michael Lyle
2017-10-01 17:23                           ` Coly Li
2017-10-01 17:34                             ` Michael Lyle
2017-10-04 18:43                               ` Coly Li
2017-10-04 18:43                                 ` Coly Li
2017-10-04 23:54                                 ` Michael Lyle
2017-10-04 23:54                                   ` Michael Lyle
2017-10-05 17:38                                   ` Coly Li
2017-10-05 17:53                                     ` Michael Lyle
2017-10-05 18:07                                       ` Coly Li
2017-10-05 22:59                                       ` Michael Lyle
2017-10-06  8:27                                         ` Coly Li
2017-10-06  9:20                                           ` Michael Lyle
2017-10-06 10:36                                             ` Coly Li
2017-10-06 10:42                                               ` Michael Lyle
2017-10-06 10:42                                                 ` Michael Lyle
2017-10-06 10:56                                                 ` Michael Lyle
2017-10-06 10:56                                                   ` Michael Lyle
2017-10-06 11:00                                                 ` Hannes Reinecke
2017-10-06 11:09                                                   ` Michael Lyle
2017-10-06 11:09                                                     ` Michael Lyle
2017-10-06 11:57                                                     ` Michael Lyle
2017-10-06 11:57                                                       ` Michael Lyle
2017-10-06 12:37                                                       ` Coly Li
2017-10-06 17:36                                                         ` Michael Lyle
2017-10-06 18:09                                                           ` Coly Li
2017-10-06 18:23                                                             ` Michael Lyle
2017-10-06 18:36                                                             ` Michael Lyle
2017-10-09 18:58                                                               ` Coly Li
2017-10-10  0:00                                                                 ` Michael Lyle
2017-10-09  5:59                                                             ` Hannes Reinecke [this message]
2017-10-06 12:20                                                 ` Coly Li
2017-10-06 17:53                                                   ` Michael Lyle
  -- strict thread matches above, loose matches on Subject: below --
2017-09-29  3:37 tang.junhui
2017-09-29  4:15 ` Michael Lyle
2017-09-29  4:22   ` Coly Li
2017-09-29  4:27     ` Michael Lyle
2017-09-29  4:26   ` Michael Lyle
2017-09-26 19:24 [PATCH 1/5] bcache: don't write back data if reading it failed Michael Lyle
2017-09-26 19:24 ` [PATCH 4/5] bcache: writeback: collapse contiguous IO better Michael Lyle

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=25f4cd06-c71c-c468-4ab2-c0a62285f2b8@suse.de \
    --to=hare@suse.de \
    --cc=i@coly.li \
    --cc=kent.overstreet@gmail.com \
    --cc=linux-bcache@vger.kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=mlyle@lyle.org \
    --cc=tang.junhui@zte.com.cn \
    /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.