Replies: 3 comments 7 replies
-
Thanks for the nice feedback !
I am not sure about that, since they all write to same sink and stumble the same lock. Another thing to check is the BUFSIZ of the libc your are using. If it is very small, lots of writing to disk would happen instead of buffering. |
Beta Was this translation helpful? Give feedback.
-
Lets us know if you find something we can do. Also, I suggest using the bench/latency.cpp for accurate and reproducible results. |
Beta Was this translation helpful? Give feedback.
-
Pr #1846 fixed this long time ago. Are you using an old version of spdlog? |
Beta Was this translation helpful? Give feedback.
-
Where I work we use a custom logging framework that I am trying to replace. I've been evaluating mainly boost.log and spdlog along with our custom logger and some small variations on it. Part of the evaluation is a benchmark that simply logs 1,000,000 messages as quickly as possible to a file using anywhere from 1 to 8 threads. By doing this I'm trying to get an idea of worst case performance with heavy contention on the logger.
The performance of all loggers on X86 architecture follows a general asymptotic pattern of the total execution time decreasing every time you add a thread. Going from 1 thread to 2 threads has a relatively large decrease in time. Going from 7 threads to 8 threads has a relatively small decrease in time, but it is still generally there. It's easy to see the trend that eventually the decrease in run time levels off and likely may even start increasing with too much contention.
All of that was as expected, but then I tried to repeat the experiment on the ARM architecture using an Nvidia Xavier, which has 8 cores and 32GB of RAM. All loggers except for spdlog continue to show the same asymptotic pattern of decreasing total run time. spdlog instead seems to exhibit an increasing asymptotic run time pattern. Is this multi-threaded performance a known problem on ARM? spdlog is my preferred logger and I wanted to push us in that direction, but the ARM performance is worrying me. Our applications are heavily multi-threaded and need to run on both architectures.
Here are some details that may help.
The code I'm running basically boils down to the following.
Here is an example of the total run times for spdlog for the two architectures.
Thank you for your attention and for this great library. I love the speed, functionality and ease of use of spdlog and hope that I can use it at work. I'm hoping this performance problem on ARM is a fluke or something that I am doing wrong.
Edit I forgot to add that I'm testing with spdlog version 1.9.2.
Beta Was this translation helpful? Give feedback.
All reactions