linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zdenek.kabelac@gmail.com>
To: Jaco Kroon <jaco@uls.co.za>, Roger Heflin <rogerheflin@gmail.com>
Cc: "linux-lvm@lists.linux.dev" <linux-lvm@lists.linux.dev>
Subject: Re: lvm2 deadlock
Date: Tue, 4 Jun 2024 18:07:11 +0200	[thread overview]
Message-ID: <de91140b-d29b-4885-8d1f-be172babb4be@gmail.com> (raw)
In-Reply-To: <5aa7f229-aef5-4f63-acb5-1e130c6c5296@uls.co.za>

Dne 04. 06. 24 v 13:52 Jaco Kroon napsal(a):
> Hi,
> 
> On 2024/06/04 12:48, Roger Heflin wrote:
> 
>> Use the *_bytes values.  If they are non-zero then they are used and
>> that allows setting even below 1% (quite large on anything with a lot
>> of ram).
>>
>> I have been using this for quite a while:
>> vm.dirty_background_bytes = 3000000
>> vm.dirty_bytes = 5000000
> 
> 
> What I am noticing immediately is that the "free" value as per "free -m" is 
> definitely much higher, which to me is indicative that we're not caching as 
> aggressively as can be done.  Will monitor this for the time being:
> 
> crowsnest [13:50:09] ~ # free -m
>                 total        used        free      shared buff/cache available
> Mem:          257661        6911      105313           7 145436      248246
> Swap:              0           0           0
> 
> The Total DISK WRITE and Current DISK Write values in in iotop seems to have a 
> tighter correlation now (no longer seeing constant Total DISK WRITE with 
> spikes in current, seems to be more even now).

Hi

So now while we are solving various system setting - there are more things to 
think through.

The big 'range' of unwritten data may put them in risk for the 'power' failure.
On the other hand large  'dirty pages'  allows system to 'optimize'  and even 
bypass storing them on disk if they are frequently changed - so in this case 
'lower' dirty ration may cause significant performance impact - so please 
check whats the typical workload and what is result...

It's worth to mention lvm2 support  writecache target to kind of offload dirty 
pages to fast storage...

Last but not least -  disk scheduling policies also do have impact - to i.e. 
ensure better fairness - at the prices of lower throughput...

So now let's get back to lvm2  'possible' deadlock - which I'm still not fully 
certain we deciphered in this thread yet.

So if you happen to 'spot' stuck  commands -  do you notice anything strange 
in systemd journal -  usually when  systemd  decides to kill udevd worker task 
- it's briefly stated in journal - with this check we would kind of know that 
reason of your problems was killed worked that was not able to 'finalize' lvm 
command which is waiting for confirmation from udev (currently without any 
timeout limits).

To unstuck such command  'udevcomplete_all' is a cure - but as said - the 
system is already kind of 'damaged' since udev is failing and has 'invalid' 
information about devices...

So maybe you could check whether your journal around date&time of problem has 
some 'interesting'  'killing action' record ?

Regards

Zdenek

  parent reply	other threads:[~2024-06-04 16:07 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-30 10:21 lvm2 deadlock Jaco Kroon
2024-05-31 12:34 ` Zdenek Kabelac
2024-06-03 12:56   ` Jaco Kroon
2024-06-03 19:25     ` Zdenek Kabelac
2024-06-04  8:46       ` Jaco Kroon
2024-06-04 10:48         ` Roger Heflin
2024-06-04 11:52           ` Jaco Kroon
2024-06-04 13:30             ` Roger Heflin
2024-06-04 13:46               ` Stuart D Gathman
2024-06-04 14:49                 ` Jaco Kroon
2024-06-04 15:03                   ` Roger Heflin
2024-06-04 14:07               ` Jaco Kroon
2024-06-04 16:07             ` Zdenek Kabelac [this message]
2024-06-05  8:59               ` Jaco Kroon
2024-06-06 22:14                 ` Zdenek Kabelac
2024-06-06 22:17                   ` Zdenek Kabelac
2024-06-07  9:03                     ` Jaco Kroon
2024-06-07  9:26                       ` Zdenek Kabelac
2024-06-07  9:36                         ` Jaco Kroon
2024-09-02  5:48                           ` Unsubscribe box, listen

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=de91140b-d29b-4885-8d1f-be172babb4be@gmail.com \
    --to=zdenek.kabelac@gmail.com \
    --cc=jaco@uls.co.za \
    --cc=linux-lvm@lists.linux.dev \
    --cc=rogerheflin@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).