Readit News logoReadit News
shanemhansen commented on Netflix’s AV1 Journey: From Android to TVs and Beyond   netflixtechblog.com/av1-n... · Posted by u/CharlesW
shanemhansen · 14 days ago
> AV1 streaming sessions achieve VMAF scores¹ that are 4.3 points higher than AVC and 0.9 points higher than HEVC sessions. At the same time, AV1 sessions use one-third less bandwidth than both AVC and HEVC, resulting in 45% fewer buffering interruptions.

Just thought I'd extract the part I found interesting as a performance engineer.

shanemhansen commented on Ask HN: Scheduling stateful nodes when MMAP makes memory accounting a lie    · Posted by u/leo_e
shanemhansen · 24 days ago
This actually seems like a simple example of memory request vs limit.

Request the amount of memory needed to be healthy, you can potentially set the limit higher to account for "reclaimable cache".

Another way to approach it if you find that there are too many limiting metrics to accurately model things: is you let the workers grab more segments until you determine that they are overloaded. Ideally for this to work though you have some idea that the node is approaching saturation. So for example: keep adding segments as long as the nth percentile response time is under some threshold.

The advantage of this approach is you don't necessarily have to know which resource (memory, filehandles, etc) is at capacity. You don't even necessarily have to have deep knowledge of linux memory management. You just have to be able to probe the system to determine if it's healthy.

I can even go backwards with a binary split mechanism. You sort of bring up a node that owns [A-H] (8 segments in this case). If that fails bring up 2 nodes that own [A-D],[E-H], if that fails, all the way down to one segment per node.

shanemhansen commented on Moving from OpenBSD to FreeBSD for firewalls   utcc.utoronto.ca/~cks/spa... · Posted by u/zdw
zokier · 24 days ago
You mean like DPDK?
shanemhansen · 24 days ago
I'd think something like Rump Kernel's is a closer analogue: https://en.wikipedia.org/wiki/Rump_kernel
shanemhansen commented on How I fell in love with Erlang   boragonul.com/post/fallin... · Posted by u/asabil
jacquesm · a month ago
> Why has no one put microkernels and Erlang into a blender? I know there's QNX, but it's still UNIX, not Erlang.

That's a very good question. There are some even lesser known dialects out there that do this but you are going to find it hard to get to the same level of feature completeness that Erlang offers out of the box.

QNX and Erlang embody quite a few of the same principles, but QNX really tried hard to do this at the OS process level in a way that destroyed a lot of the advantages that doing the same under Erlang would have. I think the main obstacle is the fact that the CPU does not support reductions natively. Maybe you could take it a step further and design an FPGA CPU that implements the core features of Erlang at the hardware level?

That would be an absolutely awesome project. Usually when you can think of it someone has already done it so a bit of googling would be a good way to start with that.

shanemhansen · a month ago
You nerd sniped me a little and I'll admit I'm not 100% sure what a reduction is but I've understood it to be a measurement of work for scheduling purposes.

A bit of googling indicates that actually you can use performance monitoring instur to generate an interrupt every n instructions. https://community.intel.com/t5/Software-Tuning-Performance/H...

Which is part of the solution. Presumably the remainder of the solution is then deciding what to schedule next in a way that matches erlang.

Disclaimer: this is based off some googling that makes it seem like hardware support the desired feature exists, not any actual working code.

shanemhansen commented on How We Found 7 TiB of Memory Just Sitting Around   render.com/blog/how-we-fo... · Posted by u/anurag
shanemhansen · 2 months ago
The unreasonable effectiveness of profiling and digging deep strikes again.
shanemhansen commented on Tcl-Lang Showcase   wiki.tcl-lang.org/page/Sh... · Posted by u/luismedel
shanemhansen · 2 months ago
Tcl was my first "general purpose" programming language (after TI-basic and Matlab).

When I started that job I didn't know the difference between Tcl and TCP. I spent a couple months studying Phillip Greenspuns books. It also made me a better engineer because unlike PHP I couldn't just Google how to do basic web server stuff so I had to learn from first principles. That's how I ended up building my first asset minification pipeline that served the "$file.gz" if it existed with content-encoding: gzip.

