how to reduce the buffer flush timeout to write data to file?
Hi,
While logging CAN messages to BLF file, the file size won’t update quickly. I assume, there will be a certain timeout to update or write the data to file. If any such thing is there, then how to reduce that time out?
Comments (8)
-
repo owner -
repo owner -
assigned issue to
- marked as minor
-
assigned issue to
-
repo owner - changed status to open
-
reporter Thanks Tobias for your reply. By using V1, do i get any performance issues?
-
repo owner Hi Pavan,
No, not really. The performance of v1 is ok for most applications. Only if you want to read Gigs of data, the multi-threaded version, V2, works better. V3, I’m working on, will focus on random read access to seek back and forth.
Bye Tobias
-
Hi Tobias, I got an similar situation, I have changed objectqueue size to 100, and i continuously write CAN frames, before the queue is full, real disk write speed can up to 600KB/s, when the object queue is full, the write speed decrease to 120KB/s. The compress level i set to 0.I use iotop command to watch write speed.
-
repo owner Hi Creed,
if the queue is full, then the write operation blocks. Due to that the write speed decreases.
Bye
Tobias -
repo owner - changed status to closed
I think the issue is explained sufficiently. The write performance decreases as soon as the write buffer is filled. My performance analysis shows that both threads are running equally balanced. Further performance optimization is only possible with block wise read/write in all objects.
- Log in to comment
Hi Pavan,
yes, that’s exactly the problem. The variable is written delayed, when the background thread has written the data. In addition the file sizes increases in chunks, as data first need to be compressed into LogContainers.
So V2 of the library is runtime performance optimized, so background read/write operations. With this you will always have the delay. V1 of the library works without threads and there should got get an instant increase in the numbers.
I’ll keep this issue open as an enhancement request. It may be possible to add a low-level method to reserve space and to have immediately increase the reported file size, while the write into this space happens later in the background. I need to think about this…
Bye
Tobias