Open yanzhang920817 opened 1 day ago
@hansvanthag Hello, do you have any doubts or suggestions? I will do some related tests, thank you.
As was stated (on discord support channel), there's multiple topics (of various sizes) being communicated along the 1Khz writes of 300 byte samples (for which the write and read execution times are being measured). So I have the following suggestions:
Therefore, the question to contribute a reproducer stands as we're pretty sure that on 'your' machine (2.4 Ghz i5) a 1Khz writer of 300 bytes shouldn't be that slow. Note that Jitter (on a non-realtime OS) can be caused by many things, so you might want to try to run the app at a RT-priority (nice --20) to see if that reduces the the write-time jitter .. FInally there's bundled performance-tests with Cyclone (pubsub/roundtrip) that you could try to see if those also behave strangely
My operating system is a real-time system with the rt patch added.
uname -a Linux dobot-IB-ITLU-TW01B 6.1.0-rt5 #1 SMP PREEMPT_RT Sun Oct 6 13:47:58 CST 2024 x86_64 x86_64 x86_64 GNU/Linux
I used chrt to give my program the highest priority, and tested that it could optimize timing jitter. (Isolating cores 0 and 1 was done before, but it had no obvious effect)
chrt -f 99 taskset -c 0,1 ./host
As was stated (on discord support channel), there's multiple topics (of various sizes) being communicated along the 1Khz writes of 300 byte samples (for which the write and read execution times are being measured). So I have the following suggestions:
- can you retry the test without those other topics being communicated 'in parallel' ?
- I assume a network is involved and if so: what network (100mbps, 1gbps, ..) is being used (to rule out congestion)
- shown top-output didn't indicate any threads with high-core-cpu-usage which is puzzling to us
- if I'm right that you're using KEEP_LAST(1) writer-history and (supposedly) best-effort reliability that makes it even stranger
Therefore, the question to contribute a reproducer stands as we're pretty sure that on 'your' machine (2.4 Ghz i5) a 1Khz writer of 300 bytes shouldn't be that slow. Note that Jitter (on a non-realtime OS) can be caused by many things, so you might want to try to run the app at a RT-priority (nice --20) to see if that reduces the the write-time jitter .. FInally there's bundled performance-tests with Cyclone (pubsub/roundtrip) that you could try to see if those also behave strangely
1, I will retry the test;
2, I am communicating locally, and the network port set in XML is a Gigabit port. Even if it is local communication, if the network port set in XML is a 100M port, will it affect the execution time?
3,After executing chrt -f 99 taskset -c 0,1 ./host
, the time jitter is within 100us;
4, I have turned on Turbo Boost, and all current test data are tested with Turbo Boost turned on.
According to the introduction of DDS, its real-time performance seems to be better, but after my test, the execution time of DDS's own API is not stable, as shown in the following example:
When tested on Ubuntu 20.04 with the rt patch, the CPU utilization was about 10%, and the execution time of
dds_write
anddds_take
jumped between 40us and 700us, which was very unstable. I am using cyclonedds-0.10.5.