Hello Hojoon,

The problem is a mix of PC hardware and OS, so it is not as simple as
saying that changing the OS will improve the latency to meet your need. It
will likely help. Increasing the CPU speed would also improve the latency
since context switches and all other actions will run faster, but you
cannot get a CPU that is 5x faster than your current 4.7 GHz! Also not all
the latency would be improved by increasing the CPU speed, some of the time
is in the network interface card, some in fixed delays.

Also improving performance in any application will encounter Amdahl's Law.
Speeding up one area will meet diminishing returns if there is time spent
in other areas.
https://en.wikipedia.org/wiki/Amdahl%27s_law

Moving from 20 ms to 5 ms will require a 75% reduction, already
challenging. Moving from 5 ms to 3 ms is a further 40% reduction, but
you'll have already eliminated all the easy (and some hard!) optimizations.
I do not have personal experience in pushing the latency that low, I hope
that others with experience will offer suggestions and their results.

Make sure your CPU is fixed in performance mode. Depending on what network
card you have, check if the vendor supplies any advice on tuning
performance. If your sample rate is lower, then changing the samples per
packet can help packets be dispatched more often, reducing some latency
there.
http://files.ettus.com/manual/page_transport.html

Regards,
Derek


On Thu, Jul 5, 2018 at 3:25 PM, Hojoon Yang <omnibu...@kaist.ac.kr> wrote:

> Hi, Derek.
>
> Thanks for detailed answer.
>
>
>
> I'm using ubuntu 14.04 and kernel version 4.2.0-42-generic and USRP X300
> with two UBX-160 which is connected to the host PC via 1G ethernet.
>
>
> In my application, the lowest delta value that works reliably is 20ms. The
> definition of reliability means that there is no 'L' for one minute during
> the execution of the application.
>
>
> I want the delta value to be 3~4 ms.
>
>
> so, since the problem is latency in OS side, I cannot improve the delta
> value even if I upgrade my host PC to good one. Am I right?
>
>
> the number of thread in the application may affect the latency? My
> application use two thread only. Since there are 4 cores in my host PC, I
> believe it barely affects the latency.
>
>
> To sum it up, to achieve 3~4 ms delta value (based on your delta
> value(5~20ms), I believe 3~4ms delta can be achieved), I should change
> the OS in the host PC to low latency linux kernel.
>
>
> Please correct me if I'm wrong. Thanks again!
>
>
>
>
>
> -----------------------Original Message-----------------------
> From: Derek Kozel <derek.ko...@ettus.com>
> To: Hojoon Yang <omnibu...@kaist.ac.kr>
> CC: usrp-users <usrp-users@lists.ettus.com>
> Sent date: 2018-07-05 22:11:03 GMT +0900 (ROK)
> Subject: Re: [USRP-users] timed transmission LATE issue
> Hello Hojoon,
>
> You will have to profile your system to determine the minimum delta that
> works reliably on your system, as well as choosing a definition for
> reliable. Networking stacks nearly always have stochastic delays due to the
> various context switches and scheduling issues with transferring data to
> and from a user program and the actual network hardware. On the USRP side
> the FPGA provides a much more deterministic behavior because the logic is
> exclusively serving the network traffic. The DRAM buffer on the transmit
> side is there to absorb some of the variability of the host computer
> network stack, but it can only do that if there is enough time delay
> between samples being sent by the program and when the DAC must be
> producing the associated analog signal.
>
> In practice I have always used a few (5-20) ms and found it to be reliable
> for transmissions lasting up to an hour, but you will have to test your
> specific setup. Different OS network stacks have different options for
> tuning to reduce both the average and peak latency of the network drivers.
> I'm not an expert in them but there are a variety of good resources online.
> In applications demanding both small latency and high reliability moving to
> a realtime Linux environment can help in meeting those hard deadlines. I
> believe that some of the LTE and GSM projects have been successful with
> that approach.
>
> Regards,
> Derek
>
> On Thu, Jul 5, 2018 at 12:34 PM, Hojoon Yang via USRP-users <
> usrp-users@lists.ettus.com> wrote:
>
>> Hi,
>>
>>
>>
>> I am using USRP X310 with two UBX-160 daughterboards.
>>
>>
>>
>> In my application, I am using timed transmission, for example,
>>
>>
>>
>> start transmission at (usrp_get_time_now() + delta)
>>
>>
>>
>> My question is, what is the smallest delta value that can be successful
>> in the *real world*? Theoretically, the delta can be any value, if the
>> host can send the packet to the USRP fast enough.
>>
>>
>> Suppose we have a PC which have i7-8700k CPU and the PC only runs this
>> application. when I set the delta 1ms, Can I avoid late 'L'?
>>
>>
>> Best regards,
>>
>> Hojoon
>>
>> ______________________________ _________________
>> USRP-users mailing list
>> USRP-users@lists.ettus.com
>> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
>>
>>
>
_______________________________________________
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

Reply via email to