Tuesday, August 5, 2008

Controlling network migration traffic

When migration is configured to copy files to a network storage device, rather than to optical disc or tape, it can be preferred to limit the amount of bandwidth that OSVault uses. This writeup explains how to throttle network usage by migration.
For example, if you are migrating data from a remote office to a central site, and that office has a 7MBit/second (A)DSL link, then you uplink speed would probably be around 800Kbits/second. Running a migration from that office to a central site without some throttling might make response time unacceptable for email and web browsing at that office.
To throttle a migration, there is a configuration parameter, mig_delay, stored in /etc/sysconfig/osvault/mig_delay that sets an amount of time to pause in data transfers. The pause is executed after every block of data, where the default size of a block of data is 1MByte. The vault in mig_delay in in microseconds, so putting a vault of 1,000,000 (1 million) in mig_delay would cause migration to pause for 1 second after every 1MByte (default) of data transferred.
In recent releases of migration, you can set the default data block size with the -i option to migration. So, to set migration to send 64KBytes of data, then pause for one second, you would run migration with the -i 65536 option and set /etc/sysconfig/osvault/mig_delay to 1000000.