Live data from Hacker News

BPF: A New Type of Software

brendangregg.com

41–50 of 192 posts

Re: BPF: A New Type of Software

#42
post #22

Earlier quoted context omitted.

> "if this exceeds some limits or bogs down system for more than X milliseconds, disable and give error". AFAIK indefinite loops in a BPF are not allowed: The kernel eBPF verifier will reject to load such programs. So the execution time of BPF programs will not be variable time and will be predictive. I'm not sure if users need to care about the cases of long execution times when no loops are allowed.

How is that possible?? If true, that would imply BPF programs are not Turing complete.

That is a generally-useful property in various contexts, such as user-defined stream-processing functions running on shared systems. Long ago my main contribution to the re-write of the "Liverpool sort program" for processing nuclear physics data tapes was ensuring that the DSL wasn't Turing complete, to ensure progress would be made.

Re: BPF: A New Type of Software

#43
post #16

I have a hard time understanding what you would use it for. I could understand a use-case, but I fail to understand why it would be that much useful. I have a sense it allows much better performance for horizontal scaling, but I'm not sure...

Look at all the examples Gregg provides.

Re: BPF: A New Type of Software

#44
post #20
post #19

Earlier quoted context omitted.

Real-time, low latency, network-based applications. At the pace of network events, CPU is still very fast by perhaps at least order of magnitude. However, latency introduced by system calls is significant. This allows you to run certain classes of application in kernel space with these overheads largely mitigated. Principally it's monitoring and "observability" applications, but apparently it's much more flexible now…

Wouldn't virtualization kill the perf benefit, or is this supposed to run "on the metal"?

It’s a VM in the JIT sense, not a VM in the VMWare sense.

Re: BPF: A New Type of Software

#49
post #16

I have a hard time understanding what you would use it for. I could understand a use-case, but I fail to understand why it would be that much useful. I have a sense it allows much better performance for horizontal scaling, but I'm not sure...

One could replace JS with something that halts.
Post reply on HN