I''ve been comparing zfs send and receive to cp, cpio etc.. for a customer data migration and have found send and receive to be twice as slow as cp or cpio. Im migrating zfs data from one array to a temporary array on the same server, its 2.3TB in total, and was looking for the fastest way to do this. Is there a recommended way to do this ? -- This message posted from opensolaris.org
chris bannayan wrote:> I''ve been comparing zfs send and receive to cp, cpio etc.. for a customer data migration > and have found send and receive to be twice as slow as cp or cpio.Did you run sync after the cp/cpio finished to ensure the data really is on disk ? cp and cpio do not do synchronus writes. A zfs recv isn''t strictly speaking a synchronus write either but it is much closer to one in how some of the data is written out (note I''m purposely being vague here so I don''t have to go into the details of how zfs recv actually works). What else is happening on the recv pool ? What was the exact command line used in all three cases ? How was the time measured ? Were you sending a lot of snapshots as well ? cp/cpio don''t know anything about ZFS snapshots (and shouldn''t). -- Darren J Moffat
Im measuring time by using the time command in the command arguments ie: time cp * / etc.. for copy i just used time cp pool/fs1/* /newpool/fs1 etc... for cpio i used, time find /pool/fs1 |cpio -pdmv /newpool/fs1 for zfs i ran a snapshot fist then, time zfs -R send snapshot| zfs receive -F -d newpool nothing else is running on the pool, Im testing it by just copying multiple 100MB tar files I also ran and zfs send -R snapshot > /sec/back, this command took the same time as the cp and cpio, its only when combining the receive that i get slow responce. -- This message posted from opensolaris.org