原始文献 / 论坛帖 / Re: RFC: remove DB_PRIVATE flag
Re: RFC: remove DB_PRIVATE flag
Bitcointalk · 2010-09-12 18:00:39 UTC
rev 153 里在试去掉 DB_PRIVATE 标志。我们得盯着看有什么不同。
至少在 Windows 上,它会创建六个 __db.001 - __db.006 文件,大小从 24K 到 4MB。退出时不删除,就留在那。
文档说它用内存映射文件。我猜它们的权限和数据库文件一样,所以同样的用户访问限制适用。
Windows 私有局域网下载 78500 个区块的测试:
with DB_PRIVATE 20 minutes 51 seconds
without DB_PRIVATE 20 minutes 51 seconds
没想到会分毫不差。
英文原文
Trying it without the DB_PRIVATE flag in rev 153. We need to keep an eye on what's different.
On Windows at least, it creates six __db.001 - __db.006 files with sizes from 24K to 4MB. It doesn't delete them on exit, it just leaves them behind.
The docs say it uses memory mapped files. I assume they have the same file permissions as the database files, so the same user access restrictions apply.
Tests on Windows private LAN download of 78500 blocks:
with DB_PRIVATE 20 minutes 51 seconds
without DB_PRIVATE 20 minutes 51 seconds
I wasn't expecting them to come out exactly the same.
