Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Sparse file on Windows 11 not working #244

Open
Labels
questionQueries on usage of the library, architectural patterns and alike
@devent

Description

@devent

I use LMDB on Linux and the database file is always small, but I create the Env with 10 GB map size. I test now to Windows 11, but it appears that sparse files are not working. The database files are always the size I set in map size. I looked into sparse files and LMDB, and it seems to be that it should work since 2016. I also tested the file withdu -h andstats like in the Wiki, but it all states that the file is big. The compacted copy is a small file.

@Testvoid test_buffer_direct(@TempDir Path tmp, @TempDir Path copy) {final long mapSize = (long) (100 * pow(10, 6));final var env = create(DirectBufferProxy.PROXY_DB).setMapSize(mapSize).setMaxDbs(2).open(tmp.toFile(),MDB_WRITEMAP);final var db = env.openDbi("chunks", MDB_CREATE, MDB_INTEGERKEY);System.out.println(tmp);db.close();System.out.println(env.info());System.out.println(env.stat());env.copy(copy.toFile(), MDB_CP_COMPACT);env.close();System.out.println(copy);}
$ du -h data.mdb96M     data.mdb$ stat data.mdb  File: data.mdb  Size: 100000000       Blocks: 97660      IO Block: 65536  regular file

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionQueries on usage of the library, architectural patterns and alike

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp