by support »
Hello,
System 2 shows the result I keep hearing that people with low latency in mind achieve. Why System 1 wobbles like that is an interesting question, and it definitely seems like an operating system issue. Same hardware, same driver, completely different result.
The thing to keep in mind is that when the read() call is reached, the process goes into sleep mode, waiting for data to arrive. When the data arrives, the process goes back to running mode, but the operating system doesn't have to give it the processor immediately, or actually, at any specified time. It's up to the scheduler to decide.
So it could be that the scheduler on System 1 delays the execution for whatever reason. That makes even more sense if the processor had another process actively running while the test was made, which I suppose wasn't the case.
Anyhow, what happens if you call usleep(10) on system 1 instead of read()? That should put the process to sleep for 10 us. What do you actually measure?
Regards,
Eli
Hello,
System 2 shows the result I keep hearing that people with low latency in mind achieve. Why System 1 wobbles like that is an interesting question, and it definitely seems like an operating system issue. Same hardware, same driver, completely different result.
The thing to keep in mind is that when the read() call is reached, the process goes into sleep mode, waiting for data to arrive. When the data arrives, the process goes back to running mode, but the operating system doesn't have to give it the processor immediately, or actually, at any specified time. It's up to the scheduler to decide.
So it could be that the scheduler on System 1 delays the execution for whatever reason. That makes even more sense if the processor had another process actively running while the test was made, which I suppose wasn't the case.
Anyhow, what happens if you call usleep(10) on system 1 instead of read()? That should put the process to sleep for 10 us. What do you actually measure?
Regards,
Eli