Nearly 20 years later and I'm basically a http specialist (well, CDN/Ingress/mesh/proxy/web performance).

Tcl is still kind of neat in a hacky way (no other language I've run across regularly uses upvars so creatively).

Shout-out to ad_proc and aolserver.

shanemhansen commented on Dgsh – Directed graph shell   www2.dmst.aueb.gr/dds/sw/... · Posted by u/pabs3
esafak · 3 months ago
Greetings, Diomidis.

I would suggest a familiar notation like "[a, b] -> c" in a dedicated dag block:

  dag text_stats {
    tee -> [ split_words, count_chars ]

    # word-based frequencies
    split_words -> tee_words
    tee_words -> ngram2 -> save_digram
    tee_words -> ngram3 -> save_trigram
    tee_words -> ranked_frequency -> save_words

    # character-based frequencies
    count_chars -> add_percentage
    chars_to_lines -> ranked_frequency -> add_percentage -> save_chars
  }

  run text_stats < input.txt
https://www2.dmst.aueb.gr/dds/sw/dgsh/#text-properties

or

  dag commit_graph {
    git_log -> filter_recent -> sort -n -> [ uniq_committers, sort_by_email ]

    uniq_committers -> [ last_commit, first_commit, committer_positions ]
    [ last_commit, first_commit ] -> cat -> tr '\n' ' ' -> days_between

    [ committer_positions, sort_by_email ] -> join_by_email -> sort -k2n -> [ make_bitmap_header, plot_per_day ]

    [ uniq_committers, days_between ] -> emit_dims -> plot_per_day

    make_bitmap_header -> cat
    plot_per_day -> morphconv -> [ to_png_large, to_png_small ]
  }

  run commit_graph
https://www2.dmst.aueb.gr/dds/sw/dgsh/#committer-plot

The translations above are computer-assisted and may contain mistakes, but you get the idea.

shanemhansen · 3 months ago
The closeness of this syntax to graphviz dot is very interesting.

having dgsh output a graphvis file in dry-run mode would be a neat feature.

shanemhansen commented on OPA maintainers and Styra employees hired by Apple   blog.openpolicyagent.org/... · Posted by u/crcsmnky
robertlagrant · 4 months ago
That's still not saying what it is, though. Is it a thing you put in front of your backend to allow/deny requests? Is it an endpoint something like nginx calls with an auth token and the http verb and url that responds with 200/403 that nginx can react to? Is it a library you embed in your application? Is it an agentic AI?

It's as though you're describing a car to someone who's never seen a car before by listing all the places you can go in a car.

shanemhansen · 4 months ago
Fundamentally it's a programming language so all the normal ways of running it apply:

Use their library in your application to evaluate policies.

Run it from the cli.

Embed it in some service like nginx.

The language itself is pretty focused on some prolog-ish describing of what constitutes an allow/deny decision.

shanemhansen commented on QUIC for the kernel   lwn.net/Articles/1029851/... · Posted by u/Bogdanp
kibwen · 5 months ago
I'm confused, I thought the revolution of the past decade or so was in moving network stacks to userspace for better performance.
shanemhansen · 5 months ago
You are right but it's confusing because there are two different approaches. I guess you could say both approaches improve performance by eliminating context switches and system calls.

1. Kernel bypass combined with DMA and techniques like dedicating a CPU to packet processing improve performance.

2. What I think of as "removing userspace from the data plane" improves performance for things like sendfile and ktls.

To your point, Quic in the kernel seems to not have either advantage.

shanemhansen commented on Dear valued user, You have reached the error page for the error page   imgur.com/a/2H7HVcU... · Posted by u/Alex3917
exiguus · 5 months ago
Error page of the error page made me smile. Somehow, this makes total sense to me. Consider a reverse proxy where the origin is down and displaying the 'real' error page is not possible because of that. Alternatively, imagine a CloudFront function or Lambda experiencing the same issue, or encountering so many redirects that it interrupts and simply shows the error page of the error page. Nonetheless, I agree that you shouldn't see this issue very often.
shanemhansen · 5 months ago
I had this for a reverse proxy I developed that did some transformations. At about two critical points if there was an error there was literally nothing we could do except 500 barf.

u/shanemhansen

KarmaCake day2526December 10, 2011View Original