pocoproject / poco

The POCO C++ Libraries are powerful cross-platform C++ libraries for building network- and internet-based applications that run on desktop, server, mobile, IoT, and embedded systems.
https://pocoproject.org
Other
8.04k stars 2.11k forks source link

Performance(time) affected because of PR #4429 in LogFileImpl::writeImpl FLUSH. #4429 #2443 code changes due to this has impacted performance. #4591

Open chetanshivaji opened 1 week ago

chetanshivaji commented 1 week ago

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 commented 1 week ago

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 commented 1 week ago

Which OS do you use?

Do you use flush option for logging?

chetanshivaji commented 1 week ago

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 commented 1 week ago

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 commented 1 week ago

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