View topic - [QNX7.0_x86-generic] USB data Transfer speed

[QNX7.0_x86-generic] USB data Transfer speed

QNX7 release

[QNX7.0_x86-generic] USB data Transfer speed

Postby johnbevy » Tue Oct 22, 2019 1:58 pm

Hi Team,

We have checked the USB file transfer speed for 2.0 and 3.0 pen drives using 1 GB file and compared the same with Ubuntu OS. It seems speed is slow 2x in qnx compared to Ubuntu.

We have attached the image which is having usb data transfer speed details of QNX and Ubuntu (time format = Hrs:MM:Sec). We have use the same setup (hardware,file,pendirves) in both OS. We have used "time" command in qnx and ubuntu os measuring the transferring time.

We have started USB driver as like below,

Code: Select all
#---------------------------------------------------------------------------------------------------
# Starting USB host driver and services
#---------------------------------------------------------------------------------------------------
   display_msg "Starting USB host ..."
   io-usb-otg -d xhci -d ehci -d ohci -d uhci
   waitfor /dev/usb/io-usb-otg

   display_msg "Starting devb-umass ..."
   devb-umass cam pnp &

Is there any way to speed up the transferring speed in qnx ?

Also, we have checked " usb -vvv " command and found that 3.0 pendrive speed is detected as "HIGH" but its hould be SUPER. Please refer below text.
Code: Select all
USB 0 (XHCI) v1.10, v1.01 DDK, v0.00 HCD
    Control, Interrupt, Bulk(SG), Isoch(Stream), High speed, Super speed

Device Address             : 1
Upstream Host Controller   : 0
Upstream Device Address    : 0
Upstream Port              : 2
Upstream Port Speed        : Low
Vendor                     : 0x093a (PixArt)
Product                    : 0x2510 (USB Optical Mouse)
Device Release             : r1.00
USB Spec Release           : v2.00
Serial Number              : N/A
Class                      : 0x00 (Independent per interface)
Max PacketSize0            : 8
Languages                  : 0x0409 (English)
Current Frame              : 15067 (1024 bytes)
Configurations             : 1
  Configuration            : 1
    Attributes             : 0xa0 (Bus-powered, Remote-wakeup)
    Max Power              : 100 mA
    Interfaces             : 1
      Interface            : 0 / 0
        Class              : 0x03 (HID)
        Subclass           : 0x01 (Boot interface)
        Protocol           : 0x02 (Mouse)
        Endpoints          : Control + 1
          Endpoint         : 0
            Attributes     : Control
            Max Packet Size: 1x   8 bytes
          Endpoint         : 1
            Attributes     : Interrupt/IN
            Max Packet Size: 1x   4 bytes
            Interval       : 10 ms

Device Address             : 2
Upstream Host Controller   : 0
Upstream Device Address    : 0
Upstream Port              : 3
Upstream Port Speed        : Low
Vendor                     : 0x413c (Dell)
Product                    : 0x2107 (Dell USB Entry Keyboard)
Device Release             : r1.15
USB Spec Release           : v1.10
Serial Number              : N/A
Class                      : 0x00 (Independent per interface)
Max PacketSize0            : 8
Languages                  : 0x0409 (English)
Current Frame              : 15165 (1024 bytes)
Configurations             : 1
  Configuration            : 1
    Attributes             : 0xa0 (Bus-powered, Remote-wakeup)
    Max Power              : 100 mA
    Interfaces             : 1
      Interface            : 0 / 0
        Class              : 0x03 (HID)
        Subclass           : 0x01 (Boot interface)
        Protocol           : 0x01 (Keyboard)
        Endpoints          : Control + 1
          Endpoint         : 0
            Attributes     : Control
            Max Packet Size: 1x   8 bytes
          Endpoint         : 1
            Attributes     : Interrupt/IN
            Max Packet Size: 1x   8 bytes
            Interval       : 10 ms

Device Address             : 3
Upstream Host Controller   : 0
Upstream Device Address    : 0
Upstream Port              : 1
Upstream Port Speed        : High
Vendor                     : 0x03f0 (HP)
Product                    : 0x2340 (x705w)
Device Release             : r1.00
USB Spec Release           : v2.10
Serial Number              : E6006A48B2650F38
Class                      : 0x00 (Independent per interface)
Max PacketSize0            : 64
Languages                  : 0x0409 (English)
Current Frame              : 15195 (1024 bytes)
Binary Device Object Store :
  2.0 Extention Cap         :
    Attributes             : LPM
  SuperSpeed Cap           :
    Attributes             :
    Speeds Supported       : FULL, HI, SUPER
    U1 Device Exit Latency : 10us
    U2 Device Exit Latency : 255us
