GCACHE(8)
π GCACHE β control utility for CACHE GEOM class
okay so bestie, welcome to gcache(8), the system manager's manual page you didn't know you needed π this little icon controls the GEOM cache, and by the end of this you're gonna be obsessed, no cap.
β¨ 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 literally the control room for GEOM cache, which speeds up read performance by sending fixed size read requests to its consumer. π
ngl it was built to fix a genuinely tragic situation: a 64 KiB blocksize FS sitting on a RAID3 array with 8 data components, where a single disk component would only get 8 KiB read requests β which effectively killed disk performance under high load π like, rip.
Caching can be configured two ways, and yes you have to pick: βmanualβ or βautomaticβ π
- With the βmanualβ method, no metadata are stored on the devices, so the cached device has to be configured by hand every single time it is needed. highkey labor.
- With the βautomaticβ method, on-disk metadata are used to detect devices. Once devices are labeled, they'll be automatically detected and configured. slay, it does the work for you β¨
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 modulegeom_cache.kowill 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 modulegeom_cache.kowill 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 asstop.clearβ Clear metadata on the given devices.dumpβ Dump metadata stored on the given devices.listβ Seegeom(8).statusβ Seegeom(8).loadβ Seegeom(8).unloadβ Seegeom(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 variable. π
kern.geom.cache.used_hi:20kern.geom.cache.used_lo:5kern.geom.cache.idletime:5kern.geom.cache.timeout:10kern.geom.cache.enable:1kern.geom.cache.debug:0- Debug level of the CACHE GEOM class. This can be set to a number between
0and3inclusive. If set to0minimal debug information is printed, and if set to3the maximum amount of debug information is printed. π
- Debug level of the CACHE GEOM class. This can be set to a number between
β EXIT STATUS β
Exit status is 0 on success, and 1 if the command fails. simple as that, periodt π
π SEE ALSO π
π HISTORY π
The gcache utility appeared in FreeBSD 7.0. vintage but iconic π«Ά
π AUTHORS π
Ruslan Ermilov <ru@FreeBSD.org>
bestie reminder:stopanddestroydon't touch on-disk metadata, so if you were expecting them to clean up after themselvesβ¦ they don't π plan accordingly.
π and that's the whole vibe! this page is from the Debian camp, dated January 3, 2010, covering GCACHE(8) β go forth and cache responsibly, mwah π§β¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2010 Edward Tomasz Napierala
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms