[erlang-questions] Mnesia memory, size and effects of table copy types
Matthew Sackman
matthew@REDACTED
Thu Jul 2 14:37:41 CEST 2009
On Thu, Jul 02, 2009 at 02:15:39PM +0200, wde wrote:
> by reading the mnesia source code i found this :
>
> table_info/2 ->
> raw_table_info/2 ->
> if storage type == disc_only_copies ->
> dets:info/2 ->
> dets_utils:position/3 ->
> file:position/2 ->
>
> return offset counted in bytes
Yeah, that's pretty much what I found from some quick grepping through.
This surely is a bug then. Units should not change depending on table
type. Also, the documentation should probably reenforce that this is the
number of words (if we must, but why on earth was words chosen and not
bytes?) used by the table content, irregardless of whether that content
is on disk or not. I.e. it's quite sensible to think that when using
disc_only_copies, memory should return the amount of RAM used and thus
be small and reasonably constant. Now in my case, I definitely want the
size of the dets table, but that's not the only interpretation, and the
documentation should be clearer.
Matthew
More information about the erlang-questions
mailing list