Configurations             : 1
  Configuration            : 1
    Attributes             : 0x80 (Bus-powered)
    Max Power              : 300 mA
    Interfaces             : 1
      Interface            : 0 / 0
        Class              : 0x08 (Mass Storage)
        Subclass           : 0x06 (SCSI)
        Protocol           : 0x50
        Endpoints          : Control + 2
          Endpoint         : 0
            Attributes     : Control
            Max Packet Size: 1x   64 bytes
          Endpoint         : 1
            Attributes     : Bulk/IN
            Max Packet Size: 1x   512 bytes
          Endpoint         : 2
            Attributes     : Bulk/OUT
            Max Packet Size: 1x   512 bytes



Please advise us to increase USB transfer speed.

Thanks,
John.
Attachments
Capture.PNG
(7.75 KiB) Not downloaded yet
johnbevy
Active Member
 
Posts: 23
Joined: Tue Oct 15, 2019 8:41 am

Re: [QNX7.0_x86-generic] USB data Transfer speed

Postby Tim » Tue Oct 22, 2019 6:10 pm

Hi John,

Are you sure that board has USB 3.0 support? I tried looking quickly at the links again and I only saw USB 2.0 mentioned. But they seem to have all their products in 1 PDF rather than 1 per product. So I can't be sure (I didn't spend much time).

As far as the time differences go, it may not be USB related. It could easily be the harddrive driver. The best way to check this is to use a RAM drive for read/writing to instead of the harddrive.

In my build file I create a 50 meg ram drive. You can create a much bigger one (if you have more than 1 gig of RAM you can create a 1 gig size one for example). Then copy to/from the RAM drive (/fs/ram) instead of the hard drive. That will take out the harddrive driver from the equation and give you just the pure USB transfer speed. You need to do the same in Linux of course to get meaningful comparison. At that point you know whether its a USB transfer issue or a harddrive transfer issue.

Tim
Tim
Senior Member
 
Posts: 1461
Joined: Wed Mar 10, 2004 12:28 am

Re: [QNX7.0_x86-generic] USB data Transfer speed

Postby johnbevy » Wed Oct 23, 2019 2:49 pm

Tim wrote:Hi John,

Are you sure that board has USB 3.0 support? I tried looking quickly at the links again and I only saw USB 2.0 mentioned. But they seem to have all their products in 1 PDF rather than 1 per product. So I can't be sure (I didn't spend much time).

As far as the time differences go, it may not be USB related. It could easily be the harddrive driver. The best way to check this is to use a RAM drive for read/writing to instead of the harddrive.

In my build file I create a 50 meg ram drive. You can create a much bigger one (if you have more than 1 gig of RAM you can create a 1 gig size one for example). Then copy to/from the RAM drive (/fs/ram) instead of the hard drive. That will take out the harddrive driver from the equation and give you just the pure USB transfer speed. You need to do the same in Linux of course to get meaningful comparison. At that point you know whether its a USB transfer issue or a harddrive transfer issue.

Tim


Hi Tim,

>>Are you sure that board has USB 3.0 support?

Yes, we have confirmed that our hardware has USB 3.0 support. In BIOS also, it is enabled.

It seems you have advised us to try the data transfer between RAM disk to USB instead of Harddisk to USB. So it should be faster enough compared to hard disk.

If so, we will try and let you know.

Shall we use below commands for creating RAM disk.

Code: Select all
devb-ram disk name=ram ram capacity=0,nodinit blk ramdisk=10m,cache=0,vnode=256


http://www.qnx.com/developers/docs/qnxc ... disks.html

Thanks,
John
johnbevy
Active Member
 
Posts: 23
Joined: Tue Oct 15, 2019 8:41 am

Re: [QNX7.0_x86-generic] USB data Transfer speed

Postby Tim » Wed Oct 23, 2019 9:25 pm

John,

That command should be fine. I use this command on my system.

devb-ram ram capacity=1 blk ramdisk=50m,cache=512k,vnode=256 &

The docs for devb-ram say the min cache size is 512 so I am not sure why they are specifying 0 and I didn't think capacity size could be 0 either. But I guess it can.

Note that the command is only creating a RAM drive of size 10Meg (mine is 50 Meg) so you'll want to increase that size so you can copy larger files.

I believe the hard disk speed in QNX is always going to be much slower than Linux because QNX is using the power safe file system which means slower disk speeds to ensure nothing gets lost. That's why I suggested testing with the RAM drive when measuring USB throughput (I used a RAM drive when I measured Ethernet throughput on my system).

Tim
Tim
Senior Member
 
Posts: 1461
Joined: Wed Mar 10, 2004 12:28 am

Re: [QNX7.0_x86-generic] USB data Transfer speed

Postby johnbevy » Fri Oct 25, 2019 11:45 am

Tim wrote:John,

That command should be fine. I use this command on my system.

devb-ram ram capacity=1 blk ramdisk=50m,cache=512k,vnode=256 &

The docs for devb-ram say the min cache size is 512 so I am not sure why they are specifying 0 and I didn't think capacity size could be 0 either. But I guess it can.

Note that the command is only creating a RAM drive of size 10Meg (mine is 50 Meg) so you'll want to increase that size so you can copy larger files.

