Tuning Linux for USB Duplication

Hopefully this will turn out to be more of a general Linux question for the Suse bods…

I have created a USB duplicator using OpenSuse 11.2, and have applied all current updates.

My need is to wrap up a USB duplication system comprising 245 USB2.0 ports for this number of flash drives. I want to be able to copy-append files of anything up to (typically) 30MB to all other files already on the drives, working from a single source drive/directory.

The USB interfaces comprise the following…

5 x Cambrionix 49-port USB2.0 hubs (datasheet at: http://www.cambrionix.com/home/CBRX49PH003A/49-Port_USB_Hub_Flier_Rev3-06.pdf), where each hub consists of one 7-port hub controller fanning out to 7 x 7-port hub controllers (= 49 ports).

The 2.8GHz dual-core PC has five PCI (133MB/s bus) slots, each slot equipped with a USB card containing a single USB2.0 host controller. Only one port is used on each card, thereby ensuring one host-controller dedicated to each 49-port hub.

To overcome boot-time mounting issues (automounting having severe problems mounting all controllers and flash devices in different linux versions), I have set Gnome to NOT auto-mount as this is achieved by simple Bash script after boot-time. This works very reliably, with all 245 flash drives mounted to custom-named shares in /media/…

I have a custom-coded Linux application which initiates a file copy from a source directory to all 245 flash drives.

The question is this…

When the application is run, the source file(s) will reliably copy to all devices, though only to (perceived from flash dongle LEDs) 7 drives at a time. This may be coincidential to the individual hub controllers feeding each batch of seven ports. Timing the entire copy process of (say) a single 12MB file I had to-hand took two minutes, equating to a total sustained copy data rate of roughly 24MB/s.

As the PCI generally offers a 133MB/s bandwidth (suggesting considerable bandwidth in-hand), what tweaks might I make to Linux to speed up this process? For example, if I could achieve 24MB/s (or a minimum of 10MB/s) simultaneously to each hub, then this would be acceptable.

Is there a default assumption by linux of only a single hub controller to communicate with? Is this limitation governed by the application buffer or dirty buffer? Will I realise benefit by invoking multiple threading from the duplicator application, creating (say) one thread per 49-port hub? Also, should I always use a RAM drive as the copy source?

As I say, the application and system is working very reliably, but much slower than what I believe should be theoretically achievable with the current setup. Hopefully a well-versed Suse/Linux bod can point me in the right direction, though please be aware that I am really rather new to Linux.

With thanks in advance.

SC

Tough without see the code. I’d say run in multiple threads. If you are running in a single thread you can only address one copy at a time.

You can invoke a new process by putting & at the end of the command.

You also do realize that 133MB/s is a theoretical number. I doubt you will ever actually achieve it. But you should be able to do better then 24MB/s