lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 25 Jul 2012 23:54:12 -0700
From:	Marc MERLIN <marc@...lins.org>
To:	Ted Ts'o <tytso@....edu>
Cc:	Lukáš Czerner <lczerner@...hat.com>,
	linux-ext4@...r.kernel.org, axboe@...nel.dk,
	Milan Broz <mbroz@...hat.com>
Subject: Re: du -s src is a lot slower on SSD than spinning disk in the same laptop

On Wed, Jul 25, 2012 at 11:32:23PM -0400, Ted Ts'o wrote:
> On Wed, Jul 25, 2012 at 08:40:28PM +0200, Lukáš Czerner wrote:
> > > First, I had he problem with btrfs (details below), and then I noticed that
> > > while ext4 is actually twice as fast as btrfs, it's still a lot slower at
> > > stat on my fast Samsung 830 512G SSD than my 1TB laptop hard drive (both
> > > drives being in the same thinkpad T530 with 3.4.4 kernel).
> > > 
> > > How can things be so slow? 12-13 seconds to scan 15K inodes on a freshly
> > > made filesystem (and 22 secs with btrfs, so at least ext4 wins). The same
> > > thing on my spinning drive takes fewer than 4 seconds, and SSD should be
> > > several times faster than that.
> > > SSD throughput was measured over 400MB/s on the raw device and 268MB/s
> > > through the filesystem:
> 
> Was this an identical file system image on HDD and SSD?

Not entirely, but I did another test on similar ext4 FS, one on the SSD
and one on th HDD:

gandalfthegreat:/boot# find /boot/src | wc -l
6261
gandalfthegreat:/boot# reset_cache; time du -sh /boot/src ; reset_cache; time du -sh /boot2/src
169M	/boot/src
real	0m5.248s

157M	/boot2/src
real	0m0.698s

gandalfthegreat:/boot# df -h /boot /boot2
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       241M  226M  2.5M  99% /boot
/dev/sdb2       298M  273M  9.3M  97% /boot2
gandalfthegreat:/boot# grep boot /proc/mounts
/dev/sdb2 /boot2 ext4 rw,relatime,stripe=4,data=ordered 0 0
/dev/sda1 /boot ext4 rw,relatime,discard,stripe=32,data=ordered 0 0

The only sizeable difference is that sda1 is a 4K block size I forced to
help with faster writes on the ssd.

In the example above, the SSD is almost 10 times slower than the HDD.

blktrace -d /dev/sda -o - | blkparse -i - during du is 
http://marc.merlins.org/tmp/blktrace_du_sda1.txt

Does that give enough info on what's going on?

Thanks,
Marc
-- 
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/  
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists