[Monetdb-developers] memory usage question

Mark Bucciarelli mkbucc at gmail.com
Wed Dec 23 19:15:31 CET 2009

I'm seeing some behavior that makes me
wonder if mserver5 leaks.

I'm using Ubuntu 9.04 w/ 32-bit i386 and 500 MB
of RAM. This is 2009Nov CVS.

Does this sequence of steps and memory usage
look right?

1. Reboot the server and start merovingian
            0m  -- mserver5 RSS  (not running)
           417m -- free memory reported by top
             78m -- used
               5m -- buffers
2. Destroy then create database
            15m  -- mserver5 RSS
           392m -- free memory reported by top
3. Add tables to database
            21m  -- mserver5 RSS
           378m -- free memory reported by top
4. Import a small table (38,000 rows, autoincr int + varchar(1024))
            29m  -- mserver5 RSS
           350m -- free memory reported by top
5. Repeat steps 2 through 4 three times.
            29m  -- mserver5 RSS
   !!!    225m -- free memory reported by top
6. Shut down merovingian
   !!!    251m -- free memory reported by top
          242m -- used
          136m -- buffers

Why is top only showing 251m of free memory?

Yesterday, the system started to swap when free
memory, as reported by top, was exhausted.

And I bet I could get it to swap if I ran lots more
iterations in step 5 above.

I know that having free close to zero is a good thing,
as it means you are using your RAM, but that
swapping is never good on a database server.  :)

I'm not using the server for anything else at the
moment, other than SSH and transferring data
from SQLite to MonetDB via mclient and files of
SQL commands.

As a related question, what is the minimum RAM
need to run MonetDB?  I'd like to get it running on
an old slow computer running OpenBSD to check
how well Monet handles memory pressure and to
turn on OpenBSD's paranoid malloc options.  Are
there some knobs I can turn to make monetdb5
run when there is only 100MB of free memory after
the OS starts up?

That swapping yesterday got me a nervous about
stability, especially since stopping and restarting
merovingian didn't give the memory back.



More information about the developers-list mailing list