tar+/dev/null weirdness
T. Horsnell
tsh at mrc-lmb.cam.ac.uk
Thu May 5 12:58:58 UTC 2005
>>On Wed, 2005-05-04 at 12:36, T. Horsnell wrote:
>>
>>> I'm trying to investigate tar speeds over NFS. I normally test
>>> tar speeds by 'tar cf /dev/null somefilesystem' but if the filesystem
>>> is an NFS one, using /dev/null as the output file is resulting in
>>> impossible tar speeds. If the tar output is directed to a file
>>> rather than to /dev/null, all is well. Does tar do some sort
>>> of magic if its tarring NFS stuff to /dev/null? For example:
>>
>>GNU tar recognizes /dev/null as something magic whether or not
>>the files are on NFS and it skips reading the actual data. This
>>feature is used by the amanda backup program to quickly obtain
>>estimates of full vs. incremental backup sizes. If you want
>>to force the files to be read, try 'tar cf - somedir >/dev/null'
>>instead.
>
>Aha. Many thanks!
>T.
Oops, I spoke too soon...
On my system:
[root at ls1 ~]$ df -k /testnfs
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdd1 35280616 11836988 21651476 36% /testnfs
[root at ls1 ~]$ time tar cf - -C /testnfs . > /dev/null
0.074u 0.000s 0:00.07 100.0% 0+0k 0+0io 0pf+0w
[root at ls1 ~]$ time tar cf /dev/null -C /testnfs .
0.075u 0.000s 0:00.07 100.0% 0+0k 0+0io 0pf+0w
[root at ls1 ~]$ df -k /nfs/server1/www
Filesystem 1K-blocks Used Available Use% Mounted on
server1:/www 35278544 11923576 21562920 36% /nfs/server1/www
[root at ls1 ~]$ time tar cf - -C /nfs/server1/www . > /dev/null
0.303u 1.739s 0:08.73 23.2% 0+0k 0+0io 0pf+0w
[root at ls1 ~]$ time tar cf /dev/null -C /nfs/server1/www .
0.294u 1.333s 0:16.00 10.1% 0+0k 0+0io 0pf+0w
[root at ls1 ~]$ tar --version
tar (GNU tar) 1.14
Copyright (C) 2004 Free Software Foundation, Inc.
This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute it under the terms of the GNU General Public License;
see the file named COPYING for details.
Written by John Gilmore and Jay Fenlason.
Les, is this *meant* to work as you say, or is it something
which just happened to work (once upon a time)? If its meant
to work, perhaps I should contact the Gnutar maintainers...
Cheers,
Terry.
>
>
>>
>>--
>> Les Mikesell
>> les at futuresource.com
>>
>>
>>--
>>fedora-list mailing list
>>fedora-list at redhat.com
>>To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
>>
>
>--
>fedora-list mailing list
>fedora-list at redhat.com
>To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
>
More information about the users
mailing list