Re: tar+/dev/null weirdness

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>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@ls1 ~]$ df -k /testnfs
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sdd1             35280616  11836988  21651476  36% /testnfs
[root@ls1 ~]$ time tar cf - -C /testnfs . > /dev/null
0.074u 0.000s 0:00.07 100.0%    0+0k 0+0io 0pf+0w
[root@ls1 ~]$ time tar cf /dev/null -C /testnfs .
0.075u 0.000s 0:00.07 100.0%    0+0k 0+0io 0pf+0w

[root@ls1 ~]$ df -k /nfs/server1/www
Filesystem           1K-blocks      Used Available Use% Mounted on
server1:/www          35278544  11923576  21562920  36% /nfs/server1/www
[root@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@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@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@xxxxxxxxxxxxxxxx
>>
>>
>>-- 
>>fedora-list mailing list
>>fedora-list@xxxxxxxxxx
>>To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
>>
>
>-- 
>fedora-list mailing list
>fedora-list@xxxxxxxxxx
>To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
>


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux