HNHacker News
TopNewBestAskShowJobs

charleshn

251 karma · joined November 22, 2023

submissionscomments
charleshn··on AI used for skin cancer checks at London hospital
As someone with a phenotype more subject to skin cancer, I have been using an app called SkinVision for years.

From my anecdotal experience it tends to flag the same moles as dermatologists do, and they have actual dermatologists review images where the model has low confidence, so overall pretty happy with it.

Note that I am not affiliated with them in any way.

charleshn··on Formal Methods: Just Good Engineering Practice? (2024)
Definitely, I'm playing fast and loose with "lightweight formal method here", thanks for making it clear.

I was mentioning it in the same context as e.g. the Amazon paper on lightweight formal methods [0] where they use property-based testing to test that the implementation conforms to the model specification.

In a similar spirit, linearizability checkers like Porcupine [1] are a nice mix of formalism and usability.

I really like those because they are incredibly powerful, don't require a model and verify the actual implementation - obviously as you mention they are not exhaustive.

[0] https://assets.amazon.science/77/5e/4a7c238f4ce890efdc325df8...

[1] https://github.com/anishathalye/porcupine

charleshn··on Formal Methods: Just Good Engineering Practice? (2024)
On lightweight formal methods, a favorite of mine that's not widely known is trace verification using Linear Temporal Logic [0].

Basically you just need to log events - which you can even have for free in event-driven architectures etc - and run some predicates on execution traces, e.g. "Always(Locked, Implies(Eventually(Unlocked)))", etc.

One can run it on historical traces, but also couple it to stress tests, fuzzing etc to explore the state space.

Quite simple, powerful and widely applicable, and doesn't require a model, just predicates.

[0] https://en.m.wikipedia.org/wiki/Linear_temporal_logic

charleshn··on Tesla’s TTPoE at Hot Chips 2024: Replacing TCP for Low Latency Applications
Is the Quantum X800 generally available now? Looks like it was announced in March. The SN5600 was released last year on the other end.
charleshn··on Tesla’s TTPoE at Hot Chips 2024: Replacing TCP for Low Latency Applications
I don't believe the pricing is in the same ballpark.

There's also other differences, such as port counts. AFAICT Spectrum switches at 400Gbps have up to 128 ports whereas equivalent Infiniband NDR Quantum only have 64 [0].

When building clusters of 32K+ GPUs the network cost, power, transceivers etc start to add up.

[0] https://www.semianalysis.com/p/100000-h100-clusters-power-ne...

charleshn··on Tesla’s TTPoE at Hot Chips 2024: Replacing TCP for Low Latency Applications
Indeed, it seems that 80usec is just given as an upper bound based on the 1MB buffer at 100Gbps.

It is definitely possible to go much lower than 80usec on Ethernet. But obviously it depends on the scale, utilisation etc.

At the sizes of GPU clusters we're talking about these days - 32K and up - things get tricky.

The main alternative to Infiniband used in the industry is RoCE - Meta has written a lot about it [0].

There's several reasons to avoid Infiniband, such as cost, availability, vendor lock in, lack of experience etc.

Those are some of the reasons why many players are trying hard to make Ethernet work, see Ultra Ethernet [1].

[0] https://engineering.fb.com/2024/08/05/data-center-engineerin...

[1] https://ultraethernet.org/

charleshn··on Async hazard: MMAP is blocking IO
See also the classic "Are You Sure You Want to Use MMAP in Your Database Management System?" which mentions this common pitfall of mmap, and others, in the context of DBMS.

[0] https://db.cs.cmu.edu/papers/2022/cidr2022-p13-crotty.pdf

charleshn··on Why do CPUs have multiple cache levels? (2016)
This answer by Peter Cordes is much more complete: https://stackoverflow.com/a/38549736
charleshn··on Disk write buffering and its interactions with write flushes
It is the case, see the vm.dirty_expire_centisecs sysctl [0] at the VM layer, and the commit interval for e.g. ext4 [1] at the filesystem layer, and [2] for their interaction.

[0] https://docs.kernel.org/admin-guide/sysctl/vm.html#dirty-exp...

[1] https://www.kernel.org/doc/html/v4.19/filesystems/ext4/ext4....

[2] https://serverfault.com/a/995887

charleshn··on The return of the frame pointers
I've seen around 1-3% on non micro benchmarks, real applications.

Aee also this benchmark from Phoronix [0]:

  Of the 100 tests carried out for this article, when taking the geometric mean of all these benchmarks it equated to about a 14% performance penalty of the software with -O2 compared to when adding -fno-omit-frame-pointer.
I'm not saying these benchmarks or the workloads I've seen are representative of the "real world", but people keep repeating that frame pointers are basically free, which is just not the case.

[0] https://www.phoronix.com/review/fedora-frame-pointer

charleshn··on The return of the frame pointers
It's not just the loss of an architectural register, it's also the added cost to the prologue/epilogue. Even on x86_64, it can make a difference, in particular for small functions, which might not be inlined for a variety of reasons.
charleshn··on Algorithms for Modern Hardware
> Why are BLAS written in assembly for each CPU architecture?

On that specific subject of SIMD portability, embedded DSL like Highway developed by Google [0] can help. Hopefully it'll gain traction and usage.

[0] https://github.com/google/highway

charleshn··on When Optimising Code, Measure
I really like magic-trace [0].

https://github.com/janestreet/magic-trace

Not that the exact tracing relies on Intel PT - support for AMD was added recently but uses perf so suffers from the same sampling/skew issues, but is still very useful.

charleshn··on Linux 6.8 Network Optimizations Can Boost TCP Performance by ~40%
On that subject, it's worth knowing that with the default BIOS settings the whole socket shows up as a single NUMA node, which means that most workloads don't benefit from automatic NUMA balancing or manual NUMA-aware placement within a socket.

One needs to set NPS "Nodes per socket" to e.g. 4 to have one NUMA node per quadrant, and potentially also "L3 cache as NUMA" to have one per CCX [0].

[0] https://www.amd.com/content/dam/amd/en/documents/epyc-techni...

charleshn··on Why use strace in 2023? [video]
strace's -Z flag is quite useful to filter only syscalls that failed.

In a similar way, -k is useful to get tracebacks.

charleshn··on I tested four NVMe SSDs from four vendors – half lose FLUSH'd data on power loss (2022)
The original report [0] shows the corruption due to NUL bytes at the end of the file (see the hexdump). This comment [1] from Ted Ts'o details the exact chain of events leading to it.

[0] https://issuetracker.google.com/issues/172227346 [1] https://issuetracker.google.com/issues/172227346#comment8

charleshn··on Amazon Unveils Graviton4: A 96-Core ARM CPU with 536.7 GBps Memory Bandwidth
It's a shame more people aren't familiar with arithmetic intensity and the roofline model [1], which give a simple mental model for performance profiles on both CPU and GPU.

I always find this graph [2] covering decades of hardware evolution fascinating.

[1] https://en.m.wikipedia.org/wiki/Roofline_model

[2] http://www.nextplatform.com/wp-content/uploads/2022/12/donga...

charleshn··on I tested four NVMe SSDs from four vendors – half lose FLUSH'd data on power loss (2022)
It's likely because of delayed allocations (delalloc): https://issuetracker.google.com/issues/172227346#comment6

because the only guarantee which data=ordered provides is the security guarantee that stale data won't be revealed.

Yes, it's bad and breaks prefix append consistency, and does not match the documentation...

← PreviousPage 2 of 2