Intel Cache Acceleration Software (Intel CAS) for Linux* v2.8 (GA) Quick Start Guide August 2015 Revision 001 Order Number: 332551-001US
Intel may make changes to specifications and product descriptions at any time, without notice. Designers must not rely on the absence or characteristics of any features or instructions marked "reserved" or "undefined". Intel reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them. The information here is subject to change without notice. Do not finalize a design with this information. No computer system can provide absolute security. Requires an enabled Intel processor, enabled chipset, firmware and/or software optimized to use the technologies. Consult your system manufacturer and/or software vendor for more information. Intel technologies features and benefits depend on system configuration and may require enabled hardware, software or service activation. Performance varies depending on system configuration. Check with your system manufacturer or retailer or learn more at intel.com. The products described in this document may contain design defects or errors known as errata which may cause the product to deviate from published specifications. Current characterized errata are available on request. Contact your local Intel sales office or your distributor to obtain the latest specifications and before placing your product order. Copies of documents which have an order number and are referenced in this document, or other Intel literature, may be obtained by calling 1-800-548-4725, or go to: http://www.intel.com/design/literature.htm All products, computer systems, dates, and figures specified are preliminary based on current expectations, and are subject to change without notice. Intel and the Intel logo are trademarks of Intel Corporation in the U.S. and/or other countries. *Other names and brands may be claimed as the property of others. Copyright 2015 Intel Corporation. All rights reserved. Quick Start Guide August 2015 2 332551-001US
1 Overview The following is a summary of the setup steps in this guide: 1. Download and execute the installer../installer-intel-cas-xx.xx.xx.xxxxxxxx.run 2. Start cache in write-back mode on selected caching device. casadm --start-cache --cache-device /dev/nvme0n1 --force --cache-mode wb 3. Prepare a file system on the device to be accelerated. mkfs.ext4 b 4096 /dev/sdb 4. Accelerate the device. casadm --add-core --cache-id 1 --core-device /dev/sdb 5. Mount newly created caching device to selected mount point. mount /dev/intelcas1-1 /mnt/cache_fs Set up is complete. All reads and writes to the mount point are cached by Intel Cache Acceleration Software. August 2015 Quick Start Guide 332551-001US 3
2 Installing and Configuring NOTE: Back up all data before beginning Intel Cache Acceleration Software setup! To set up Intel Cache Acceleration Software (Intel CAS) for Linux, do the following: 2.1 Installing Intel CAS 1. Download the Intel CAS installer to a directory on the target Linux server. The installer file name is in the format: installer-intel-cas-xx.xx.xx.xxxxxxxx.run. 2. Login to the system as root 3. Navigate to the directory that contains the Intel CAS installation file 4. Make the installer file executable: # chmod u+x installer-intel-cas-xx.xx.xx.xxxxxxxx.run 5. Launch the installer: #./installer-intel-cas-xx.xx.xx.xxxxxxxx.run 6. Read and accept the end-user license agreement (EULA) Expected output of the installation: Installing kernel module... Module intelcas loaded successfully! Setting module autoload Installation successful! 2.2 Starting the Cache 1. Choose the device or partition you would like to use as a cache. For example, /dev/nvme0n1, /dev/sdc1, etc. 2. Start a cache in write-back mode on the selected device or partition: # casadm --start-cache --cache-device /dev/nvme0n1 --force --cache-mode wb NOTES: The --force option will force overwrite of all existing data on the device The --cache-mode option determines the desired caching mode. You can choose wt for writethrough (default), wb for write-back, or wa for write-around. When using a partition of a device as cache space, make sure the partition is aligned to the device s physical sector size for best performance. Quick Start Guide August 2015 4 332551-001US
2.3 Preparing the Device for Acceleration 1. Choose the device you would like to accelerate. For example, /dev/sdb 2. If that device does not already have a file system, create one: EXAMPLES: # mkfs b 4096 t ext3 /dev/sdb # mkfs.ext4 b 4096 /dev/sdb # mkfs.xfs f i size=2048 b size=4096 s size=4096 /dev/sdb NOTES: Supported file systems include ext3, ext4, and XFS. The accelerated device s file system block size should match the partition logical block size, and the partition should be aligned to the device s physical sector size, for best performance. 2.4 Accelerating the Device 1. Add the selected device to the running cache: # casadm --add-core --cache-id 1 --core-device /dev/sdb 2. Check that a new device was successfully created that represents the cache pair: # ls /dev/intelcas* Expected output: intelcas1-1 2.5 Mounting the Accelerated Device 1. Create a mount point. For example: # mkdir /mnt/cache_fs 2. Mount the cached filesystem: # mount /dev/intelcas1-1 /mnt/cache_fs NOTE: You must repeat sections 1.2-1.5 each time the system is restarted, or add those commands to your system startup scripts to automate the steps. See the Intel Cache Acceleration Software (Intel CAS) for Linux Administrator Guide, Sections 5.2 and 6.4.1 for more information. Set up is complete. All reads and writes to the mount point are cached by Intel Cache Acceleration Software. August 2015 Quick Start Guide 332551-001US 5
3 Optimizing & Troubleshooting 3.1 How big of a cache do I need? Understanding your workload and your data is key to understanding how big of a cache you will need. Caching 100% of your data will yield the best results in all cases. However, if your workload has localization of data access, you may get near the optimal performance using a smaller cache size. Cache statistics can give you a better idea of whether your cache is sized appropriately for your workload. See section 2.2 below for more information. If your workload consists of many files that are expected to be accessed repeatedly, as well as many files that are expected to be accessed rarely, you may further optimize for reducing the necessary cache size by creating an include list to specifically cache only those files and/or directories that will be accessed repeatedly, thus avoiding cache pollution. See the Intel Cache Acceleration Software (Intel CAS) for Linux Administrator Guide, Section 8.9, for more information 3.2 How effective is my caching? The cache hit rate can be used as an indicator of the effectiveness of your caching. Understanding cache occupancy and cache hit rates can help you determine whether you should use a different caching mode to improve performance, or whether you need to allocate a larger cache to hold more hot data, or whether caching may not be beneficial to the performance of your particular workload. Issue the following command to examine the cache statistics, and the Intel Cache Acceleration Software (Intel CAS) for Linux* Administrator Guide, Chapter 7, Monitoring Intel CAS for more information: # casadm --stats --cache-id 1 3.3 What if installation fails? Please ensure that you are using a supported OS distribution. See the Intel Cache Acceleration Software (Intel CAS) for Linux* Administrator Guide, Section 2.1, Supported platforms for a list of supported distributions and kernels. Quick Start Guide August 2015 6 332551-001US