FAT Performance Optimizations
Ralf Kirchner
ralf.kirchner at embedded-brains.de
Thu Dec 6 15:59:32 UTC 2012
Hi Users,
I would like to share some good news.
We have been successful in eliminating a few performance bottlenecks in
the FAT file system. The FAT file system now writes by cluster instead
of writing by sector. Also reading from the device during a file write
has been minimized.
As a result the data rate during a file write went up while the CPU
usage (for example of the USB sub-system) went down.
Here are some test results. The test setup is:
A simple application loaded to the MPC8313ERDB evaluation board. The
test application provides an ftp server and formats a USB memory stick
with a FAT file system (with 64 sectors per cluster). Then it mounts the
USB memory stick to /work/0 on the target.
Then from a PC the program curl gets used to transfer data from the PC
to the USB memory at the target respectively from the USB memory stick
to the PC.
Previous status (without the performance optimization):
PC -> MPC8313ERDB
curl -T /dev/zero ftp://anonymous@192.168.96.93/work/0/zero
% Total % Received Xferd Average Speed Time Time Current
Dload Upload Total Spent Speed
100 78.8M 0 0 78.8M 0 646k --:--:-- 0:02:04 438k
MPC8313ERDB -> PC:
curl -o /dev/null ftp://anonymous@192.168.96.93/work/0/zero
% Total % Received Xferd Average Speed Time Time Current
Dload Upload Total Spent Speed
100 80.7M 100 80.7M 0 571k 0 0:02:24 0:02:24 567k
With FAT optimizations:
PC -> MPC8313ERDB
curl -T /dev/zero ftp://anonymous@192.168.96.93/work/0/zero
% Total % Received Xferd Average Speed Time Time Current
Dload Upload Total Spent Speed
100 1290M 0 0 1290M 0 3834k --:--:-- 0:05:44 3914k
[/work/0] # blkstats /dev/umass-sim-0-0
-------------------------------------------------------------------------------
DEVICE STATISTICS
----------------------+--------------------------------------------------------
READ HITS | 96202
READ MISSES | 328
READ AHEAD TRANSFERS | 118
READ BLOCKS | 788
READ ERRORS | 0
WRITE TRANSFERS | 1179
WRITE BLOCKS | 18539
WRITE ERRORS | 0
----------------------+--------------------------------------------------------
MPC8313ERDB -> PC:
curl -o /dev/null ftp://anonymous@192.168.96.93/work/0/zero
% Total % Received Xferd Average Speed Time Time Current
Dload Upload Total Spent Speed
100 1291M 100 1291M 0 5652k 0 0:03:53 0:03:53 5900k
[/work/0] # blkstats /dev/umass-sim-0-0
-------------------------------------------------------------------------------
DEVICE STATISTICS
----------------------+--------------------------------------------------------
READ HITS | 767190
READ MISSES | 7
READ AHEAD TRANSFERS | 2663
READ BLOCKS | 10663
READ ERRORS | 0
WRITE TRANSFERS | 1
WRITE BLOCKS | 1
WRITE ERRORS | 0
----------------------+--------------------------------------------------------
The performance impact will vary depending mostly on your target system
and on the configured number of sectors per cluster.
Kind Regards
--------------------------------------------
Embedded Brains GmbH
Ralf Kirchner Dornierstr. 4
D-82178 Puchheim Germany
email: ralf.kirchner at embedded-brains.de
Phone: +49-89-18 94 741-17
Fax: +49-89-18 94 741-08
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the users
mailing list