You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some services need to get a timestamp to implement an aging mechanism. eBPF provides the bpf_ktime_get_ns helper, however we identified this function is slow in different benchmarks.
pcn-simplebride [1] and pcn-iptables [2] implement this by having a map that stores a timestamp that is updated by a thread in user-space, this solution is not ideal as each cube instance has a different thread just to update the timestamp.
This feature should be implemented directly in polycube, having a single thread for all the system to update that counter.
@mauriciovasquezbernal do we get some benchmark for bpf_ktime_get_ns() performance? I see related discussion in the thread iovisor/bcc#578, but it was closed without clear conclusion.
@goldenrye no, unfortunately, we do not have numbers to show but we did some experiments in the past and we noticed a slow down in the performance when that function is used.
As a consequence, we decided on some services (e.g., pcn-iptables), which do not need a nanoseconds granularity, to use a different approach with a thread that updates a counter every second (as explained in this issue) and read that counter from the eBPF program itself.
Some services need to get a timestamp to implement an aging mechanism. eBPF provides the
bpf_ktime_get_ns
helper, however we identified this function is slow in different benchmarks.pcn-simplebride
[1] andpcn-iptables
[2] implement this by having a map that stores a timestamp that is updated by a thread in user-space, this solution is not ideal as each cube instance has a different thread just to update the timestamp.This feature should be implemented directly in polycube, having a single thread for all the system to update that counter.
[1] 9a58dd3
[2] https://github.com/polycube-network/polycube/blob/master/src/services/pcn-iptables/src/modules/ConntrackTableUpdate.cpp#L110
The text was updated successfully, but these errors were encountered: