# New in Knoppix 5.1: cloop preload cache
# Default values
case "$MEDIUM" in
*[Cc][Dd]*) CLOOP_PRELOAD="preload=64" ;;
*[Dd][Vv][Dd]*) CLOOP_PRELOAD="preload=128" ;;
*) CLOOP_PRELOAD="preload=32" ;;
esac
# cloop improves seek performance when caching the directory index
# (first few MB) of each cloop file.
# Default values depending on ramsize, override with cloop_preload=numblocks at boot.
if test "$TOTALMEM" -lt 128000; then
# up to 128MB: No preload.
CLOOP_PRELOAD=""
elif test "$TOTALMEM" -lt 256000; then
# less than 256MB: About 4MB preload w/ blocksize 128k
CLOOP_PRELOAD="preload=32"
elif test "$TOTALMEM" -lt 512000; then
# less than 512MB: About 8MB preload w/ blocksize 128k
CLOOP_PRELOAD="preload=64"
elif test "$TOTALMEM" -lt 1024000; then
# less than 1GB: About 16MB preload w/ blocksize 128k
CLOOP_PRELOAD="preload=128"
else
# 1GB Ram or more
# About 32MB w/ blocksize 128k
CLOOP_PRELOAD="preload=256"
fi