You are not logged in.

#1 2013-11-09 11:11:58

krachyon
Member
Registered: 2013-11-08
Posts: 6

Figuring out system freeze with disk encryption

Hi Folks,
so i have setup my laptop with LVM-on-luks disk encryption but I'm experiencing rather annoying performance issues. Any kind of appreciable disk I/O will cause the current program or the whole system to freeze periodically for about 0.5 seconds, sort of like lag spikes. In case of heavy disk I/O, the system sometimes freezes for minutes or completely.  The curious thing is, I tried the exact same disk setup on a comparable laptop with a hdd instead of an ssd and everything seems to run pretty smoothly there.

The typical output of iostat is 2-5% CPU usage but about 50% iowait.

Encrypted swap does not seem to be the cause, the problem as it persist, even at low ram usage and disabled swap.

I also tried to tweak the mount options in /etc/fstab but to no avail.

Now I'm at a loss of where to look next. Does anyone have any ideas what the cause might me or what I could do to figure it out?
Any help would be greatly appreciated.


Hopefully useful information:

luksDump

Version:       	1
Cipher name:   	twofish
Cipher mode:   	xts-essiv:sha256
Hash spec:     	whirlpool
Payload offset:	4096
MK bits:       	256
MK iterations: 	15125

/etc/fstab

/dev/sda1           	/boot     	ext2      	rw,relatime	0 1

/dev/mapper/stor-lroot	/         	ext4      	rw,relatime,discard	0 2

/dev/mapper/stor-lhome	/home     	ext4      	rw,relatime,discard	0 2

/dev/mapper/stor-lswap	none      	swap      	defaults  	0 0

iostat

Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sda2              0.00     0.00    0.00  334.50     0.00  1338.00     8.00     5.82   17.69    0.00   17.69   2.77  92.50

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           2.51    0.00    5.26   39.10    0.00   53.13

Offline

#2 2014-02-11 13:27:06

northx
Member
Registered: 2014-02-11
Posts: 1

Re: Figuring out system freeze with disk encryption

Having the same problem here on an ssd system with whole disk encryption and disabled swap. Any high disk IO, e.g. enough tabs open in chrome or dd if=/dev/zero of=tmp will cause temporary or permanent freezes with high iowait.

I'm not on Arch, but thought I'd comment anyway if it helps in figuring out the cause. Suspect it's a kernel level problem.


Kernel 3.11 x86_64

luksDump
Version:           1
Cipher name:       aes
Cipher mode:       xts-plain64
Hash spec:         sha1
Payload offset:    4096
MK bits:           512

Offline

#3 2014-12-14 09:51:01

maxexcloo
Member
Registered: 2009-10-14
Posts: 177

Re: Figuring out system freeze with disk encryption

I've been experiencing this also, any details I can give that would help to debug the issue?

Offline

#4 2014-12-16 11:29:14

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,429

Re: Figuring out system freeze with disk encryption

random shot: Any of you have "TRIM" enabled for the SSD?

Offline

#5 2015-01-30 12:02:43

maxexcloo
Member
Registered: 2009-10-14
Posts: 177

Re: Figuring out system freeze with disk encryption

Strike0 wrote:

random shot: Any of you have "TRIM" enabled for the SSD?

Yes, I do, anything I should try/be aware of?

Offline

#6 2015-01-30 21:31:10

gdon
Member
Registered: 2015-01-26
Posts: 15

Re: Figuring out system freeze with disk encryption

My case seems similar. I'm on Arch but using a HDD. When my RAM gets reasonably full, I experience the same kind of (usually permanent) freeze.
I've never thought that whole disk encryption could have been the culprit... until now.

@northx: where did you try to create your temporary file?

I suppose you guys are using AES. nevermind, I tend to overlook code blocks if I'm not interested in the piece of information it contains at the moment I read it, sorry. But at least, we can be sure that this is not related to a specific cipher.

Last edited by gdon (2015-01-30 21:35:38)

Offline

#7 2015-01-31 23:04:17

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,429

Re: Figuring out system freeze with disk encryption

maxexcloo wrote:
Strike0 wrote:

random shot: Any of you have "TRIM" enabled for the SSD?

Yes, I do, anything I should try/be aware of?

Well, TRIM gets more important to counter slowdowns if the SSD reaches full capacity. If you have it enabled per mount (like the OP shows) and it works, then that's what you can do with that.

Offline

Board footer

Powered by FluxBB