I believe the hard disk speed in QNX is always going to be much slower than Linux because QNX is using the power safe file system which means slower disk speeds to ensure nothing gets lost. That's why I suggested testing with the RAM drive when measuring USB throughput (I used a RAM drive when I measured Ethernet throughput on my system).

Tim


Hi Tim,

We have checked the file transfer (file size : 300MB) by creating RAM disk for 350 MB in hard disk and found that speed is not proper. It seems there is an issue in USB transfer speed.

Command we used: devb-ram ram capacity=1 blk ramdisk=350m,cache=512k,vnode=256 &

Please find our observations as below,

USB 2.0 USB 3.0
USB to Ram disk 17 sec 12 sec
USB to hdd 18 sec 13 sec
Ram to USB 3 min 25 sec 4 min 14 sec
hdd to USB 3 min 31 sec 4 min 15 sec

It seems speed is not reduced while using RAM disk. Please advise us to increase the speed.

Thanks,
John
johnbevy
Active Member
 
Posts: 23
Joined: Tue Oct 15, 2019 8:41 am

Re: [QNX7.0_x86-generic] USB data Transfer speed

Postby Tim » Fri Oct 25, 2019 1:41 pm

Hi John,

How did you mount the RAM drive?
What command did you use to copy to/from the RAM drive?

I just want to make sure you actually were using the RAM drive.

Tim
Tim
Senior Member
 
Posts: 1461
Joined: Wed Mar 10, 2004 12:28 am

Re: [QNX7.0_x86-generic] USB data Transfer speed

Postby johnbevy » Fri Nov 01, 2019 10:46 am

Tim wrote:Hi John,

How did you mount the RAM drive?
What command did you use to copy to/from the RAM drive?

I just want to make sure you actually were using the RAM drive.

Tim

Hi Tim,

RAM disk created using below command,

devb-ram ram capacity=1 blk ramdisk=350m,cache=512k,vnode=256 &

>>How did you mount the RAM drive?

mkqnx6fs /dev/ram0
mount -t qnx6 -o sync=none /dev/ram0 /ram


>>What command did you use to copy to/from the RAM drive?

time cp -r /filename /home/Folder/filename

Thanks,
John
johnbevy
Active Member
 
Posts: 23
Joined: Tue Oct 15, 2019 8:41 am

Re: [QNX7.0_x86-generic] USB data Transfer speed

Postby Tim » Fri Nov 01, 2019 9:56 pm

This is your problem. Right now you are just copying to your harddrive (mounted as /home).

time cp -r /filename /home/Folder/filename


You mounted the ram drive as /ram. So you have to copy files to/from /ram.

time cp -r filename /ram

Assuming your current directory is the USB drive where 'filename' is located. You can of course path to filename in the cp command (if your USB drive is mounted as /usb you could do 'time cp -r /usb/filename /ram')

Tim
Tim
Senior Member
 
Posts: 1461
Joined: Wed Mar 10, 2004 12:28 am

Re: [QNX7.0_x86-generic] USB data Transfer speed

Postby johnbevy » Wed Nov 06, 2019 9:24 am

Tim wrote:This is your problem. Right now you are just copying to your harddrive (mounted as /home).

time cp -r /filename /home/Folder/filename


You mounted the ram drive as /ram. So you have to copy files to/from /ram.

time cp -r filename /ram

Assuming your current directory is the USB drive where 'filename' is located. You can of course path to filename in the cp command (if your USB drive is mounted as /usb you could do 'time cp -r /usb/filename /ram')

Tim


Hello Tim,

we just give an example for copy command.But we have used proper source and destination as /ram while doing copy from/to ram disk.

For example ,

data copied from /ram to Harddisk : time cp -r /ram/test.txt /home/temp

data copied to /ram from Harddisk : time cp -r /home/temp /ram

Thanks,
John
johnbevy
Active Member
 
Posts: 23
Joined: Tue Oct 15, 2019 8:41 am

Re: [QNX7.0_x86-generic] USB data Transfer speed

Postby Tim » Wed Nov 06, 2019 3:25 pm

Hi John,

I just ran a test on my QNX 7 machine. You can see the screenshot below.

In my test I copied a 30 meg file (roughly 1/10th the size of yours) to/from my RAM drive.

Copying TO the Ram drive took 0.03s real time. Essentially it was instant.

Copying TO the USB thumbdrive (an old 2 Gig USB2) took 14.04s real time.

If you multiply by 10 that comes out to <1 second to copy to RAM and 140 seconds (2 minutes, 20 seconds) to copy to an old USB2 thumbdrive.

Your performance is quite a bit worse than mine. It may be CPU speed (I have a pretty fast industrial rack mount machine running QNX 7). You may be best off contacting QNX about this if you need faster USB speed. They may know some ways to improve this since they wrote the code (including how to get your USB3 drive recognized).

Tim
Attachments
USBSpeed.jpg
(116.73 KiB) Not downloaded yet
Tim
Senior Member
 
Posts: 1461
Joined: Wed Mar 10, 2004 12:28 am


Return to QNX7

Who is online

Users browsing this forum: No registered users and 1 guest