Erlang High Log

For my erlang application, I used both sasl logger and log4erl, and both give poor performance when the number of events they send is around 1000 per second. log4erl gave better performance, but after a while its mailbox starts to fill up and, thus, begins to inflate the virtual machine.

Will disk_log be used better (how will it work at 1000 events per second?).

I tried using disk_log in the shell ... in the example, they first convert the message for writing to binary (list_to_binary) and write to the file using the "blog" function.

Will this help me in using an efficient large-volume logger?

Another doubt :: Using disk_log: blog, the text size was only 84 bytes ... but with disk_log: log_terms..size was 970 bytes. What is the big difference?

+3
source share
2 answers

Hack something yourself. A quick solution is a dedicated log with storage in memory and bulk dumps on disk. If you cannot afford to lose any data (in the event of a VM failure), do it on the remote node device. As soon as I used the remote β€œsolution” and I requested every virtual machine for 5 sec. I did not notice the impact on the system.

+2
source

When recording in large volumes, I prefer battle-tested solutions, such as a scribe or possibly a tray. Check erl_scribe .

+1
source

Source: https://habr.com/ru/post/1795466/


All Articles