All of lore.kernel.org
 help / color / mirror / Atom feed
From: Teodor Milkov <tm@del.bg>
To: Zdenek Kabelac <zdenek.kabelac@gmail.com>, dm-devel@redhat.com
Subject: Re: dm-cache issue
Date: Sat, 19 Nov 2016 19:07:50 +0200	[thread overview]
Message-ID: <689d0d91-70c9-b864-0a9c-0c00af96008e@del.bg> (raw)
In-Reply-To: <36a1bed8-b979-35de-155f-e07daf707fac@gmail.com>

On 16.11.2016 16:06, Zdenek Kabelac wrote:
> Dne 16.11.2016 v 14:45 Teodor Milkov napsal(a):
>> On 16.11.2016 11:24, Zdenek Kabelac wrote:
>>> My first 'guess' in this reported case is - the disk I/O traffic 
>>> seen is
>>> related to the 'reload' of cached chunks from disk back to cache.
>>>
>>> This will happen in the case, there has been unclean cache shutdown.
>>>
>>> However what is unclean is - why it slows down boot by hours.
>>> Is the cache too big??
>>
>> Indeed, cache is quite big – a 800GB SSD, but I found experimentally 
>> that this
>> is the size where I get good cache hit ratios with my >10TB data volume.
>
> Yep - that's the current trouble of existing  dm-cache target.
> It's getting inefficient when maintaining more then 1 million
> cache block entries - recent versions of lvm2 even do not allow
> create such cache without enforcing it.
> (so for 32k blocks it'  ~30G cache data size)

I'm sorry for not being clear: similarly to the OP my SSD is split among 
10 LVs, so eache cache is around 80GB.

>> As to the 'reload' vs 'flush' – I think it is flushing, because iirc 
>> iostat
>> showed lots of SSD reading and HDD writing, but I'm not really sure 
>> and need
>> to confirm that.
>>
>> So, are you saying that in case of unclean shutdown this 'reload' is 
>> inevitable?
>
> Yes - clean shutdown is mandatory - otherwise cache can't know consitency
> and has to refresh itself.  Other option would be probably to drop cache
> and let it rebuild - but you lose already gained 'knowledge' this way.
>
> Anyway AFAIK there is ongoing devel and up-streaming process for new 
> cache target which will others couple shortcomings and should perform 
> much
> better.   lvm2 will supposedly handle transition to a new format in 
> some way
> later.
>
>> How much time it takes obviously depends on the SSD size/speed & HDD 
>> speed,
>> but with 800GB SSD it is reasonable to expect very long boot times.
>>
>>> Can you provide full logs from 'deactivation' and following activation?
>>
>> Any hints as to how to collect "full logs from 'deactivation' and 
>> following
>> activation"? It happens early in the Debian boot process (I think 
>> udev does
>> the activation) and I'm not sure how to enable logging... should I tweak
>> /etc/lvm/lvm.conf?
>
> All you need to collect is basically 'serial' console log from your
> machine  - so if you have other box to trap serial console log - it's
> the most easiest option.
>
> But since you already said you use  ~30times bigger cache size then 
> the size with 'reasonable' performance - I think it's already clear 
> where is your
> problem hidden.
>
> Until new target will be deployed - please consider to use 
> significantly smaller cache size so the number of cache chunks is not 
> above 1 000 000.

Thank you very much for your help! I'll give it another go at debugging 
what the problem is.
I found dm-writeboost in write_around_mode (kinda write-through) works 
well for me, so if I don't manage to get along with dm-cache I have plan B.


Best regards,
Teodor

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

  reply	other threads:[~2016-11-19 17:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-14 15:02 dm-cache issue Alexander Pashaliyski
2016-11-14 15:34 ` Zdenek Kabelac
2016-11-14 16:05   ` Alexander Pashaliyski
2016-11-15 12:38   ` Teodor Milkov
2016-11-16  9:24     ` Zdenek Kabelac
2016-11-16 13:45       ` Teodor Milkov
2016-11-16 14:06         ` Zdenek Kabelac
2016-11-19 17:07           ` Teodor Milkov [this message]
2016-12-02 19:49             ` Teodor Milkov
2016-11-15 19:57 ` John Stoffel

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=689d0d91-70c9-b864-0a9c-0c00af96008e@del.bg \
    --to=tm@del.bg \
    --cc=dm-devel@redhat.com \
    --cc=zdenek.kabelac@gmail.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 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.