GCACHE(8) BSD System Manager's Manual GCACHE(8)NAME
gcache -- control utility for CACHE GEOM class
SYNOPSIS
gcache create [-v] [-b blocksize] [-s size] name prov
gcache configure [-v] [-b blocksize] [-s size] name
gcache destroy [-fv] name
gcache label [-v] [-b blocksize] [-s size] name prov
gcache stop [-fv] name ...
gcache clear [-v] prov ...
gcache dump prov ...
gcache list
gcache status [-s name]
gcache load [-v]
gcache unload [-v]
DESCRIPTION
The gcache utility is used to control GEOM cache, which can speed up read performance by sending fixed size read requests to its consumer.
It has been developed to address the problem of a horrible read performance of a 64k blocksize FS residing on a RAID3 array with 8 data com-
ponents, where a single disk component would only get 8k read requests, thus effectively killing disk performance under high load.
Caching can be configured using two different methods: ``manual'' or ``automatic''. When using the ``manual'' method, no metadata are stored
on the devices, so the cached device has to be configured by hand every time it is needed. The ``automatic'' method uses on-disk metadata to
detect devices. Once devices are labeled, they will be automatically detected and configured.
The first argument to gcache indicates an action to be performed:
create Cache the given devices with specified name. This is the ``manual'' method. The kernel module geom_cache.ko will be loaded if it
is not loaded already.
label Cache the given devices with the specified name. This is the ``automatic'' method, where metadata are stored in every device's last
sector. The kernel module geom_cache.ko will be loaded if it is not loaded already.
stop Turn off existing cache device by its name. This command does not touch on-disk metadata!
destroy Same as stop.
clear Clear metadata on the given devices.
dump Dump metadata stored on the given devices.
list See geom(8).
status See geom(8).
load See geom(8).
unload See geom(8).
Additional options:
-f Force the removal of the specified cache device.
-v Be more verbose.
SYSCTL VARIABLES
The following sysctl(8) variables can be used to control the behavior of the CACHE GEOM class. The default value is shown next to each vari-
able.
kern.geom.cache.used_hi: 20
kern.geom.cache.used_lo: 5
kern.geom.cache.idletime: 5
kern.geom.cache.timeout: 10
kern.geom.cache.enable: 1
kern.geom.cache.debug: 0
Debug level of the CACHE GEOM class. This can be set to a number between 0 and 3 inclusive. If set to 0 minimal debug information
is printed, and if set to 3 the maximum amount of debug information is printed.
EXIT STATUS
Exit status is 0 on success, and 1 if the command fails.
SEE ALSO geom(4), geom(8)HISTORY
The gcache utility appeared in FreeBSD 7.0.
AUTHORS
Ruslan Ermilov <ru@FreeBSD.org>
BSD January 3, 2010 BSD
Check Out this Related Man Page
GRAID3(8) BSD System Manager's Manual GRAID3(8)NAME
graid3 -- control utility for RAID3 devices
SYNOPSIS
graid3 label [-Fhnrvw] [-s blocksize] name prov prov prov ...
graid3 clear [-v] prov ...
graid3 configure [-adfFhnrRvwW] name
graid3 rebuild [-v] name prov
graid3 insert [-hv] [-n number] name prov
graid3 remove [-v] -n number name
graid3 stop [-fv] name ...
graid3 list
graid3 status
graid3 load
graid3 unload
DESCRIPTION
The graid3 utility is used for RAID3 array configuration. After a device is created, all components are detected and configured automati-
cally. All operations such as failure detection, stale component detection, rebuild of stale components, etc. are also done automatically.
The graid3 utility uses on-disk metadata (the provider's last sector) to store all needed information.
The first argument to graid3 indicates an action to be performed:
label Create a RAID3 device. The last given component will contain parity data, whilst the others will all contain regular data. The
number of components must be equal to 3, 5, 9, 17, etc. (2^n + 1).
Additional options include:
-F Do not synchronize after a power failure or system crash. Assumes device is in consistent state.
-h Hardcode providers' names in metadata.
-n Turn off autosynchronization of stale components.
-r Use parity component for reading in round-robin fashion. Without this option the parity component is not used at all for
reading operations when the device is in a complete state. With this option specified random I/O read operations are even 40%
faster, but sequential reads are slower. One cannot use this option if the -w option is also specified.
-s Manually specify array block size. Block size will be set equal to least common multiple of all component's sector sizes and
specified value. Note that array sector size calculated as multiple of block size and number of regular data components. Big
values may decrease performance and compatibility, as all I/O requests have to be multiple of sector size.
-w Use verify reading feature. When reading from a device in a complete state, also read data from the parity component and ver-
ify the data by comparing XORed regular data with parity data. If verification fails, an EIO error is returned and the value
of the kern.geom.raid3.stat.parity_mismatch sysctl is increased. One cannot use this option if the -r option is also speci-
fied.
clear Clear metadata on the given providers.
configure Configure the given device.
Additional options include:
-a Turn on autosynchronization of stale components.
-d Do not hardcode providers' names in metadata.
-f Synchronize device after a power failure or system crash.
-F Do not synchronize after a power failure or system crash. Assumes device is in consistent state.
-h Hardcode providers' names in metadata.
-n Turn off autosynchronization of stale components.
-r Turn on round-robin reading.
-R Turn off round-robin reading.
-w Turn on verify reading.
-W Turn off verify reading.
rebuild Rebuild the given component forcibly. If autosynchronization was not turned off for the given device, this command should be
unnecessary.
insert Add the given component to the existing array, if one of the components was removed previously with the remove command or if one
component is missing and will not be connected again. If no number is given, new component will be added instead of first missed
component.
Additional options include:
-h Hardcode providers' names in metadata.
remove Remove the given component from the given array and clear metadata on it.
stop Stop the given arrays.
Additional options include:
-f Stop the given array even if it is opened.
list See geom(8).
status See geom(8).
load See geom(8).
unload See geom(8).
Additional options include:
-v Be more verbose.
EXIT STATUS
Exit status is 0 on success, and 1 if the command fails.
EXAMPLES
Use 3 disks to setup a RAID3 array (with the round-robin reading feature). Create a file system, mount it, then unmount it and stop device:
graid3 label -v -r data da0 da1 da2
newfs /dev/raid3/data
mount /dev/raid3/data /mnt
...
umount /mnt
graid3 stop data
graid3 unload
Create a RAID3 array, but do not use the automatic synchronization feature. Rebuild parity component:
graid3 label -n data da0 da1 da2
graid3 rebuild data da2
Replace one data disk with a brand new one:
graid3 remove -n 0 data
graid3 insert -n 0 data da5
SEE ALSO geom(4), geom(8), gvinum(8), mount(8), newfs(8), umount(8)HISTORY
The graid3 utility appeared in FreeBSD 5.3.
AUTHORS
Pawel Jakub Dawidek <pjd@FreeBSD.org>
BUGS
There should be a section with an implementation description.
Documentation for sysctls kern.geom.raid3.* is missing.
BSD January 15, 2012 BSD