How to monitor mnesia load?
Asked Answered
E

3

14

I sometimes get mnesia overloaded error message while using primarily async_dirty queries and ram_copies tables. So to understand what is going on I want to get more information about mnesia state such as number of queries per second or the size of query queue. I've searched a lot and found two probable approaches.

The first is mnesia:system_info function that can return a list of current transactions. But it seems not able to provide an information about non-transactional queries.

The second is subscribing to mnesia events, but using this way some active background processing is needed as well as manual subscribing to each table events.

Are there better ways of getting this information?

Etra answered 19/3, 2014 at 10:29 Comment(2)
Can you be more specific as to what kind of information you want? This is not entirely clear.Groff
@IGIVECRAPANSWERS, any information about query execution rate. It may be the number of elementry reads/writes performed within last second. Also it may be the number of elementary reads/writes queued but not finished.Etra
M
1

I know this isn't the most direct answer, and I'm not as familiar with the code as I was four years ago, but I once had the same question and made an erlang app that monitors mnesia write statistics serves an SVG graph of throughput:

Mnesia Graphs

If it's sort of something you want, the tests exercise the functionality: https://github.com/woahdae/mnesia_graphs/blob/master/test/mnesia_graphs_srv_tests.erl

If it's really something you want, I could take a second look at the project. I'm working in Erlang again, so it's a good exercise.

Also, yet another reminder of who a good README is for: yourself, four years later!

Misrule answered 28/3, 2014 at 3:51 Comment(1)
Ok. It looks like there are no way to avoid active monitoring. Thanks for the answer. I'll look at your code.Etra
B
0

In default it limits with 4.
You have to change dc_dump_limit from 4 to 50 or something. Than it will work for you.

Bizet answered 27/3, 2014 at 6:18 Comment(2)
dc_dump_limit controls how often disc_copies tables are dumped from memory. In my case it won't help because I have no disc_copies tables. Anyway the question is how to measure this "load" which causes overloading.Etra
-mnesia dc_dump_limit Number and (Log) > (filesize(Tab)/ Dc_dump_limit) its a configuration parameter.Bizet
S
0

Before 16 Erlang 1> appmon:start(). After you need to use 1> observer:start(). For all times you need 32bit WxWidget

Last two years we are using Folsomite Erlang event capture and for triggering and visualisation for captured events and metrics we are using Icinga and Graphite

Stoical answered 26/6, 2015 at 7:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.