Stuart Anderson wrote:
> On Mon, Apr 14, 2008 at 09:59:48AM -0400, Luke Scharf wrote:
>   
>> Stuart Anderson wrote:
>>     
>>> As an artificial test, I created a filesystem with compression enabled
>>> and ran "mkfile 1g" and the reported compressratio for that filesystem
>>> is 1.00x even though this 1GB file only uses only 1kB.
>>>  
>>>       
>> ZFS seems to treat files filled with zeroes as sparse files, regardless 
>> of whether or not compression is enabled.  Try "dd if=/dev/urandom 
>> of=1g.dat bs=1024 count=1048576" to create a file that won't exhibit 
>> this behavior.  Creating this file is a lot slower than writing zeroes 
>> (mostly due to the speed of the urandom device), but ZFS won't treat it 
>> like a sparse file, and it won't compress very well either.
>>     
>
> However, I am still trying to reconcile the compression ratio as
> reported by compressratio vs the ratio of file sizes to disk blocks
> used (whether or not ZFS is creating sparse files).
>   

Can you describe the data you're storing a bit?  Any big disk images?

-Luke

_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to