Readit News logoReadit News
dahfizz commented on What a year of solar and batteries saved us in 2025   scotthelme.co.uk/what-a-y... · Posted by u/MattSayar
UltraSane · a month ago
Heat pumps are no more fragile than air conditioners.
dahfizz · a month ago
Which are famously reliable and cheap to service...
dahfizz commented on How memory maps (mmap) deliver faster file access in Go   info.varnish-software.com... · Posted by u/ingve
gustavpaul · 4 months ago
The MmapReader is not copying the requested byte range into the buf argument, so if ever the underlying file descriptor is closed (or the file truncated out of band) any subsequent slice access will throw SIGBUS, which is really unpleasant.

It also means the latency due to pagefaults is shifted from inside mmapReader.ReadRecord() (where it would be expected) to wherever in the application the bytes are first accessed, leading to spooky unpreditactable latency spikes in what are otherwise pure functions. That inevitably leads to wild arguments about how bad GC stalls are :-)

An apples to apples comparison should be copying the bytes from the mmap buffer and returning the resulting slice.

dahfizz · 4 months ago
Being able to avoid an extra copy is actually a huge performance gain when you can safely do it. You shouldn't discount how useful mmap is just because its not useful in every scenario.

You shouldn't replace every single file access with mmap. But when it makes sense, mmap is a big performance win.

dahfizz commented on How memory maps (mmap) deliver faster file access in Go   info.varnish-software.com... · Posted by u/ingve
benjiro · 4 months ago
People are so focused on the mmap part, and the latency, that the usage is overlooked.

> The last couple of weeks I've been working on an HTTP-backed filesystem.

It feels like this is micro optimizations, that are going to get blocked anyway by the whole HTTP cycle anyway.

There is also the benchmark issue:

The enhanced CDB format seems to be focused on a read only benefits, as writes introduced a lot of latency, and issue with mmap. In other words, there is a need to freeze for the mmap, then unfreeze, write for updates, freeze for mmap ...

This cycle introduces overhead, does it not? Has this been benchmarked? Because from what i am seeing, the benefits are mostly in the frozen state (aka read only).

If the data is changed infrequently, why not just use json? No matter how slow it is, if your just going to do http requests for the directory listing, your overhead is not the actual file format.

If this enhanced file format was used as file storage, and you want to be able to fast read files, that is a different matter. Then there are ways around it with keeping "part" files where files 1 ... 1000 are in file.01, 2 ... 2000 in file.02 (thus reducing overhead from the file system). And those are memory mapped for fast reading. And where updates are invalidated files/rewrites (as i do not see any delete/vacume ability in the file format).

So, the actual benefits just for a file directory listing db escapes me.

dahfizz · 4 months ago
This reads like complete nonsense. If HTTP is involved, lets just give up and make the system as slow as possible?

The HTTP request needs to actually be actioned by the server before it can respond. Reducing the time it takes for the server to do the thing (accessing files) will meaningfully improve overall performance.

Switching out to JSON will meaningfully degrade performance. For no benefit.

dahfizz commented on EVs are depreciating faster than gas-powered cars   restofworld.org/2025/ev-d... · Posted by u/belter
IAmBroom · 4 months ago
My take was: the only lube-requiring, wear-out-fast part was the differential, and on EVs they are much simpler, with less to wear out.

ICEs have MANY wear-out-fast parts (where "fast" is relative) requiring lube, and lube itself suggests the risk of frictional degradation.

dahfizz · 4 months ago
The differential on an EV is the same as on an ICE car. It does the same job either way, it doesn't care whether the power source is gas or electricity.

But on an EV, that's basically the only thing that needs somewhat regular "oil changes". Whereas ICE motors & transmissions also need fluid changes regularly.

dahfizz commented on This map is not upside down   maps.com/this-map-is-not-... · Posted by u/aagha
kqr · 5 months ago
I try to say "countries around the northern Atlantic" because that's really what people mean by "West".
dahfizz · 5 months ago
What about Australia?

I’m not sure there is one simple & correct definition of “the West”.

dahfizz commented on QUIC for the kernel   lwn.net/Articles/1029851/... · Posted by u/Bogdanp
dan-robertson · 6 months ago
I think the ‘fast’ claims are just different. QUIC is meant to make things fast by:

