Trying to optimise a service where it logs for each request, for pprof got to know that each write is invoking the syscall and that is one of the performance improvements that can be done.
Is there a recommended way to do batching of writes ?. Checked Diodes, looks like write is still happens for each log line, basically i want to set a config saying max buffer size as 1000 log lines and flush at once.
Hi,
Trying to optimise a service where it logs for each request, for pprof got to know that each write is invoking the
syscall
and that is one of the performance improvements that can be done.Is there a recommended way to do batching of writes ?. Checked Diodes, looks like write is still happens for each log line, basically i want to set a config saying max buffer size as 1000 log lines and flush at once.
Thanks