QNX 6.3.2 USB Memorex 1G memory stick write performance.

Copying a few 12MB size files on empty USB memory stick formatted as an qnx file system I experience write performance slow down. To copy those files I use cp command:
The full command is: time cp –V t? /fs/hd10-qnx4-1/
The first two files are copied with speed over 1000kb/s the rest of the files are copied with speed around 500kb/s. Unplugging and plugging the memory stick again and repeat the same copy command will increase the writing speed for the first 2 files and after that the speed goes again to 500kb/s.

I have tested the stick under Windows XP with the same files and did not notice any copy speed slow down for all of them.

It is a known issue ? or what can be done to prevent it?

The system pidin output :
VG# pidin A
pid Arguments
1 /opt/QNXsdk/target/qnx6/x86/boot/sys/procnto
2 pci-bios
3 devb-eide eide master=udma=off,mdma=off,slave=udma=off,mdma=off blk automount=hd0t77:/:qnx4:ro,automount=hd0t78:/cflash:qnx4:ro
1273860 devc-ser8250 -F -b 115200 -F -b 115200
8197 devc-pty -n 6
8198 pipe
8199 mqueue
8200 devc-con -n1
8201 sh
8202 io-audio
8203 devc-par
1302540 login
61453 devb-ram ram capacity=40960 blk automount=/dev/hd2t77:/ramdisk:qnx4
73742 slogger -s 4 -l /tmp/syslog
73743 dumper -d /tmp
90128 io-net -d speedo -p tcpip
430097 inetd
188434 io-usb -duhci -dehci
200723 devu-prn
200724 umass-enum -v -h hd -d /dev -m /fs/hd -f /etc/umass-enum.cfg
1294357 tinit
229398 slinger -c -e -s
1327127 pidin A
970776 devb-umass cam quiet blk cache=50k,auto=none,devdir=/dev cdrom name=cdumass1 disk name=hd1 umass priority=21,vid=0x12f7,did=0x1a00,busno=2,devno=1
454687 in.telnetd
360482 dhcp.client -I 15 -i en0

The usb command is:

VG# usb -vv
USB 0 (UHCI) v1.10, v1.01 DDK, v1.01 HCD
Control, Interrupt, Bulk, Isoch, Low speed, Full speed

USB 1 (UHCI) v1.10, v1.01 DDK, v1.01 HCD
Control, Interrupt, Bulk, Isoch, Low speed, Full speed

Device Address : 1
Upstream Host Controller : 1
Upstream Device Address : 0
Upstream Port : 0
Upstream Port Speed : Full
Vendor : 0x10c4 (Silicon Labs)
Product : 0xea60 (CP2102 USB to UART Bridge Controller)
Device Release : r1.00
USB Spec Release : v1.10
Serial Number : 0001
Class : 0x00 (Independant per interface)
Max PacketSize0 : 64
Languages : 0x0409 (English)
Configurations : 1
Configuration : 1
Attributes : 0x80 (Bus-powered)
Max Power : 100 mA
Interfaces : 1
Interface : 0 / 0 (CP2102 USB to UART Bridge Controller)
Class : 0xff (Vendor-specific)
Subclass : 0x00
Protocol : 0x00

USB 2 (EHCI) v1.10, v1.01 DDK, v1.01 HCD
Control, Interrupt, Bulk, Full speed, High speed

Device Address : 1
Upstream Host Controller : 2
Upstream Device Address : 0
Upstream Port : 0
Upstream Port Speed : High
Vendor : 0x12f7 (Memorex )
Product : 0x1a00 (TD Classic 003B )
Device Release : r1.00
USB Spec Release : v2.00
Serial Number : 077406270C5A
Class : 0x00 (Independant per interface)
Max PacketSize0 : 64
Languages : 0x0409 (English)
Configurations : 1
Configuration : 1
Attributes : 0x80 (Bus-powered)
Max Power : 200 mA
Interfaces : 1
Interface : 0 / 0
Class : 0x08 (Mass Storage)
Subclass : 0x06 (SCSI)
Protocol : 0x50

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
Josh

We actually have the same problem.
I think the first files go into some kind of “cache”.
It is even more extrem, if you copy on USB1.1, you start up with about 12k and end up with 0.5k.

At what speed does XP transfer the files?

A test using your own program to do the writing, where you open the USB drive with DSYNC might be informative.

First the file go in the cache, when the cache is full or the data is old enough to flush, it goes to the device. Write speed of flash devices changes from model to model or even depend if blocks need to be erase/recycle to write data in.

The file size is 12MB and performance degradate after third copy. i do not think so that cache is a issue here.

There is a nother test i run with the same file size:

cp -V t1 /dev/hd10t77 and performance does not change. It stays around 1400kb/s. The /dev/hd10t77 is a QNX partition of that Memorex stick.

Josh

The Xp transfers the files with the speed 1887 kb/s

That suggests either a file system problem, or even a driver problem. If you know how to do a trace, you might be able to find out where the extra time is going.

Or it might be that the QNX driver isn’t as optimized has the windows one.

Or it might be QNX isn’t setting USB 2 mode.

USB 2 mode won´t be activated automatically if you have plugged in USB-Mouse/Keyboard on some chips (at least at ours ^^)