Ecryptfs is very slow at listing directories with many files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linux |
Unknown
|
Unknown
|
|||
linux (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Listing an ecryptfs directory with lots of files is very slow. Here is how to reproduce this:
• Mount an ecryptfs volume (using encrypted home directories or ~/Private/ for example)
• Create a directory with 10.000 files in it (10.000 copies of the same text file for example)
• Unmount and remount the directory (or logout/login or reboot)
• Run ls on the directory
Running find with no arguments on the same directory is immediate so it seems it is the stat()'ing of each file done by ls that makes this very slow. This is probably because stat() has to decrypt every single file. Keeping the information for stat() in the directory file would be a solution.
Here is a user account of how this problem makes encrypted home directories infeasible:
http://
Should I also submit an upstream bug report as this probably isn't ubuntu specific?
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: linux-image-
Regression: No
Reproducible: Yes
ProcVersionSign
Uname: Linux 2.6.32-21-generic x86_64
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.21.
Architecture: amd64
AudioDevicesInUse:
USER PID ACCESS COMMAND
/dev/snd/
/dev/snd/
CRDA:
country 98:
(2402 - 2472 @ 40), (3, 27)
Card0.Amixer.info:
Card hw:0 'Intel'/'HDA Intel at 0xf8220000 irq 17'
Mixer name : 'Analog Devices AD1984'
Components : 'HDA:11d41984,
Controls : 29
Simple ctrls : 18
Card1.Amixer.info:
Card hw:1 'U0x46d0x9c1'/'USB Device 0x46d:0x9c1 at usb-0000:00:1d.7-1, high speed'
Mixer name : 'USB Mixer'
Components : 'USB046d:09c1'
Controls : 2
Simple ctrls : 1
Card1.Amixer.
Simple mixer control 'Mic',0
Capabilities: cvolume cvolume-joined cswitch cswitch-joined penum
Capture channels: Mono
Limits: Capture 0 - 3072
Mono: Capture 3072 [100%] [30.00dB] [on]
Card29.Amixer.info:
Card hw:29 'ThinkPadEC'
Mixer name : 'ThinkPad EC 7MHT25WW-1.03'
Components : ''
Controls : 1
Simple ctrls : 1
Card29.
Simple mixer control 'Console',0
Capabilities: pswitch pswitch-joined penum
Playback channels: Mono
Mono: Playback [on]
Date: Sat May 29 21:32:16 2010
EcryptfsInUse: Yes
HibernationDevice: RESUME=
MachineType: LENOVO 7673CR8
PccardctlIdent:
Socket 0:
no product info available
PccardctlStatus:
Socket 0:
no card
ProcCmdLine: root=UUID=
ProcEnviron:
PATH=(custom, user)
LANG=en_US.utf8
SHELL=/bin/bash
RelatedPackageV
SourcePackage: linux
WpaSupplicantLog:
dmi.bios.date: 03/12/2009
dmi.bios.vendor: LENOVO
dmi.bios.version: 7NETC0WW (2.20 )
dmi.board.name: 7673CR8
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.
dmi.modalias: dmi:bvnLENOVO:
dmi.product.name: 7673CR8
dmi.product.
dmi.sys.vendor: LENOVO
Hi Pedro,
If you could also please test the latest upstream kernel available that would be great. It will allow additional upstream developers to examine the issue. Refer to https:/ /wiki.ubuntu. com/KernelMainl ineBuilds . Once you've tested the upstream kernel, please remove the 'needs- upstream- testing' tag. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs- upstream- testing' text. Please let us know your results.
Thanks in advance.
[This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]