diff --git a/doc/cache-stats.txt b/doc/cache-stats.txt new file mode 100644 index 0000000..cfe8c10 --- /dev/null +++ b/doc/cache-stats.txt @@ -0,0 +1,74 @@ +RAPIDDISK-CACHE STATISTICS +--------------------------- + + +*** Normal output *** + +0 78156289 rapiddisk-cache stats: + reads(1108), writes(297349) + cache hits(699), replacement(134), write replacement(146086) + read invalidates(2), write invalidates(34) + uncached reads(7), uncached writes(13328) + disk reads(409), disk writes(297349) + cache reads(699), cache writes(284423) + + +*** JSON output *** + +{ + "statistics": [ + { + "cache_stats": [ + { + "device": "rc-wt_sdf", + "reads": 1108, + "writes": 297349, + "cache_hits": 699, + "replacement": 134, + "write_replacement": 146086, + "read_invalidates": 2, + "write_invalidates": 34, + "uncached_reads": 7, + "uncached_writes": 13328, + "disk_reads": 409, + "disk_writes": 297349, + "cache_reads": 699, + "cache_writes": 284423 + } + ] + } + ] +} + + +device: RapidDisk-Cache device name. + +reads: Number of total reads to the RapidDisk-Cache front-node device. That means total reads that will hit both the cache and backing store devices. + +writes: Number of total writes to the RapidDisk-Cache front-node device. That means total writes that will hit both the cache and backing store devices. + +cache_hits: Number of read/write operations that hit the cache device. + +replacement: Follows a cache miss, where blocks are replaced into the cache device. + +write_replacement: Writes replaced out of the cache. Will be "0" in WA mode. + +read_invalidates: Invalidated overlapping read cache blocks. + +write_invalidates: Invalidated overlapping write cache blocks. + +uncached_reads: Backing store reads that were not cached. + +uncached_writes: Backing store writes that were not cached. + +disk_reads: Reads from the backing store device. + +disk_writes: Writes to the backing store device. + +cache_reads: Reads from the cache device. + +cache_writes: Writes to the cache device. + + + +* For details on dm-writecache stats, please refer to https://www.kernel.org/doc/html/latest/admin-guide/device-mapper/writecache.html. diff --git a/module/rapiddisk.txt b/module/rapiddisk.txt index 7d6c8c7..73f56d0 100644 --- a/module/rapiddisk.txt +++ b/module/rapiddisk.txt @@ -15,7 +15,7 @@ max_sectors: Maximum sectors (in KB) for the request queue. (Default = 127) (int nr_requests: Number of requests at a given time for the request queue. (Default = 128) (int) rd_nr: Maximum number of RapidDisk devices to load on insertion. (Default = 0) (int) rd_size: Size of each RAM disk (in KB) loaded on insertion. (Default = 0) (int) -rd_max_nr: Maximum number of RAM Disks. (Default = 128) (int) +rd_max_nr: Maximum number of RAM Disks. (Default = 1024) (int) RapidDisk-Cache @@ -29,15 +29,18 @@ RapidDisk --------- It is advised to utilize the userland utility, rapiddisk, but this is essentially what is written to the /sys/kernel/rapiddisk/mgmt sysfs file to manage RapidDisk volumes: -Attach a new RapidDisk volume by typing (size in KB): +Attach a new RapidDisk volume by typing (size in bytes): # echo "rapiddisk attach 8192" > /sys/kernel/rapiddisk/mgmt Detach an existing RapidDisk volume by typing: # echo "rapiddisk detach 0" > /sys/kernel/rapiddisk/mgmt -Resize an existing RapidDisk volume by typing (size in KB): +Resize an existing RapidDisk volume by typing (size in bytes): # echo "rapiddisk resize 65536" > /sys/kernel/rapiddisk/mgmt +To view existing RapidDisk/RapidDisk-Cache volumes directly from the module: + # cat /sys/kernel/rapiddisk/devices + RapidDisk-Cache