External Disk has Optimal I/O Size: 256MiB-4Kib i.e. 256MiB less one Sector.
Four records of this size would transfer 1GiB-16KiB. Therefore doing Tests and Timings on the Transfer of Four Records. To this end, using dd to read Sectors of 512 bytes from Internal Drive, and second dd instance to write the Optimal Size O/P Record.
There are two ways of achieving this: either through use of a PIPE, or by using a FIFO file:
- In the Environment
Code: Select all
guest@porteus:~$ cat /proc/cmdline quiet from=/dev/sda10/tmp/iso/3.2.2/i586/Porteus-CINNAMON-v3.2.2-i586.iso copy2ram ramsize=25% noauto rootcopy=/dev/sda4/cin_rcp noswap nonetwork noload=002;003 3 guest@porteus:~$ free -m total used free shared buff/cache available Mem: 879 14 642 116 222 622 Swap: 0 0 0 guest@porteus:~$ df -h . Filesystem Size Used Avail Use% Mounted on aufs 220M 4.3M 216M 2% /
- FIFO Explained here: http://forum.porteus.org/viewtopic.php? ... 705#p49642
Code: Select all
root@porteus:/home/guest# time dd of=/dev/sdb2 bs=268431360 iflag=fullblock count=4 < <(dd if=/dev/sda) 4+0 records in 4+0 records out 1073725440 bytes (1.1 GB, 1.0 GiB) copied, 50.4661 s, 21.3 MB/s real 0m50.485s user 0m1.277s sys 0m4.411s
- PIPE
Code: Select all
root@porteus:/home/guest# time dd if=/dev/sda | dd of=/dev/sdb2 bs=268431360 iflag=fullblock count=4 4+0 records in 4+0 records out 1073725440 bytes (1.1 GB, 1.0 GiB) copied, 50.4014 s, 21.3 MB/s real 0m50.439s user 0m2.304s sys 0m8.782s
the time of the two subshell process, but still slower by 0.056 sec.
Estimation of Cloning Time
Time taken to Transfer 1GiB less 16KiB estimate at 50.5 secs. Therefore transfer of 233GiB less 4MiB comes to 233 x 50.5 = 11766.5 secs. This should work out at 3hr 16min 6sec.
CLONING
- ENVIRONMENT
Code: Select all
guest@porteus:~$ uname -rm 4.9.0-porteus i686 guest@porteus:~$ cat /proc/cmdline quiet from=/dev/sda10/tmp/iso/3.2.2/i586/Porteus-CINNAMON-v3.2.2-i586.iso copy2ram ramsize=25% noauto rootcopy=/dev/sda4/cin_rcp noswap nonetwork noload=002;003 3 # Non standard /rootcopy dir: /dev/sda4/cin_rcp # Modules activated during boot time: /memory/copy2ram/000-kernel.xzm /memory/copy2ram/001-core.xzm ISO=/mnt/sda10/tmp/iso/3.2.2/i586/Porteus-CINNAMON-v3.2.2-i586.iso guest@porteus:~$ free -m total used free shared buff/cache available Mem: 879 14 643 116 221 622 Swap: 644 0 644 guest@porteus:~$ /sbin/swapon -s Filename Type Size Used Priority /dev/sda11 partition 130044 0 -1 /dev/sda7 partition 530108 0 -2 guest@porteus:~$ sudo /sbin/swapoff /dev/sda11 guest@porteus:~$ sudo /sbin/swapoff /dev/sda7 guest@porteus:~$ free -m total used free shared buff/cache available Mem: 879 14 642 116 222 622 Swap: 0 0 0 guest@porteus:~$ df -h . Filesystem Size Used Avail Use% Mounted on aufs 220M 4.3M 216M 2% /
- STATISTICS
Code: Select all
root@porteus:/home/guest# time dd of=/dev/sdb2 bs=268431360 iflag=fullblock status=progress < <(dd if=/dev/sda conv=noerror,sync) 249909596160 bytes (250 GB, 233 GiB) copied, 11941.7 s, 20.9 MB/s 488397168+0 records in 488397168+0 records out 250059350016 bytes (250 GB, 233 GiB) copied, 11944.7 s, 20.9 MB/s 250059350016 bytes (250 GB, 233 GiB) copied, 11949.2 s, 20.9 MB/s 931+1 records in 931+1 records out 250059350016 bytes (250 GB, 233 GiB) copied, 11949.2 s, 20.9 MB/s real 199m9.261s user 5m40.106s sys 16m45.068s