Skip to content

Commit 6a10476

Browse files
authored
Merge pull request #294 from JohT/feature/minimize-neo4j-transaction-log-disk-space
Minimize Neo4j transaction log disk space utilization
2 parents 7426d70 + 8b34b4d commit 6a10476

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

graph-visualization/renderVisualizations.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ let browser;
136136
"--disable-component-extensions-with-background-pages",
137137
"--disable-client-side-phishing-detection",
138138
"--use-gl=disabled",
139-
"--disable-features=Vulkan",
139+
"--disable-features=Vulkan",
140+
"--no-sandbox" // See https://pptr.dev/troubleshooting#issues-with-apparmor-on-ubuntu
140141
],
141142
}); // { headless: false } for testing
142143

scripts/configuration/template-neo4j-v4.conf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,7 @@ dbms.jvm.additional=-XX:+ExitOnOutOfMemoryError
1919
dbms.memory.transaction.global_max_size=6g
2020

2121
# Memory: Limit the amount of memory that a single transaction can consume.
22-
dbms.memory.transaction.max_size=6g
22+
dbms.memory.transaction.max_size=6g
23+
24+
# Transaction: Retention policy for transaction logs needed to perform recovery and backups.
25+
dbms.tx_log.rotation.retention_policy=keep_none

scripts/configuration/template-neo4j.conf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,7 @@ server.jvm.additional=-XX:+ExitOnOutOfMemoryError
1919
db.memory.transaction.total.max=6g
2020

2121
# Memory: Limit the amount of memory that a single transaction can consume.
22-
db.memory.transaction.max=6g
22+
db.memory.transaction.max=6g
23+
24+
# Transaction: Retention policy for transaction logs needed to perform recovery and backups.
25+
db.tx_log.rotation.retention_policy=keep_none

scripts/setupNeo4j.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,10 @@ if [ ! -d "${NEO4J_INSTALLATION_DIRECTORY}" ] ; then
9898
echo "setupNeo4j: Commenting out configuration properties that will later be replaced or are not needed"
9999
if [[ "$NEO4J_MAJOR_VERSION_NUMBER" -ge 5 ]]; then
100100
sed -i.backup '/^server\.directories\.import=/ s/^/# defined in the directory section further below #/' "${NEO4J_CONFIG}"
101+
sed -i.backup '/^db\.tx_log\.rotation\.retention_policy=/ s/^/# defined in the transaction section further below #/' "${NEO4J_CONFIG}"
101102
else
102103
sed -i.backup '/^dbms\.directories\.import=/ s/^/# defined in the directory section further below #/' "${NEO4J_CONFIG}"
104+
sed -i.backup '/^dbms\.tx_log\.rotation\.retention_policy=/ s/^/# defined in the transaction section further below #/' "${NEO4J_CONFIG}"
103105
fi
104106
# Remove the backup file
105107
rm -f "${NEO4J_CONFIG}.backup"
@@ -161,7 +163,7 @@ if [ ! -d "${NEO4J_INSTALLATION_DIRECTORY}" ] ; then
161163
} >> "${NEO4J_CONFIG}"
162164
fi
163165

164-
echo "setupNeo4j: Configuring static settings (memory, procedure permittions, ...)"
166+
echo "setupNeo4j: Configuring static settings (memory, procedure permissions, ...)"
165167
if [[ "$NEO4J_MAJOR_VERSION_NUMBER" -ge 5 ]]; then
166168
cat "${SCRIPTS_DIR}/configuration/template-neo4j.conf" >> "${NEO4J_CONFIG}"
167169
else

0 commit comments

Comments
 (0)