Skip Navigation Links | |
Exit Print View | |
System Administration Guide: Devices and File Systems Oracle Solaris 10 8/11 Information Library |
1. Managing Removable Media (Overview)
2. Managing Removable Media (Tasks)
3. Accessing Removable Media (Tasks)
4. Writing CDs and DVDs (Tasks)
5. Managing Devices (Overview/Tasks)
6. Dynamically Configuring Devices (Tasks)
7. Using USB Devices (Overview)
9. Using InfiniBand Devices (Overview/Tasks)
11. Administering Disks (Tasks)
12. SPARC: Setting Up Disks (Tasks)
13. x86: Setting Up Disks (Tasks)
14. Configuring Oracle Solaris iSCSI Targets and Initiators (Tasks)
15. The format Utility (Reference)
16. Managing File Systems (Overview)
17. Creating and Mounting File Systems (Tasks)
18. Using The CacheFS File System (Tasks)
High-Level View of Using the CacheFS File System (Task Map)
Overview of the CacheFS File System
How a CacheFS File System Works
CacheFS File System Structure and Behavior
Creating and Mounting a CacheFS File System (Task Map)
Mounting a File System in the Cache
How to Mount a CacheFS File System (mount)
How to Mount a CacheFS File System (/etc/vfstab)
How to Mount a CacheFS File System (autofs)
Maintaining a CacheFS File System (Task Map)
Maintaining a CacheFS File System
Modifying a CacheFS File System
How to Display Information About a CacheFS File System
Consistency Checking of a CacheFS File System
Consistency Checking on Demand
How to Specify Cache Consistency Checking on Demand
How to Delete a CacheFS File System
How to Check the Integrity of a CacheFS File System
Packing a Cached File System (Task Map)
How to Pack Files in the Cache
How to Display Packed Files Information
How to Pack Files in the Cache With a Packing List
Unpacking Files or Packing Lists From the Cache
How to Unpack Files or Packing Lists From the Cache
Troubleshooting cachefspack Errors
Collecting CacheFS Statistics (Task Map)
19. Configuring Additional Swap Space (Tasks)
20. Checking UFS File System Consistency (Tasks)
21. UFS File System (Reference)
22. Backing Up and Restoring UFS File Systems (Overview)
23. Backing Up UFS Files and File Systems (Tasks)
24. Using UFS Snapshots (Tasks)
25. Restoring UFS Files and File Systems (Tasks)
26. UFS Backup and Restore Commands (Reference)
27. Copying Files and File Systems (Tasks)
Collecting CacheFS statistics enables you to do the following:
Determine an appropriate cache size.
Observe the performance of the cache.
These statistics help you determine the trade-off between your cache size and the desired performance of the cache.
The following table describes the CacheFS statistics commands.
|
Note - You can use the CacheFS statistics commands from any directory. You must be superuser to use the cachefswssize command.
The CacheFS statistics begin accumulating when you create the log file. When the work session is over, stop the logging by using the cachefslog -h command, as described in How to Stop CacheFS Logging.
Before using the CacheFS statistics commands, you must do the following:
Set up your cache by using the cfsadmin command.
Decide on an appropriate length of time to allow statistical information to collect in the log file you create. The length of time should equal a typical work session. For example, a day, a week, or a month.
Select a location or path for the log file. Ensure that sufficient space to allows for the growth of the log file. The longer you intend to allow statistical information to collect in the log file, the more space you need.
Note - The following procedures are presented in a recommended order. This order is not required.
$ cachefslog -f log-file-path /mount-point
Sets up logging.
Specifies the location of the log file. The log file is a standard file you create with an editor, such as vi.
Designates the mount point (CacheFS file system) for which statistics are being collected.
$ cachefslog /mount-point
Example 18-13 Setting Up CacheFS Logging
The following example shows how to set up the /var/tmp/samlog log file to collect statistics about the /home/sam directory.
$ cachefslog -f /var/tmp/samlog /home/sam /var/tmp/samlog: /home/sam
$ cachefslog /mount-point
where /mount-point specifies the CacheFS file system for which you want to view the statistics.
You can also use the cachefslog command with no options to locate a log file for a particular mount point.
Example 18-14 Locating the CacheFS Log File
The following example shows what you would see if a log file has been set up. The location of the log file is /var/tmp/stufflog.
$ cachefslog /home/stuff /var/tmp/stufflog: /home/stuff
The following example shows that no log file has been set up for the specified file system.
$ cachefslog /home/zap not logged: /home/zap
Use the cachefslog -h option to stop logging.
$ cachefslog -h /mount-point
The following example shows how to stop logging on /home/stuff.
$ cachefslog -h /home/stuff not logged: /home/stuff
If you get a system response other than the response specified here, you did not successfully stop logging. Determine if you are using the correct log file name and mount point.
You might want to check if you need to increase the size of the cache. Or, you might want to determine the ideal cache size based on your activity since you last used the cachefslog command for a particular mount point.
# cachefswssize log-file-path
For more information, see cachefswssize(1M).
Example 18-15 Viewing the Working Set (Cache) Size
In the following example, the end size is the size of the cache at the time you issued the cachefswssize command. The high water size is the largest size of the cache during the timeframe in which logging occurred.
# cachefswssize /var/tmp/samlog /home/sam end size: 10688k high water size: 10704k / end size: 1736k high water size: 1736k /opt end size: 128k high water size: 128k /nfs/saturn.dist end size: 1472k high water size: 1472k /data/abc end size: 7168k high water size: 7168k /nfs/venus.svr4 end size: 4688k high water size: 5000k /data end size: 4992k high water size: 4992k total for cache initial size: 110960k end size: 30872k high water size: 30872k
The following table explains the terminology that is displayed in the statistics output for CacheFS file systems.
Table 18-2 CacheFS Statistics Terminology
|
View the statistics with the cachefsstat command. You can view the statistics at any time. For example, you do not have to set up logging in order to view the statistics.
$ cachefsstat /mount-point
where /mount-point specifies the CacheFS file system for which you want to view the statistics.
If you do not specify the mount point, statistics for all mounted CacheFS file systems will be displayed.
Example 18-16 Viewing CacheFS Statistics
This example shows how to view statistics on the cached file system, /home/sam.
$ cachefsstat /home/sam cache hit rate: 73% (1234 hits, 450 misses) consistency checks: 700 (650 pass, 50 fail) modifies: 321 garbage collection: 0