我正在将freebase文件加载到virtuoso中。我有 88 个文件夹。每个文件夹都包含 4 文件。我将这些文件分开,因为我只有 8 GB 的RAM。
#!/bin/bash
for i in {1..88}
do
isql 1111 dba dba exec="ld_dir('/data/data/${i}', '*.nt', 'http://freebase.com');"
isql 1111 dba dba exec="rdf_loader_run();"
isql 1111 dba dba exec="checkpoint;"
isql 1111 dba dba exec="commit WORK;"
isql 1111 dba dba exec="checkpoint;"
isql 1111 dba dba exec="delete from DB.DBA.load_list;"
done
# each buffer caches a 8K page of data and occupies approx. 8700 bytes of memory
# it's suggested to set this value to 65 % of ram for a db only server
# so if you have 32 GB of ram: 32*1000^3*0.65/8700 = 2390804
# default is 2000 which will use 16 MB ram
[Database]
MaxCheckpointRemap = 150000 (I have 8GB of RAM)
[TempDatabase]
MaxCheckpointRemap = 2000
NumberOfBuffers = 170000
MaxDirtyBuffers = 130000
Checkpoint删除了628 MB重新映射的页面,剩余31 MB。持续时间31.21秒。要节省时间,请在ini文件中增加MaxCheckpointRemap和/或将Unremap quota设置为0。
为什么我收到此消息?它是否会影响数据库的加载过程和构建?
#!/bin/bash
#clear list
isql 1111 dba dba exec="delete from DB.DBA.load_list;"
#load data
isql 1111 dba dba exec="ld_dir('/data/data, '*.gz', 'http://freebase.com');"
isql 1111 dba dba exec="set isolation='uncommitted';"
isql 1111 dba dba exec="rdf_loader_run();"
#checkpoint
isql 1111 dba dba exec="checkpoint;"
isql 1111 dba dba exec="commit WORK;"
isql 1111 dba dba exec="checkpoint;"
MaxCheckpointRemap = 150000 (8GB RAM)
# Uncomment next two lines if there is 4 GB system memory free
NumberOfBuffers = 340000
MaxDirtyBuffers = 250000
# I have 6 cores
ThreadsPerQuery = 4
AsyncQueueMaxThreads = 10
#NO THREADS LEFT IN THE QUEUE
ThreadCleanupInterval = 0
ThreadThreshold = 0
#check point every 30 minutes.
CheckpointInterval = 30
答案 0 :(得分:1)
最好在virtuoso docs中解释,但简而言之:
virtuoso.ini文件中的MaxCheckpointRemap参数控制着如何操作 许多页面可能存储在逻辑页面以外的页面上。
这意味着增加参数将节省您在检查点上的工作(和时间),但会减少数据局部性功能(一起插入的数据会保存在一起)。