public inbox for linux-bcache@vger.kernel.org
 help / color / mirror / Atom feed
From: Adriano Silva <adriano_da_silva@yahoo.com.br>
To: Coly Li <colyli@suse.de>, Eric Wheeler <bcache@lists.ewheeler.net>
Cc: Bcache Linux <linux-bcache@vger.kernel.org>,
	Martin McClure <martin.mcclure@gemtalksystems.com>
Subject: Re: Writeback cache all used.
Date: Tue, 9 May 2023 02:21:35 +0000 (UTC)	[thread overview]
Message-ID: <2050992229.3201284.1683598895474@mail.yahoo.com> (raw)
In-Reply-To: <29836c81-3388-cf59-99b1-15bbf0eaac@ewheeler.net>

Thanks.Hi Guys,

Eric:

I got the parameters with this script, although I also checked / sys, doing the math everything is right.

https://gist.github.com/damoxc/6267899


Thanks.


Em segunda-feira, 8 de maio de 2023 às 21:42:26 BRT, Eric Wheeler <bcache@lists.ewheeler.net> escreveu: 





On Thu, 4 May 2023, Coly Li wrote:
> > 2023年5月3日 04:34,Eric Wheeler <bcache@lists.ewheeler.net> 写道:
> > 
> > On Thu, 20 Apr 2023, Adriano Silva wrote:
> >> I continue to investigate the situation. There is actually a performance 
> >> gain when the bcache device is only half filled versus full. There is a 
> >> reduction and greater stability in the latency of direct writes and this 
> >> improves my scenario.
> > 
> > Hi Coly, have you been able to look at this?
> > 
> > This sounds like a great optimization and Adriano is in a place to test 
> > this now and report his findings.
> > 
> > I think you said this should be a simple hack to add early reclaim, so 
> > maybe you can throw a quick patch together (even a rough first-pass with 
> > hard-coded reclaim values)
> > 
> > If we can get back to Adriano quickly then he can test while he has an 
> > easy-to-reproduce environment.  Indeed, this could benefit all bcache 
> > users.
> 
> My current to-do list on hand is a little bit long. Yes I’d like and 
> plan to do it, but the response time cannot be estimated.

I understand.  Maybe I can put something together if you can provide some 
pointers since you are _the_ expert on bcache these days.  Here are a few 
questions:

Q's for Coly:

- It looks like it could be a simple change to bch_allocator_thread().  
  Is this the right place? 
  https://elixir.bootlin.com/linux/v6.3-rc5/source/drivers/md/bcache/alloc.c#L317
    - On alloc.c:332
    if (!fifo_pop(&ca->free_inc, bucket))
      does it just need to be modified to something like this:
    if (!fifo_pop(&ca->free_inc, bucket) || 
        total_unused_cache_percent() < 20)
      if so, where does bcache store the concept of "Total Unused Cache" ?

- If I'm going about it wrong above, then where is the code path in bcache 
  that frees a bucket such that it is completely unused (ie, as it was
  after `make-bcache -C`?)


Q's Adriano:

Where did you get these cache details from your earlier post?  In /sys 
somewhere, probably, but I didn't find them:

    Total Cache Size 553.31GiB
    Total Cache Used 547.78GiB (99%)
    Total Unused Cache 5.53GiB (1%)
    Dirty Data 0B (0%)
    Evictable Cache 503.52GiB (91%)




--
Eric Wheeler



> 
> Coly Li
> 
> [snipped]

  reply	other threads:[~2023-05-09  2:21 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1012241948.1268315.1680082721600.ref@mail.yahoo.com>
2023-03-29  9:38 ` Writeback cache all used Adriano Silva
2023-03-29 19:18   ` Eric Wheeler
2023-03-30  1:38     ` Adriano Silva
2023-03-30  4:55   ` Martin McClure
2023-03-31  0:17     ` Adriano Silva
2023-04-02  0:01       ` Eric Wheeler
2023-04-03  7:14         ` Coly Li
2023-04-03 19:27           ` Eric Wheeler
2023-04-04  8:19             ` Coly Li
2023-04-04 20:29               ` Adriano Silva
2023-04-05 13:57                 ` Coly Li
2023-04-05 19:24                   ` Eric Wheeler
2023-04-05 19:31                   ` Adriano Silva
2023-04-06 21:21                     ` Eric Wheeler
2023-04-07  3:15                       ` Adriano Silva
2023-04-09 16:37                     ` Coly Li
2023-04-09 20:14                       ` Adriano Silva
2023-04-09 21:07                         ` Adriano Silva
2023-04-20 11:35                           ` Adriano Silva
2023-05-02 20:34                             ` Eric Wheeler
2023-05-04  4:56                               ` Coly Li
2023-05-04 14:34                                 ` Adriano Silva
2023-05-09  0:29                                   ` Eric Wheeler
2023-05-09  0:42                                 ` Eric Wheeler
2023-05-09  2:21                                   ` Adriano Silva [this message]
2023-05-11 23:10                                     ` Eric Wheeler
2023-05-12  5:13                                       ` Coly Li
2023-05-13 21:05                                         ` Eric Wheeler

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=2050992229.3201284.1683598895474@mail.yahoo.com \
    --to=adriano_da_silva@yahoo.com.br \
    --cc=bcache@lists.ewheeler.net \
    --cc=colyli@suse.de \
    --cc=linux-bcache@vger.kernel.org \
    --cc=martin.mcclure@gemtalksystems.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox