[erlang-questions] Partial disk based and partial memory based terms

18 views
Skip to first unread message

Maruthavanan Subbarayan

unread,
Aug 6, 2012, 5:30:20 AM8/6/12
to erlang-q...@erlang.org
Hi,

I am building an application that would receive requests on bulk and process at back-end. I wrote an code where requested would be inserted into mnesia and the would be processed later.But ended up in a situation where started receiving enormous requests and processing of the requests took more time. So gradually, I faced couple of times where erlang got crashed due to insufficient memory allocation on RAM. There were around 300K records while it got crashed.

Is there any workaround where I can keep only 10-20% of the total records in RAM and remaining in disk at any point of time. I have Gigs of disk space and only Megs of RAM. I am looking this as an alternative because It would also give memory for other process in the machine without occupying it unnecessarily.

Thanks in advance,
Marutha

Ali Sabil

unread,
Aug 6, 2012, 6:49:19 AM8/6/12
to Maruthavanan Subbarayan, erlang-q...@erlang.org
If you use a 64bits node and add configure your OS to have plenty of
swap space, it shouldn't crash.
_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions

Erik Søe Sørensen

unread,
Aug 7, 2012, 3:16:17 AM8/7/12
to Maruthavanan Subbarayan, erlang-q...@erlang.org

Sounds like what you need is a queueing system.  Have you considered using e.g. RabbitMQ?  It provides persistent queues.

Reply all
Reply to author
Forward
0 new messages