ZFS: Enable filesystem compression

Home -> UNIX -> Solaris -> System administration

9598 views

From the computer of: qmchenry (337 recipes)
Created: Jun 03, 2006


1 comments:
View all comments

Add a comment

Add to:
Add to stumbleuponAdd to del.icio.usDigg itAdd to FURL

ZFS can compress data on filesystems. Some folks adamantly refuse to compress mounted filesystems citing performance issues. While not every situation is appropriate, compression can increase system performance by improving IO at the cost of CPU. In most cases, disk IO, more than CPU, is rate determining. This recipe descibes turning on ZFS compressionand checking its compression ratio status.

A great use for ZFS compression is a filesystem containing logs. A busy webserver can generate massive logfiles. Enabling compression for log files makes sense because they are not heavy on read operations, text in logs compresses well, and substantially more log data can be stored online and accessible.

To enable compression for the filesystem /techrx/logs, use the zfs command:

zfs set compression=yes techrx/logs


Want to know how well the compression is working? Check it using this command:

zfs get compressionratio techrx/logs

Subscribe to the Tech-Recipes Newsletter

You can get tips like this delivered in your email every week!

Enter your Email

We will never, ever sell your email address or spam you.




1 Recipe comments: View comments

ZFS: Enable filesystem compression - correct syntax by theuser



Related recipes:

  Solaris: Mount filesystem with UFS logging enabled
  ZFS: reserve space for filesystem
  Solaris: unmounting a filesystem with umount
  Automatically answer yes to all fsck questions
  ZFS: Set or change the mount point of a filesystem
  Check filesystem integrity
  ZFS: Destroy or remove one or more filesystems
  ZFS: Create a writable clone of a filesystem
  Solaris 10: Create multi-terabyte UFS filesystem
  ZFS: Create a new filesystem from an existing pool

 

Sponsored links

 

Login

Nickname

Password

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.