From: ccprl@xdm039.ccc.cranfield.ac.uk (Peter Lister)
Subject: Sparse files take up more space when copied
Date: 15 Nov 1994 15:11:11 GMT [thread overview]
Message-ID: <3aaj2f$qql@xdm084.ccc.cranfield.ac.uk> (raw)
Sorry if this is a newbie question, but the FAQ doesn't seem to touch it.
I moved a user from one file system to another (both ufs, not advfs or afs). This guy has several large files in his home dir generated by SDRC I-DEAS, a big CAD/CAM package. The amount of space occupied by the copied directory hierarchy occupied something like 50% more space as reported by du. On further inspection, individual I-DEAS data files all took up about 50-100% more space in the copy than the original. I tried test copies with cp, tar and dd. All took up the same increased amount of space according to du. The copies were the identical length according to ls -l and had identical checksums according to sum.
I tarred the directory and gzip managed 94% compression on the tar file (yes, that's right, reduced the size by 94%), so these files are obviously pretty sparse. It would seem that I-DEAS can take advantage of some pretty good file compression in the OSF1 filesystem when it writes it's files, but tar,cp,etc don't manage this. My guess is that I-DEAS uses mmap(3) and that that virtual memory paging writes the file blocks more efficiently than stream I/O as used by cp, tar, etc.
Anyone care to comment? The obvious next question is to ask whether there is a way to get the copies to "compress" empty/sparse blocks like this.
--
Peter Lister Email: p.lister@cranfield.ac.uk
Computer Centre, Cranfield University Voice: +44 1234 754200 ext 2828
Cranfield, Bedfordshire MK43 0AL UK Fax: +44 1234 751814
--- First law of troubleshooting.... never overlook the obvious. ---
next reply other threads:[~1994-11-15 15:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-11-15 15:11 Peter Lister [this message]
1994-11-15 16:08 ` Sparse files take up more space when copied Peter da Silva
1994-11-15 16:30 ` Peter da Silva
1994-11-16 0:56 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
1994-11-16 0:08 ` John Hascall
1994-11-17 20:35 ` Peter da Silva
1994-11-15 19:52 ` Torbj|rn Lindgren
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox