neo4j配置文件neo4j.conf详解
一、dbms配置
dbms.default_database=neo4j
目录路径
dbms.directories.data=data
dbms.directories.plugins=plugins
dbms.directories.certificates=certificates
dbms.directories.logs=logs
dbms.directories.lib=lib
dbms.directories.run=run
dbms.directories.metrics=metrics
导入文件的目录,配置后只能从import目录导入,注释后可从任意文件目录导入
dbms.directories.import=import
认证
dbms.security.auth_enabled=false
允许更新
dbms.allow_upgrade=true
初始Java堆大小
dbms.memory.heap.initial_size=512m
最大Java堆大小
dbms.memory.heap.max_size=512m
jvm额外启动参数,多个配置多个
dbms.jvm.additional=-XX:MaxDirectMemorySize=512m
页缓存大小,默认为RAM大小减去最大堆内存后的50%(假如机器上只运行了neo4j)
dbms.memory.pagecache.size=10g
数据库总数
dbms.max_databases=100
是否允许在线备份
dbms.backup.enabled=true
默认只能localhost备份
dbms.backup.listen_address=0.0.0.0:6362
#The maximum time interval of a transaction within which it should be completed.
dbms.transaction.timeout
Defines whether memory for transaction state should be allocated on- or offheap.ON_HEAP, OFF_HEAP。默认OFF_HEAP
dbms.tx_state.memory_allocation=ON_HEAP
The number of Cypher query execution plans that are cached.
dbms.query_cache_size=1000
neo4j运行模式:SINGLE, CORE, READ_REPLICA
dbms.mode=SINGLE
二、JVM配置
初始Java堆大小
dbms.memory.heap.initial_size=512m
最大Java堆大小
dbms.memory.heap.max_size=512m
三、网络连接配置
默认只允许本地连接
dbms.connectors.default_listen_address=0.0.0.0
配置成当前机器IP或hostname
dbms.connectors.default_advertised_address=localhost
Bolt 连接
dbms.connector.bolt.enabled=true
dbms.connector.bolt.tls_level=DISABLED
dbms.connector.bolt.listen_address=:7687
Bolt连接保持时间
dbms.connector.bolt.thread_pool_keep_alive=5m
处理Bolt连接线程池最大线程数,默认400
dbms.connector.bolt.thread_pool_max_size
处理Bolt连接线程池最小线程数,默认5
dbms.connector.bolt.thread_pool_min_size
HTTP 连接
dbms.connector.http.enabled=true
dbms.connector.http.listen_address=:7474
HTTPS 连接
dbms.connector.https.enabled=false
dbms.connector.https.listen_address=:7473
neo4j工作线程数,只对REST连接生效
dbms.threads.worker_count=20
四、metris监控
default true
metrics.enabled=true
监控导出到CSV文件
metrics.csv.enabled=true
允许Prometheus,默认false
metrics.prometheus.enabled=true
The hostname and port to use as Prometheus endpoint
metrics.prometheus.endpoint=localhost:2004