From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,4da5e030e6766a04,start X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-11-15 09:28:06 PST Path: nntp.gmd.de!xlink.net!howland.reston.ans.net!news.sprintlink.net!pipex!uknet!news.cranfield.ac.uk!xdm039.ccc.cranfield.ac.uk!ccprl From: ccprl@xdm039.ccc.cranfield.ac.uk (Peter Lister) Newsgroups: comp.unix.osf.osf1 Subject: Sparse files take up more space when copied Date: 15 Nov 1994 15:11:11 GMT Organization: Cranfield University, UK Distribution: world Message-ID: <3aaj2f$qql@xdm084.ccc.cranfield.ac.uk> Reply-To: p.lister@cranfield.ac.uk NNTP-Posting-Host: xdm039.ccc.cranfield.ac.uk 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. ---