summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2025-12-03 18:19:40 -0300
committerEuAndreh <eu@euandre.org>2025-12-03 18:19:42 -0300
commite98077a139aa319c5335a8d3b2477c9d63604189 (patch)
tree7d8eab7543de3f0355a86444129a93fa4287414f
parentbin/transactor.in: Less verbose output (diff)
downloaddatomic-e98077a139aa319c5335a8d3b2477c9d63604189.tar.gz
datomic-e98077a139aa319c5335a8d3b2477c9d63604189.tar.xz
Disable valcache for transactor
Given that the transactor will run on top of SQLite, its disk IO for reads when accessing the valcache is replaced by SQLite itself. In this topology, we don't get any upside on enabling valcache for the transactor, and even loose performance due to the cache IO competing with the database IO. Peers can enable the valcache for themselves, if desired.
-rwxr-xr-xbin/transactor.in20
-rw-r--r--etc/transactor.properties.tmpl3
2 files changed, 1 insertions, 22 deletions
diff --git a/bin/transactor.in b/bin/transactor.in
index 918135d..1e99727 100755
--- a/bin/transactor.in
+++ b/bin/transactor.in
@@ -11,21 +11,13 @@ usage() {
-VALCACHESIZE=
PORT=50200
-CACHEDIR='cache'
TEMPDATADIR='tmp'
-while getopts 'p:C:S:T:' flag; do
+while getopts 'p:T:' flag; do
case "$flag" in
(p)
PORT="$OPTARG"
;;
- (C)
- CACHEDIR="$OPTARG"
- ;;
- (S)
- VALCACHESIZE="$OPTARG"
- ;;
(T)
TEMPDATADIR="$OPTARG"
;;
@@ -46,14 +38,6 @@ FILE="$1"
-if [ -z "$VALCACHESIZE" ]; then
- VALCACHESIZE="$(
- df -Pk -- "$(dirname -- "$FILE")" |
- tail -n1 |
- awk '{printf "%.0f\n", $2 / (1024 * 1024)}'
- )"
-fi
-
sqlite3 "$FILE" < @SYSCONFDIR@/init.sql > /dev/null
exec java \
@@ -70,8 +54,6 @@ exec java \
sed \
-e "s|@PORT@|$PORT|g" \
-e "s|@FILE@|$FILE|g" \
- -e "s|@CACHEDIR@|$CACHEDIR|g" \
-e "s|@TEMPDATADIR@|$TEMPDATADIR|g" \
- -e "s|@VALCACHESIZE@|$VALCACHESIZE|g" \
@SYSCONFDIR@/transactor.properties.tmpl
)
diff --git a/etc/transactor.properties.tmpl b/etc/transactor.properties.tmpl
index 0037c35..5b9ef47 100644
--- a/etc/transactor.properties.tmpl
+++ b/etc/transactor.properties.tmpl
@@ -6,9 +6,6 @@ sql-driver-class=org.sqlite.JDBC
sql-url=jdbc:sqlite:@FILE@
data-dir=@TEMPDATADIR@
-valcache-path=@CACHEDIR@
-valcache-max-gb=@VALCACHESIZE@
-
# 4GiB VM
memory-index-threshold=32m
memory-index-max=512m