frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

OpenCiv3: Open-source, cross-platform reimagining of Civilization III

https://openciv3.org/
491•klaussilveira•7h ago•131 comments

The Waymo World Model

https://waymo.com/blog/2026/02/the-waymo-world-model-a-new-frontier-for-autonomous-driving-simula...
830•xnx•13h ago•497 comments

How we made geo joins 400× faster with H3 indexes

https://floedb.ai/blog/how-we-made-geo-joins-400-faster-with-h3-indexes
49•matheusalmeida•1d ago•7 comments

A century of hair samples proves leaded gas ban worked

https://arstechnica.com/science/2026/02/a-century-of-hair-samples-proves-leaded-gas-ban-worked/
106•jnord•4d ago•15 comments

Monty: A minimal, secure Python interpreter written in Rust for use by AI

https://github.com/pydantic/monty
160•dmpetrov•8h ago•75 comments

Show HN: Look Ma, No Linux: Shell, App Installer, Vi, Cc on ESP32-S3 / BreezyBox

https://github.com/valdanylchuk/breezydemo
163•isitcontent•8h ago•18 comments

Dark Alley Mathematics

https://blog.szczepan.org/blog/three-points/
59•quibono•4d ago•10 comments

Show HN: I spent 4 years building a UI design tool with only the features I use

https://vecti.com
273•vecti•10h ago•127 comments

Microsoft open-sources LiteBox, a security-focused library OS

https://github.com/microsoft/litebox
334•aktau•14h ago•162 comments

Show HN: If you lose your memory, how to regain access to your computer?

https://eljojo.github.io/rememory/
219•eljojo•10h ago•138 comments

Sheldon Brown's Bicycle Technical Info

https://www.sheldonbrown.com/
332•ostacke•14h ago•88 comments

Hackers (1995) Animated Experience

https://hackers-1995.vercel.app/
418•todsacerdoti•15h ago•220 comments

PC Floppy Copy Protection: Vault Prolok

https://martypc.blogspot.com/2024/09/pc-floppy-copy-protection-vault-prolok.html
33•kmm•4d ago•2 comments

Show HN: ARM64 Android Dev Kit

https://github.com/denuoweb/ARM64-ADK
10•denuoweb•1d ago•0 comments

An Update on Heroku

https://www.heroku.com/blog/an-update-on-heroku/
350•lstoll•14h ago•246 comments

Delimited Continuations vs. Lwt for Threads

https://mirageos.org/blog/delimcc-vs-lwt
9•romes•4d ago•1 comments

Show HN: R3forth, a ColorForth-inspired language with a tiny VM

https://github.com/phreda4/r3
55•phreda4•7h ago•9 comments

How to effectively write quality code with AI

https://heidenstedt.org/posts/2026/how-to-effectively-write-quality-code-with-ai/
206•i5heu•10h ago•150 comments

I spent 5 years in DevOps – Solutions engineering gave me what I was missing

https://infisical.com/blog/devops-to-solutions-engineering
118•vmatsiiako•13h ago•45 comments

Learning from context is harder than we thought

https://hy.tencent.com/research/100025?langVersion=en
155•limoce•3d ago•79 comments

Introducing the Developer Knowledge API and MCP Server

https://developers.googleblog.com/introducing-the-developer-knowledge-api-and-mcp-server/
30•gfortaine•5h ago•5 comments

Understanding Neural Network, Visually

https://visualrambling.space/neural-network/
255•surprisetalk•3d ago•32 comments

Female Asian Elephant Calf Born at the Smithsonian National Zoo

https://www.si.edu/newsdesk/releases/female-asian-elephant-calf-born-smithsonians-national-zoo-an...
12•gmays•3h ago•2 comments

I now assume that all ads on Apple news are scams

https://kirkville.com/i-now-assume-that-all-ads-on-apple-news-are-scams/
1008•cdrnsf•17h ago•421 comments

FORTH? Really!?

https://rescrv.net/w/2026/02/06/associative
50•rescrv•15h ago•17 comments

I'm going to cure my girlfriend's brain tumor

https://andrewjrod.substack.com/p/im-going-to-cure-my-girlfriends-brain
87•ray__•4h ago•40 comments

Evaluating and mitigating the growing risk of LLM-discovered 0-days

https://red.anthropic.com/2026/zero-days/
41•lebovic•1d ago•12 comments

Show HN: Smooth CLI – Token-efficient browser for AI agents

https://docs.smooth.sh/cli/overview
78•antves•1d ago•59 comments

How virtual textures work

https://www.shlom.dev/articles/how-virtual-textures-really-work/
32•betamark•15h ago•29 comments

Show HN: Slack CLI for Agents

https://github.com/stablyai/agent-slack
43•nwparker•1d ago•11 comments
Open in hackernews

Zram Performance Analysis

https://notes.xeome.dev/notes/Zram
95•enz•3mo ago

Comments

kragen•3mo ago
An alternative is zswap https://old.reddit.com/r/linux/comments/11dkhz7/zswap_vs_zra... which I believe, despite the name, can also compress RAM without hitting disk.
mscdex•3mo ago
It's only an alternative if you have a backing swap device. zram does not have this requirement, so (aside from using no compression) it's basically the only solution for some scenarios (e.g. using entire disk(s) for ZFS).
kragen•3mo ago
Can't you use a ramdisk as your backing swap device?
PhageGenerator•3mo ago
Using a ramdisk for zswap is basically just zram with extra steps.
kragen•3mo ago
Extra steps are fine if the result works better.
Ferret7446•3mo ago
It is not the same at all. The swapping algorithm can make a big difference in performance, for better or worse depending on workload
RealStickman_•3mo ago
Zram is just swap but in RAM. It uses the same algorithms as normal swap
heavyset_go•3mo ago
If you use hibernation, I think it also compresses your RAM image for potentially less wear and faster loading/saving
1oooqooq•3mo ago
why hibernation would not compress to begin with? you're more likely just end up running zstd twice.
heavyset_go•3mo ago
Swap isn't compressed by default, hibernation dumps memory to swap
kasabali•3mo ago
Hibernation uses compression regardless of zswap
heavyset_go•3mo ago
Thanks for the correction
sirfz•3mo ago
a comment here about zram caught my eye a day or two ago and I've been meaning to look into it. Glad to see this post (and I'm sure many others saw the same comment and shared my obsession)
dfc•3mo ago
You saw a comment a day or two ago about zram, but never got around to looking into it more even though you are obsessed by it?
burch45•3mo ago
This post’s conclusions are odd. It has a bunch of extensive benchmarks showing that zstd is by far the worst performing across every metric except a slight increase in compression ratio and then says the conclusion is zstd is the best choice. Unless I’m missing something in the data.
1oooqooq•3mo ago
the context is missing.

but for vps, where the cpu usage is extremely low and ram is expensive, it might make sense to sacrifice a little performance for more db cache maybe. can't say without more context

buildbot•3mo ago
I have had similar experience, with ZFS zstd dropped IOPs and throughput by 2-4x compared to lz4! On a 64 core Milan server chip…
colechristensen•3mo ago
ZFS lz4 in my experience is faster in every metric than no compression.
Havoc•3mo ago
Only if the data in question is at least somewhat compressible
colechristensen•3mo ago
Not really, it goes so fast through the CPU that the disk speed is at worst the same and the CPU overhead is tiny (in other words it's not fast while saturating the CPU, it's fast while consuming a couple percent of the CPU)

technically sure you're correct but the actual overhead of lz4 was more or less at the noise floor of other things going on on the system to the extent that I think lz4 without thought or analysis is the best advice always.

Unless you have a really specialized use case the additional compression from other algorithms isn't at all worth the performance penalty in my opinion.

Dylan16807•3mo ago
In the first benchmark it gets a ratio of 4 instead of 2.7, fitting 36-40% more data with 75% more CPU. It looks great.

The next two show it fitting 20% more data with 2-3x the CPU, which is a tougher tradeoff but still useful in a lot of situations.

The rest of the post analyzes the CPU cost in more detail, so yeah it's worse in every subcategory of that. But the increase in compression ratio is quite valuable. The conclusion says it "provides the highest compression ratio while still maintaining acceptable speeds" and that's correct. If you care about compression ratio, strongly consider zstd.

jftuga•3mo ago
Has anyone tried using zram inside of various K8s pods? If so, I'd be interested in knowing the outcome.
asgeirn•3mo ago
Inside the pods it makes no sense, but I do enable it on some memory-constrained worker nodes. Note that the kubelet by default refuses to start if the machine has any swap at all.
gatane•3mo ago
Just I was trying to find a benchmark about this, I wondered which algorithm would work best for videogames. Thanks!
dandanua•3mo ago
Video games and compute heavy tasks cannot have a large compression factor. The good thing is that you can test your own setup using zramctl.
coppsilgold•3mo ago
zram tends to change the calculus of how to setup the memory behavior of your kernel.

On a system with integrated graphics and 8 (16 logical) cores and 32 GB of system memory I achieve what appears to be optimal performance using:

    zramen --algorithm zstd --size 200 --priority 100 --max-size 131072 make
    sysctl vm.swappiness=180
    sysctl vm.page-cluster=0
    sysctl vm.vfs_cache_pressure=200
    sysctl vm.dirty_background_ratio=1
    sysctl vm.dirty_ratio=2
    sysctl vm.watermark_boost_factor=0
    sysctl vm.watermark_scale_factor=125
    sysctl kernel.nmi_watchdog=0
    sysctl vm.min_free_kbytes=150000
    sysctl vm.dirty_expire_centisecs=1500
    sysctl vm.dirty_writeback_centisecs=1500
Compression factor tends to stay above 3.0. At very little cost I more than doubled my effective system memory. If an individual workload uses a significant fraction of system memory at once complications may arise.
pengaru•3mo ago
LZ4 looks like the sweet spot to me, you get OK compression and the performance hit is minimal.
masklinn•3mo ago
As all tradeoffs it depends on your requirements. lz4 is ridiculously fast so it essentially gets you more ram for free, zstd is a lot more CPU-intensive but also has a much higher compression ratio. So if your RAM is severely undersized for some of your workloads and / or you're not especially CPU-bound until disk swap takes you out, then zstd gives you a lot more headroom.
avidiax•3mo ago
This seems like a great place to ask: how does one go about optimizing something like zram, which has a tremendous number of parameters [1]?

I had considered some kind of test where each parameter is perturbed a bit in sequence, so that you get an estimate of a point partial derivative. You would then do an iterative hill climb. That probably won't work well in my case since the devices I'm optimizing have too much variance to give a clear signal on benchmarks of a reasonable duration.

[1] https://docs.kernel.org/admin-guide/sysctl/vm.html

hdjfjkremmr•3mo ago
optuna, probably coupled with a VM to automate testing
Szpadel•3mo ago
you have have multiple layers of compression, but you need some simple Daemon (basically for loop in bash)

I use lz4-rle as first layer, but if page is idle for 1h it is recompressed using zstd lvl 22 in the background

it is great balance, for responsiveness Vs compression ratio

flaboonka•3mo ago
This sounds interesting. Do you have a link to the source for this daemon?
Szpadel•3mo ago
Sure I created instructions here:

https://gist.github.com/Szpadel/9a1960e52121e798a240a9b320ec...

flaboonka•3mo ago
This is ingenious, thank you.