[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Can't open env with required mapsize on windows .

Mohammed Muneer wrote:

I can env_set_mapsize(env, 1 GB) without any problems in linux.

But on windows, it is a different story

Windows is like that.

  Machine 1) Windows 64 only opens with upto 10 MB (apporx)
  Machine 2 Windows 64 only opens with upto 500 MB (apporx)
  Machine 3) Virtual box Windows 64 running on linux works with 1 GB

Q1) So why is this happening. Am I doing anything wrong.

Have no idea what you're actually doing, so it's impossible to answer. Learn to ask better questions and provide better information.

What revision of LMDB? Which version of Windows? How much free disk space is there? What else is your application code doing? How do you know that only XX MB were "opened", what stats are you checking? What other differences exist between machine 1 and machine 2?

What other processes are running, how much memory are they consuming on each machine? Note that just because you create a 1GB memory map of a file doesn't mean that it will actually consume 1GB of RAM. That's not how memory mapping works. Read your Windows developer documentation, MSDN is always there for you to read. We're not here to teach you how your OS works.

Q2) And setting env_set_mapsize before calling open is not enough. I need to set
       env_set_mapsize(env, 0) just before beginning a write transaction
inorder to
      insert something or otherwise the application indefinitely hangs on the
second insert transaction.

Hangs where, exactly? Have you gotten a stack trace from such a hang? That's the obvious first step that any application developer should know to do.

Both the above questions concerns just Windows. Everything is fine with linux.

  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/