- having a lower latency handshake

- avoiding some badly behaved ‘middleware’ boxes between users and servers

- avoiding resetting connections when user up addresses change

- avoiding head of line blocking / the increased cost of many connections ramping up

- avoiding poor congestion control algorithms

- probably other things too

And those are all things about working better with the kind of network situations you tend to see between users (often on mobile devices) and servers. I don’t think QUIC was meant to be fast by reducing OS overhead on sending data, and one should generally expect it to be slower for a long time until operating systems become better optimised for this flow and hardware supports offloading more of the work. If you are Google then presumably you are willing to invest in specialised network cards/drivers/software for that.

dahfizz · 6 months ago
Yeah I totally get that it optimizes for different things. But the trade offs seem way too severe. Does saving one round trip on the handshake mean anything at all if you're only getting one fourth of the throughput?
dahfizz commented on QUIC for the kernel   lwn.net/Articles/1029851/... · Posted by u/Bogdanp
dahfizz · 6 months ago
> QUIC is meant to be fast, but the benchmark results included with the patch series do not show the proposed in-kernel implementation living up to that. A comparison of in-kernel QUIC with in-kernel TLS shows the latter achieving nearly three times the throughput in some tests. A comparison between QUIC with encryption disabled and plain TCP is even worse, with TCP winning by more than a factor of four in some cases.

Jesus, that's bad. Does anyone know if userspace QUIC implementations are also this slow?

dahfizz commented on Aeron: Efficient reliable UDP unicast, UDP multicast, and IPC message transport   github.com/aeron-io/aeron... · Posted by u/todsacerdoti
vodou · 7 months ago
After years of maintaining and using an application suite that relies on multicast for internal communication, I would hesitate to use "reliable" and "multicast" in the same sentence. Multicast is great in theory, but comes with so many pitfalls and grievances in practice. Mostly due to unreliable handling of switches, routers, network adapters and TCP/IP stacks in operating systems.

Just to mention a few headaches I've been dealing with over the years: multicast sockets that joins the wrong network adapter interface (due to adapter priorities), losing multicast membership after resume from sleep/hibernate, switches/routers just dropping multicast membership after a while (especially when running in VMs and "enterprise" systems like SUSE Linux and Windows Server, all kinds of socket reuse problems, etc.

I don't even dare to think about how many hours I have wasted on issues listed above. I would never rely on multicast again when developing a new system.

But that said, the application suite, a mission control system for satellites, works great most of the time (typically on small, controlled subnets, using physical installations instead of VMs) and has served us well.

dahfizz · 7 months ago
Aeron is very popular in large financial trading systems. Maybe since multicast is already commonplace (that's how most exchanges distribute market data).
dahfizz commented on California's most neglected group of students: the gifted ones   latimes.com/opinion/story... · Posted by u/tafda
andrepd · a year ago
You are equating "persecuting genius" with "supporting those from low-opportunity backgrounds". Classic mistake, especially considering that those kids could become """geniuses""" too if they had a chance to even try. Giving a decent shot at those from disadvantaged households will ironically probably do more towards improving the number of high achievers than allocating too many resources to the children of the rich, which is what we're doing now.
dahfizz · a year ago
How does removing gifted and talented programs support "those from low-opportunity backgrounds"?

"persecuting genius" is literally what is happening.

dahfizz commented on The Case for a High-Level Kernel-Bypass I/O Abstraction (2019)   irenezhang.net/blog/2019/... · Posted by u/eventhelix
jiggawatts · a year ago
Meanwhile the best network I’ve ever benchmarked was AWS and measured about 55µs for a round trip!

What on earth are you using that gets you down to single digits!?

dahfizz · a year ago
The key is that blibbe is talking about switches. Modern switches can process packets at line rate.

If you're working in AWS, you almost certainly are hitting a router, which is comparably slower. Not to mention you are dealing with virtualized hardware, and you are probably sharing all the switches & routers along your path (if someone else's packet is ahead of yours in the queue, you have to wait).

u/dahfizz

KarmaCake day9469April 2, 2018View Original