Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Periodic stalls when writing large files to LUKS partition

Here you can discuss every aspect of Debian. Note: not for support requests!
Post Reply
Message
Author
toquinho
Posts: 59
Joined: 2014-06-24 16:50
Been thanked: 1 time

Periodic stalls when writing large files to LUKS partition

#1 Post by toquinho »

Hello,

I think about two years ago I started noticing periodic stalls when backing up large files (>1GB) on a computer running a zfs raid on LUKS. On my laptop, which has ext4 and swap on LUKS, I have periodic freezes of a VM running Windows, which last for about ten seconds to a minute. Then the VM would respond again. Swapping to an encrypted partition caused freezes of about 30 minutes in spite of earlyoom. My wife uses a Windows VM on an encrypted ext4 partition, which even experienced random crashes and became completely unusable a few days ago (stalls about every one or two minutes, crashes after < 10 minutes). All our machines run Bullseye. Some have new installations, some were upgraded from previous Debian versions.

Last night I found the following post, which completely solved the problem on my wife's computer and which I still have to try on my other machines running LUKS: https://ubuntuforums.org/showthread.php ... st14095592

I am posting this because I would want to ask you for your opinion about the following thoughts:
  • My backup computer is the oldest one that runs LUKS. When I set it up, I did not notice the stalls. They started after some months of use and I thought that they might just be due to the disks filling up. Now I wonder if there was a configuration change in LUKS, which I may have caught with some update.
  • While there are lots of unresolved posts about this problem in many forums, the above link, which seems to contain the only cure, was posted just a few days ago. Most posts deal with Ubuntu and Fedora and virtual machines. I did not find anything specific to Debian. (But I am not very good at searching. :( ) It seems that many LUKS users do not experience this problem to the extent I did or just live with it.
  • I also came across this site: https://blog.cloudflare.com/speeding-up ... ncryption/ Cloudflare intends to treat the cause and not the symptoms (like the link to the Ubuntu forum). But the Cloudflare patch has been in the kernel for a while (which I was not aware of), and, as I said, the problem appeared to get worse and not better during the last years.

LE_746F6D617A7A69
Posts: 932
Joined: 2020-05-03 14:16
Has thanked: 7 times
Been thanked: 65 times

Re: Periodic stalls when writing large files to LUKS partition

#2 Post by LE_746F6D617A7A69 »

toquinho wrote: 2022-05-19 14:41 I think about two years ago I started noticing periodic stalls when backing up large files (>1GB) on a computer running a zfs raid on LUKS. On my laptop, which has ext4 and swap on LUKS, I have periodic freezes of a VM running Windows, which last for about ten seconds to a minute. Then the VM would respond again. Swapping to an encrypted partition caused freezes of about 30 minutes in spite of earlyoom. My wife uses a Windows VM on an encrypted ext4 partition, which even experienced random crashes and became completely unusable a few days ago (stalls about every one or two minutes, crashes after < 10 minutes). All our machines run Bullseye. Some have new installations, some were upgraded from previous Debian versions.
This sounds like a problem with the storage system.
Check Your HDDs and/or SSDs (the fio test is probably the best method)

Especially, ageing SSDs are *expected* to cause performance problems:
viewtopic.php?p=752768#p752768
Bill Gates: "(...) In my case, I went to the garbage cans at the Computer Science Center and I fished out listings of their operating system."
The_full_story and Nothing_have_changed

Post Reply