[Date Prev][Date Next]
Re: Fwd: [Patch] Allocating sparse files on Windows
- To: Colin LeMahieu <firstname.lastname@example.org>, email@example.com
- Subject: Re: Fwd: [Patch] Allocating sparse files on Windows
- From: Howard Chu <firstname.lastname@example.org>
- Date: Mon, 20 Apr 2015 20:35:49 +0100
- In-reply-to: <55087D1F.email@example.com>
- References: <CAKJMc3RN6hBCZV4aQGdFc1hSpT-H7w0G5g3mQQUzxtD3g2P1EQ@mail.gmail.com> <CAKJMc3TxRW1C87S7NFzOMAeaeyjuD-How7yfteNSCeHk26zMMA@mail.gmail.com> <55087D1F.firstname.lastname@example.org>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0 SeaMonkey/2.37a1
Howard Chu wrote:
Colin LeMahieu wrote:
Apologies if this arrives twice, I sent it once two days ago before
subscribing to the list and it hasn't appeared yet so I'm resending
Thanks, but as noted on http://www.openldap.org/devel/contributing.html
patches should be submitted to the ITS.
Initial feedback from some folks testing this patch are that there's a
significant drop in performance. Most likely this is because Windows
NTFS allocates sparse file space in 64KB chunks, while pages are still
4KB, and so filling empty space with data involves a number of RMW
Did you compare before/after performance in your own testing?
Memory mapping files on Windows requires the file size to match the size
of the memory mapped region however in the current implementation this
requires creating a file the full size of the environment which may be
much larger than the actual amount of data in the database.
This patch creates the database as a sparse file on Windows. Windows
Explorer will report the file size as the size of the entire memory
mapped region but the size on disk will be proportional to the size of
committed data in the database. This can be checked by checking the
"size on disk" property of the file.
Let me know if this is posted incorrectly, otherwise feel free to modify
the patch in whatever way is necessary for approval.
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/