0

I have a couple of Docker containers that constantly write to logs. This causes continuous disk I/O, particularly writes.

Is there a way to make Docker read/write to a ramdisk, which could occasionally "sync" to the hard disk in one continuous write?

If there's a better way to deal with this issue, alternative solutions are encouraged.

1 Answer 1

0

You can send logs to syslog, and have syslog buffer the logstream and send to logfiles asyncrhonously.

Depending on your syslog daemon, you may need to explicitly turn on async writing to logfiles (eg SysV syslog requires a "+" at the start of the filename to do this, if I recall correctly). In some cases (eg syslog-ng) you can specify how many log lines to buffer before flushing buffers, which is nice.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .