[omgps] collect feature requests

Rask Ingemann Lambertsen ccc94453 at vip.cybercity.dk
Mon Jul 13 03:03:08 CEST 2009


On Tue, Jun 30, 2009 at 11:32:39PM +0200, Laszlo KREKACS wrote:

> I already wrote about it about a month ago:
> http://lists.openmoko.org/pipermail/community/2009-June/048997.html

   So you've found that vfat, ext2 and ext3 aren't very good (for storing
map tiles)? How about using reiserfs instead?

> Remember accessing invidual files on a sd card takes time. A lot.
> You can try it for yourself, copy to a pendrive your ~/Maps directory.
> Now tar the dir (Maps.tar) and copy that singly file to the pendrive.
> 
> The result is something like 40sec compared to 6-7min.

   I cannot reproduce that huge time difference, I get more like +50 % than
+900 %:

		time (s)	space left (MB)
fs/blocksize	cp	tar	cp	tar
ext3/1024	242	162	405	404
reiserfs/1024	305	193	426	421
ext3/2048	208	143	397	404
reiserfs/2048	264	161	415	414
ext3/4096	193	131	376	398
reiserfs/4096	242	156	394	398

   I used the script below on my Freerunner with a USB card reader and the
512 MB uSD card that came with the Freerunner. I used the default journal size
for both ext3 and reiserfs. I guess you would want to reduce that.

#!/bin/sh

# Compare file system suitability for storing map tiles
# with that of a tar archive in terms of speed and
# space efficiency.

TILESOURCE=/usr/local/share/maptiles/openstreetmap
TESTDEV=/dev/sda2
TESTMOUNT=/mnt/flash

OPTS_ext3='-q -T small -m 0 -b 4096'
OPTS_reiserfs='-q -b 4096'

for fs in ext3 reiserfs; do
    eval 'FSOPTS=${OPTS_'${fs}':-}'

    for i in 1 2; do
	mkfs.${fs} ${FSOPTS} ${TESTDEV}
	mount ${TESTDEV} ${TESTMOUNT}
	START=$(date +%s)
	tar -cf ${TESTMOUNT}/OSM.tar ${TILESOURCE}
	df -h ${TESTMOUNT}
	umount ${TESTDEV}
	FINISH=$(date +%s)
	echo "Tar test ${i} on ${fs} took $((${FINISH} - ${START})) s."
    done

    for i in 1 2; do
	mkfs.${fs} ${FSOPTS} ${TESTDEV}
	mount ${TESTDEV} ${TESTMOUNT}
	START=$(date +%s)
	cp -a ${TILESOURCE} ${TESTMOUNT}/OSM
	df -h ${TESTMOUNT}
	umount ${TESTDEV}
	FINISH=$(date +%s)
	echo "Cp test ${i} on ${fs} took $((${FINISH} - ${START})) s."
    done
done


-- 
Rask Ingemann Lambertsen
Danish law requires addresses in e-mail to be logged and stored for a year



More information about the community mailing list