Strange mnesia behaviour
Mon Aug 25 17:20:19 CEST 2003
Enclosed are two files for demonstrating the problem.
%% create test table
%% Send 1000 messages
%% send 4000 messages
%% NOTE: Duration more than 4x time for 1000 msgs.
%% send 10000 msgs
%% And now for the real fun
%% Send 10000 msgs, but sleep 1 sec, after 5000 msgs
Duration: 3.65846 %% !!!!!!!!!
eprof shows that flush_downs is the guilty.
Warning: do not try profileing witheprof on 10000
messages, 4000 msg takes 25 secs with profiling on
my 2.4 Ghz P4.
--- Dan Gudmundsson <dgud@REDACTED> skrev: >
> flush_downs cleans the msg queue, with alot msgs in
> it, it takes some
> Can you email me the test program?
> Anders Nygren writes:
> > Hi
> > I have found a strange thing in mnesia. I was
> > to do some throughput measurement on a process.
> > My process does the following:
> > 1, receive one message
> > 2, make one mnesia:select
> > 3, send one message
> > My test was to send N identicat messages to my
> > and measure the time it took to process all
> > To my suprise the times grew non-linearly with N.
> > eprof shows that
> > N = 10 - > mnesia:flush_downs/0 is called 55
> > N = 100 -> mnesia:flush_downs/0 is called 5000
> > N = 4000 -> a whopping 4 million times.
> > Also if I run the test twice with 50 messages I
> > 2500 mnesia:flush_downs, but when I run one test
> > 100 messages there are 5000.
> > I the mnesia table has one record.
> > I am using a single node -> no distribution.
> > The table is type bag, disc_copy.
> > I am using R9C on Suse 8.2.
> > Is there something wrong with mnesia or is there
> > something I dont understand?
> > /Anders
> > Yahoo! Mail - Gratis: 6 MB lagringsutrymme,
> spamfilter och virusscan. Se mer på
Yahoo! Mail - Gratis: 6 MB lagringsutrymme, spamfilter och virusscan. Se mer på http://se.mail.yahoo.com
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1709 bytes
More information about the erlang-questions