While nothing like Martin's clever (or should that be simplest workable?) logger I have been looking at https://kafka.apache.org. I haven't tested it in the wild but it does sound like its worth a look.
Sam
--
You received this message because you are subscribed to the Google Groups "mechanical-sympathy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mechanical-symp...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
I have a lock free, gc free logger/Chronicle (concurrent writer across processes) it is in the sandbox area at the moment but should be in the next release. The TCP replication is not finished.
--
Thank you for the suggestions! I'll keep an eye out for the the next version of Chronicle and Martin's future logger. Both sound worth waiting for, so we'll attempt to duct tape our current system together in the meantime. :-)Much appreciated,Gregg
On Thu, Jan 16, 2014 at 2:35 PM, Peter Lawrey <peter....@gmail.com> wrote:
I have a lock free, gc free logger/Chronicle (concurrent writer across processes) it is in the sandbox area at the moment but should be in the next release. The TCP replication is not finished.
On 16 Jan 2014 18:56, "Gregg Donovan" <greg...@gmail.com> wrote:
We -- Etsy.com -- have a request logging system that we've begun to outgrow due to increased log volume and increased size of the messages we need to log. The messages are Thrift-encoded search requests from 1-100K in size. We use the logs to feed our homegrown traffic replay tools for offline performance tests and to reproduce issues found in production (GC, perf, etc.).--For our next gen request logging system we would like the following:Low contention -- Minimal lock contention despite log writes from many (10s to 100s) application threads.Async writes -- File I/O should be outside of the actual request path.Binary logging -- Our current system base64 encodes the payload as a String and logs it via log4j 1.2. ;-) This creates more garbage than we would like and makes the data written twice as large. It was good enough for a while, but now we need something more efficient...Compression -- Either per-message or per block of messages would be great. Incurring large periodic CPU penalties from logrotate + gzip, as we do now, is less than ideal.Rotation -- Ideally based on file size, but time-based would also do.Does anyone know of a good binary logger that fits these requirements? From the discussion on the list it seems like the Disruptor and the JavaChronicle fulfill parts of these requirements, but the use-case seems common enough that I suspect there may be an existing library I'm not familiar with that might do the job.Thanks for the help!Gregg DonovanSenior Software EngineerEtsy.com, Inc.p.s. I've long enjoyed lurking on this list and have been pointing folks to it in a GC talk I gave last year.
You received this message because you are subscribed to the Google Groups "mechanical-sympathy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mechanical-sympathy+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "mechanical-sympathy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mechanical-sympathy+unsub...@googlegroups.com.
We -- Etsy.com -- have a request logging system that we've begun to outgrow due to increased log volume and increased size of the messages we need to log. The messages are Thrift-encoded search requests from 1-100K in size. We use the logs to feed our homegrown traffic replay tools for offline performance tests and to reproduce issues found in production (GC, perf, etc.).For our next gen request logging system we would like the following:Low contention -- Minimal lock contention despite log writes from many (10s to 100s) application threads.Async writes -- File I/O should be outside of the actual request path.Binary logging -- Our current system base64 encodes the payload as a String and logs it via log4j 1.2. ;-) This creates more garbage than we would like and makes the data written twice as large. It was good enough for a while, but now we need something more efficient...Compression -- Either per-message or per block of messages would be great. Incurring large periodic CPU penalties from logrotate + gzip, as we do now, is less than ideal.Rotation -- Ideally based on file size, but time-based would also do.
On Friday, January 17, 2014 3:56:19 AM UTC+9, Gregg Donovan wrote:
We -- Etsy.com -- have a request logging system that we've begun to outgrow due to increased log volume and increased size of the messages we need to log. The messages are Thrift-encoded search requests from 1-100K in size. We use the logs to feed our homegrown traffic replay tools for offline performance tests and to reproduce issues found in production (GC, perf, etc.).For our next gen request logging system we would like the following:Low contention -- Minimal lock contention despite log writes from many (10s to 100s) application threads.Async writes -- File I/O should be outside of the actual request path.Binary logging -- Our current system base64 encodes the payload as a String and logs it via log4j 1.2. ;-) This creates more garbage than we would like and makes the data written twice as large. It was good enough for a while, but now we need something more efficient...Compression -- Either per-message or per block of messages would be great. Incurring large periodic CPU penalties from logrotate + gzip, as we do now, is less than ideal.Rotation -- Ideally based on file size, but time-based would also do.
I've been thinking about adding binary logging to log4j-2.0. The current version (log4j-2.0-beta-9) should give you 3 out of 5: Async Loggers use the Disruptor under the hood -> low contention & async writes, and RollingRandomAccessFileAppender (the fastest appender) can do rotation. This appender can also optionally do compression in a separate thread, but this happens on roll-over only, not continuously. (Still, I would guess that this is more CPU-efficient than using logrotate + gzip in a separate process...)Your objects would need to provide some way to turn themselves into bytes. I doubt that you want to use java standard serialization :-), so I was thinking to add an interface to log4j that your objects would implement. Something like:
public interface BinaryMessage extends org.apache.logging.log4j.message.Message {
byte[] toByteArray();
}Log4j2 Loggers already have methods that take a Message argument (instead of a String), so in your application code you could just writeLogger logger = LogManager.getLogger(MyClass.class); // usually cached in static fieldlogger.info(myObject); // where myObject implements BinaryMessage
In the log4j2 framework, the Layout is responsible for converting a LogEvent into bytes, so I would add a BinaryLayout that recognizes BinaryMessages.
The layout could optionally output the timestamp (long) and log level (byte), followed by the message size (int) and the message bytes (byte[]).
The biggest drawback to this approach that I can see is that it is not garbage-free.Thoughts?
Does anyone know of a good binary logger that fits these requirements? From the discussion on the list it seems like the Disruptor and the JavaChronicle fulfill parts of these requirements, but the use-case seems common enough that I suspect there may be an existing library I'm not familiar with that might do the job.Thanks for the help!Gregg DonovanSenior Software EngineerEtsy.com, Inc.p.s. I've long enjoyed lurking on this list and have been pointing folks to it in a GC talk I gave last year.
--
You received this message because you are subscribed to the Google Groups "mechanical-sympathy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mechanical-symp...@googlegroups.com.