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(time) affected because of PR #4429 in LogFileImpl::writeImpl FLUSH. #4429 #2443 code changes due to this has impacted performance. #4591

Closed
chetanshivaji opened this issue Jun 21, 2024 · 8 comments · Fixed by #4622

Comments

@chetanshivaji
Copy link

Describe the bug
Because of changes of flush time performance is increased #4429 #2443

To Reproduce
Just write multiple logs to file.

Expected behavior
For version 1.13.0 the performance is good. but after introduction of this change in 1.13.1 I see performance hit.
Default flush and fsync is the problem.

@matejk
@sdaly2107

@chetanshivaji
Copy link
Author

I changed nothing from my code,
but simply upgrading poco to latest version 1.13.3, there is substantial time performance impact.
When I reverted version to 1.13.0 poco, I get older good performance.
So there is performance issue due to this code change of file write, flush, fsync.
Please have a look.

@matejk
Copy link
Contributor

matejk commented Jun 21, 2024

Which OS do you use?

Do you use flush option for logging?

@chetanshivaji
Copy link
Author

Mine is container application, I have my application on top of Oracle Linux as base image.
Any OS, I do docker run it should show performance issue.
I tried running on Ubuntu, and Oracle OEL.

@matejk
Copy link
Contributor

matejk commented Jun 21, 2024

Semantics if flush option for logging was unified across platforms. It means immediate sync to disk for every write on all platforms now.

If you want high performance then don't use flush option.

@chetanshivaji
Copy link
Author

We dont change flush option, but use by default offered by POCO. I believe by default it is TRUE from poco.
I will override flush to false. and I will try for performance.
Thank you. @matejk

@matejk
Copy link
Contributor

matejk commented Jul 30, 2024

@chetanshivaji, do you use Poco::SimpleFileChannel or Poco::FileChannel?

@chetanshivaji
Copy link
Author

@matejk
I use, I did use below flush =false, to get back to older good performance.

logging.channels.c3.class = FileChannel
logging.channels.c3.purgeCount = 5
logging.channels.c3.flush = false

@matejk
Copy link
Contributor

matejk commented Jul 31, 2024

@aleks-f , does "flush" setting in channel configuration default to "true" is it is not defined by any chance in some cases?

@aleks-f aleks-f added enhancement and removed bug labels Aug 17, 2024
@aleks-f aleks-f added this to 1.14 Aug 17, 2024
@aleks-f aleks-f moved this to Done in 1.14 Aug 17, 2024
@aleks-f aleks-f added the fixed label Aug 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants