On Sat, Apr 28, 2018 at 04:55:29PM +0200, Martin Pieuchot wrote:
> On 26/04/18(Thu) 23:06, Landry Breuil wrote:
> > On Thu, Apr 26, 2018 at 10:01:25PM +0200, Martin Pieuchot wrote:
> > > This is the 4th attempt to implement clustering for msdosfs. See [0]
> > > for the previous story.
> > >
> > > This version implements the strict necessary to read a maximum of 64k
> > > per read. Unlike the previous version we no longer mix cluster and
> > > block numbers.
> > >
> > > This speeds up msdosfs reads significantly. Regress tests are passing.
> > >
> > > I'd appreciate more tests and reviews.
> >
> > Well, i see a 2.5x dropout in perfs.. rsyncing a 100mb dir from the same
> > usb key:
> >
> > sd1 at scsibus4 targ 1 lun 0: <Kingston, DataTraveler G2, 1.00> SCSI2
> > 0/direct removable serial.09511624F0417921125B
> > sd1: 3689MB, 512 bytes/sector, 7555528 sectors
> >
> > without the diff:
> > sent 101,634,811 bytes received 153 bytes 2,540,870.35 bytes/sec
> >
> > with the diff:
> > sent 101,634,811 bytes received 153 bytes 936,727.78 bytes/sec
> > sent 101,634,811 bytes received 153 bytes 928,173.19 bytes/sec
> >
> > To be analysed ...
>
> Thanks to landry I now understand why we cannot keep using "block numbers"
> as logical value to index buffers.
>
> The VFS clustering code assume that the next logical block number correspond
> to the next block on disk. In the case of FAT it is true for cluster.
>
> So I believe we should commit the diff below.
With this diff, using a generic 4gb usb disk with a ubuntu iso, i get a
nice 5x improvement operating on a single 1.2G file, after a cold boot
and no prior access to the actual file:
$time md5 /mnt/sd2/CASPER/filesystem.squashfs
MD5 (/mnt/sd2/CASPER/filesystem.squashfs) = 341d91956976a601de687b80a23a4d3c
1m05.26s real 0m04.35s user 0m04.20s system
$time rsync --stats /mnt/sd2/CASPER/filesystem.squashfs /tmp
sent 1,237,978,281 bytes received 35 bytes 15,770,424.41 bytes/sec
total size is 1,237,676,032 speedup is 1.00
1m17.82s real 0m06.91s user 0m18.78s system
Same tests without the diff:
$time rsync --stats /mnt/sd2/CASPER/filesystem.squashfs /tmp
sent 1,237,978,281 bytes received 35 bytes 3,583,149.97 bytes/sec
total size is 1,237,676,032 speedup is 1.00
5m45.39s real 0m07.38s user 0m29.90s system
$time md5 /mnt/sd2/CASPER/filesystem.squashfs
MD5 (/mnt/sd2/CASPER/filesystem.squashfs) = 341d91956976a601de687b80a23a4d3c
5m38.83s real 0m04.79s user 0m13.41s system
Landry