Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

performance issue of writing logs #23

Closed
JimmyMa opened this issue Nov 29, 2016 · 3 comments
Closed

performance issue of writing logs #23

JimmyMa opened this issue Nov 29, 2016 · 3 comments
Labels

Comments

@JimmyMa
Copy link

JimmyMa commented Nov 29, 2016

The writerSink needs to acquire a lock before write logs :https://github.com/cloudfoundry/lager/blob/master/writer_sink.go#L34 , if the file IO is slow, that will blocks thousands of goroutines.

Could the writerSink use channel to write the logs, like what gorouter access logs writer does: https://github.com/cloudfoundry/gorouter/blob/master/access_log/file_and_loggregator_access_logger.go#L94

With channel, the logs are cached in memory, and no goroutines are blocked.

@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/135110101

The labels on this github issue will be updated when the story is started.

@emalm
Copy link
Member

emalm commented Dec 6, 2016

Thanks, @JimmyMa. Could you explain more about the concurrency problems you observed with lager? Was the blockage a transient condition that eventually cleared up, or was it a fundamental problem where the log serialization could not keep up with the log message production in the component? I'd like us to understand your exact problem more thoroughly before deciding on a solution.

Best,
Eric, CF Runtime Diego PM

@emalm
Copy link
Member

emalm commented Mar 31, 2017

Closing due to inactivity. Please feel free to open a new issue with more detail about the specific problem you've encountered.

Best,
Eric

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants