[erlang-questions] Can one mnesia table fragment be further fragmented?

devdoer bird <>
Thu Jun 19 04:03:46 CEST 2008


Thanks.

Thant means ,I need fragment table many times not for load balance but for
decreasing one specific node's (the node is not as powerful as others )
load.

Eg. Node A has 2 fragments,Node B has 2 fragments. Each fragment has equal
records(say 100 records each fragment).

Now the Node B is heavily loaded.If I adding one or two   fragments in Node
A , the load of Node B won't be

decreased ,for the records from Node A will be splited and moved to the new
fragments,the records on Node A is 50+50+50+50=200 ,the total number of
Node B's record  is still 200.

In order to decreas the load on Node B,I have to calcaulate carefully how
many new fragments should be added.

If there's a way for mnesia to specify which node's fragment should be
splited when addin a new fragment,the problems above will be solved.Take the
example above ,when  adding a new fragment,I can tell mnesia to split Node
B's fragment.

2008/6/19, Scott Lystig Fritchie <>:
>
> devdoer bird <> wrote:
>
> dd> I spilit one mnesia table into 3 fragments which distributed on 3
> dd> machines named A,B and C,but now the the machine "A" is very busy,
>
> dd> so I decide split the fragment on the machine "A" into small
> dd> fragments.Does mnesia support this?
>
> No, that isn't possible with Mnesia, not as you wish/state above.
>
> If you have a table 'tab' split into fragments 'tab', 'tab_frag2', and
> 'tab_frag3', you can add more fragments: 'tab_frag4', 'tab_frag5', etc.
> You can choose to put only 1 fragment on node A, 4 fragments on node B,
> and 4 fragments on node C.  Assuming that access to the table is evenly
> distributed over all fragments, then node A should be getting only 1/9
> of the load, and B & C will get 4/9 of the load.
>
> -Scott
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080619/463cef32/attachment.html>


More information about the erlang-questions mailing list