HNHacker News
TopNewBestAskShowJobs

twotwotwo

1,841 karma · joined June 24, 2012

submissionscomments
twotwotwo··on Exploiting Byte-Accessibility of SSDs Within a Unified Memory-Storage Hierarchy [pdf]
I think the sources of the claimed benefits here are 1) the OS can stay out of some reads entirely, because PCIe devices directly answering requests to read/write memory is a thing, and 2) for small reads [or writes, as arcticbull notes below] you don't have to send the whole page between the SSD and the host system, freeing up bandwidth.

The gains measured in the paper are using emulation, so, like, they didn't really hack SSD firmware. There's got to be some cost on the controller side to service these new requests. And they seem to be accounting for this, but of course taking away some overheads doesn't take away the underlying limits of the storage medium or controller.

A couple things make something like this more interesting in the future: PCIe 4 doubles bandwidth and is supposed to be coming in some AMD chipsets soon (and the PCIe 5 spec has been finalized and, once it's really shipping, provides another doubling), and of course Intel/Micron's new storage medium has zippier read/writes than Flash.

I wonder whether arrangements like this over PCIe end up a middle ground between using swap/mmap'ing vs. way pricier setups with nonvolatile DIMMs.

twotwotwo··on Phantom OS, a Russian OS where “everything is an object”
WSL does some interesting stuff, including some new code running in kernel mode (there's more here: https://blogs.msdn.microsoft.com/wsl/2016/06/08/wsl-system-c...). No idea about Triton. gVisor is a user-space process providing a restricted Linux interface on top of regular-old Linux via syscall interception provided by ptrace. They all certainly demonstrate decoupling the "personality" presented to app code from the original interface of the kernel.

I'm trying to say something a little different, which is that lots of things conventionally thought of as OS design issues are not inherently about syscalls and ring 0, and can be (and are) worked on in userspace. Like, you can have capability-based interaction between mutually untrusted bits of memory-safe code (the model of this OS) inside a Unix or Windows process, and you can do a lot of other exploration of how to organize/format/communicate in userland. The kernel interface provides necessary tools but it's not all there is.

Of course kernel-side improvement is still important; foundations matter. Just, thinking big does not only have to mean replacing or even tweaking the kernel.

twotwotwo··on Phantom OS, a Russian OS where “everything is an object”
One thing it took me a while to realize is that a lot of what's provided by "OSes", the way users think of them, is standards: ABIs, protocols, formats, etc. And you can play with those in userspace. I am not saying kernels don't matter or anything, just that the kernel is not the only place one can play with radically different ways to organize stuff.

So: if you want code to communicate and share capabilities through objects in a memory-safe environment, you can do that. (Browsers without strict site isolation often do this with cross-site iframes.) If you want to serialize state so you can stop and restore across reboots, you can do that. (CRIU does something like this, for apps not written for it even.) Sufficiently advanced language environments and runtimes often end up redeveloping OS-y bits (schedulers, binary formats, standard ways to exchange data).

A big problem, as with completely new OSes with their own kernels and syscall interfaces, is getting people to develop to your interfaces. But it would be (is!) interesting to see folks build alternate universes in userspace that are much easier to dip into.

twotwotwo··on AMD EPYC Rome 2P Will Have 128-160 PCIe Gen4 Lanes and a Bonus
Yeah:

> I did give AMD the heads-up that it would be going live just after the Cascade Lake launch. They did not sanction this article (indeed, they will not be overly excited to see it is live.)

That seems to justify some doubts.

PCIe 4.0 support has got to cost some die area/power, and not many PCI devices will support it at first. That might point towards starting with a mix of 3.0 and 4.0 lanes.

If they did upgrade all lanes, and some devices show up, could be cool for some bandwidth-hungry GPU and/or HPC-networking use cases. Or for servers that wanted to load up on any kind of compatible device (SSDs, whatever): you can fit more 4.0 x4 than 3.0 x8 anythings in a given number of lanes.

Still think we'll have to wait a gen, though.

twotwotwo··on Amazon Aurora: Avoiding Distributed Consensus for I/Os, Commits, Membership
Yes, a single coordinator using other machines to do a lot of the work does make some otherwise very difficult problems seem more tractable.

An interesting unit for this kind of design outside the cloud would be a single rack of servers (or however much you can hook up to one switch)--assure pretty low latency to your remote RAM/disk.

twotwotwo··on Gmail confidential mode
Work is the one place this seems OK: if the company provides the email service, it can hide the forward button or whatever if it thinks that advances its interests.

Still think disclaimers about the limits (in the UI, not just the blog post) have to be be stronger. It could help avoid accidental leakage and communicate your intent to keep the contents confidential, but it's absolutely no use against someone hostile. I feel like the name should be more like "mark as confidential" or something, to clearly get across it's a strong suggestion but has no hard enforcement behind it.

twotwotwo··on On the Road to WebRTC 1.0, Including VP8
The AOM membership and the VP8 support may even be related. If Apple's assuming risk from submarine patents, etc. inherent in shipping an AV1 implementation, VP8 is something like a subset of it, so they can get that "for free".

The post talks about how iPhone 7's have worse battery life with VP8, which I'm sure is true, but it's still kinda funny because...it's Apple quasi-complaining here, and Apple who can solve the lack of acceleration, at least for future products.

twotwotwo··on Better web video with AV1 codec
If I'm parsing what I read right: 1.1 prohibits some narrow tiles--not the little 4x4 transform/prediction tiles, larger independently decompressible tiles that are used to allow parallelism. I suspect nobody was generating the narrow tiles before: it would be bad for compression, since the whole idea of these tiles is you can't predict across their boundaries. But they were technically allowed even if they didn't make sense.

The other things I see are a new option that doesn't break existing AV1 streams, and a couple changes that look like essentially editorial cleanups that were deferred during the spec freeze to avoid confusion.

They were right not to do these changes during spec freeze, but (at least from what I can see) they're not practical issues for folks considering AV1 encoding today.

twotwotwo··on What's the minimum number of words you'd need to define all other words? (2012)
There are lots of ways it's not at all the same, but it's at least sort of interesting to compare this question to the number of dimensions needed for effective word embeddings.
twotwotwo··on Well-Meaning Bad Ideas Spoiling a Generation
For the author's summary of the book's thesis, Ctrl-F "six intersecting or interacting threads."

If you're trying to explain what's different about this generation, and you do _not_ spend much time thinking about the rising costs of housing, higher education, and healthcare and the erosion of job security and benefits that many folks had in previous generations, you missed something. Weigel makes a lot of good broader points but I feel like that's an especially painful omission given the empirical and social-science gloss Haidt and his co-author are putting on their book. This is like explaining the past few generations in the US without mentioning the Great Depression, the New Deal, World War II...

Stories about how the younger generation is worse go back forever, and seem to be easy sells for various reasons--the world's always changing in ways that can be confusing and hard to keep up with, so a relatively tidy explanation that says the older generation's right and the kids are full of silly ideas can be comforting to some.

twotwotwo··on AresDB: Uber’s GPU-Powered Open-Source, Real-Time Analytics Engine
Any good resources on where GPU DBs offer significant wins? Especially, but not only, if it wins in cost efficiency for some workload.

My naïve impression working at smaller scales is that in a reasonably balanced system, storage is often the bottleneck, and if it can deliver data fast enough the CPU probably won't break a sweat counting or summing or so on. The amount of interest in GPU databases, though, suggests that's not the case for some interesting workloads.

twotwotwo··on New Method for Compressing Neural Networks Better Preserves Accuracy
I think the new things are integrating the SVD output into the NN as a couple of layers and then training it more, and adjusting the learning rate differently from how it was done before. The training step will tend to tune the compression to work well for the specific task.

Getting good results on the task is different from making the compressed representation of the embedding better on all-purpose metrics (like average magnitude of difference from the original embedding). For example, you might end up with changes that improve representation of common words, or words where errors actually mess up results, at the cost of making the decompression worse by simple metrics.

(It wasn't clear to me if the training adjusts the whole net's weights or just the two layers they add up front. If it adjusts everything, you could also get joint changes to the original net + decompression machinery that only work well together.)

twotwotwo··on New Method for Compressing Neural Networks Better Preserves Accuracy
I think the big matrix in the post is the "dictionary" used to map words to NN input vectors, not a representation of one input sentence or document. So its size is (total words understood by NN * dimensions of embedding).
twotwotwo··on New Method for Compressing Neural Networks Better Preserves Accuracy
Interesting 'cause once you think of it as a lossy compression task, lots of possible tricks come to mind. One is that you could "cheat" to correct the most important errors: look at which input words have high (distance from original point * frequency of use), and save the (in their example) 300-element error vector (original embedding - estimate) for those. Since we use the most common words a lot, you might be able to recover a noticeable chunk of accuracy without using much additional space.

Really, you want to correct the errors that are important, and importance to the task is a different thing from error magnitude * word frequency. You might run the network on real tasks with the uncompressed table and the compressed table, and add correction vectors for the words to which you can attribute the most mistakes made by the compressed net. And you don't necessarily have to correct the whole vector or correct it perfectly; you could round values in the correction vector down to zero when they're small enough, saving space and computation, or save your corrections with low precision, or try another round of SVD on some error vectors and only store 30 more weights for correcting important errors (and one 30x300 matrix) not 300, or some combo of tricks like that.

(I think this paper is saying that after you get the SVD-compressed lookup table, you do more NN training that tweaks the embedding and possibly the rest of the net. The links and weights for correcting important errors could be tweaked in the same process.)

It's tempting to treat neural networks as their own black box in a world apart from other CS sometimes, when in fact there can be lots of interesting connections. Now where all those connections ought to be and their ideal weights I don't know :P

twotwotwo··on Pessimism about parallelism
Can't tell if you're agreeing or disagreeing with this, but what I was trying to say is that full GCs happen (even when generational lets you delay them), thrash your caches to trace all live pointers in your heap, and still run faster on multiple cores. That seems to be in tension with the blog post's suggestion that you need locality for parallelism.

Many recent GCs don't actually try to use all your cores because they run concurrent with your app and want to leave a lot of capacity for it, but Go 1.4's GC (the last non-concurrent version) used all the cores it could, and V8's Orinico does in some phases too.

twotwotwo··on Pessimism about parallelism
FWIW, my aim was to give an illustrative example of what I meant by a chain of dependencies, and your garden-variety gunzip foo.gz has one. You can certainly come up with compression schemes or situations where not everything has to be serial.
twotwotwo··on Pessimism about parallelism
Yeah, what it takes to really, truly stop parallelism is an unbreakable linear chain of dependencies, like how LZ decompression needs the previous unpacked block to begin work on the next. (Not that LZ unpacking is maxing out people's CPUs these days.) That certainly exists sometimes but isn't nearly common enough to make me doubt the whole enterprise of parallelizing things.

The good news is that using all cores is one of the top things you can do to get work done sooner, and as such we probably will see investment happen. My work is pretty different from AAA games, but still parallelizing a big task is not infrequently lower hanging fruit than tuning the code for one unit of work. We've paid for the whole machine (or cluster) so we might as well use it.

Browsers are an interesting instance because they have a bunch of heterogeneous tasks with weird dependencies between them, and are huge, old codebases where you have to be careful adding threading, but they still manage to make real use of threads (e.g. running expensive compilers, decoding images, rendering, etc.).

Suspect you're saying ~this re: "foundational software", but as languages, tools, and libraries keep adapting to modern hardware, I think using parallelism confidently will become easier and we'll see more of it. Ecosystems change slowly but they do change.

ESR's claim about locality particularly seems iffy. A common task with very poor locality but useful parallel implementations is garbage collection: it thrashes your CPUs' caches, but thrashing all of them at once can still get it done sooner.

twotwotwo··on Pessimism about parallelism
Re: showing bottlenecks, the Go latency tracer may be a neat reference point; it doesn't find serial parts automatically, but it shows the execution timeline so that you can see them. Besides serial bottlenecks, it can be useful for seeing where you blocked waiting on I/O and so on:

https://blog.gopheracademy.com/advent-2017/go-execution-trac...

There might already be similar tools for Rust; I know less about what's available there.

(Go folks also added some tools for tracing across RPCs, which is less relevant to what you said but just kinda independently neat: https://medium.com/observability/debugging-latency-in-go-1-1...)

twotwotwo··on Amazon's homegrown Graviton processor was very nearly an AMD Arm CPU
If you look a couple years out, if there's an a2, etc. there are a few things that could notch up performance. There's the 7nm process (unless Amazon's a super early user of it like Apple--seems unlikely), there's newer ARM IP, and they could have accelerators off to the side for compression and public key crypto, as the Seattle chips were planned to do.

I don't think the goal of ARM server chips should be core-for-core near-parity with Intel big cores anytime soon, because those have much bigger die area and power needs, so you potentially pay in number of chips per wafer, yields, density, and power use. Instead you keep something reasonably small, try to get single-thread perf good _enough_ for a chunk of apps, and try to provide much better cost per unit throughput.

(They could also go for efficiency improvements to further cut power-related costs or make up for more consumption by faster cores. These seem far-out but theoretically: mobile-like big/little arrangements so light loads use even less power, or boxes with low-power RAM, or (least far-out) more of their Nitro IP moved onto the SoC. Who knows, just saying it's a wide-open design space.)

If this takes off enough for Intel to really pay close attention (not a certainty!), they do have their own cool scale-out experiments in Xeon D (an SoC Facebook originally wanted with relatively few cores and low clocks, with some SKUs including compression/crypto acceleration) and their Atom server chips. Getting something good and Intel responding with something better isn't the worst possible result.

twotwotwo··on How to Almost Learn Italian
Strongly second "expose yourself to a lot of the language" from my own experience with Spanish. Lot easier to get that exposure now than a decade or two ago, too.
twotwotwo··on Zstandard – Fast real-time compression algorithm
Right, I think "fast" is the idea. Do know of at least one OSS compression lib for the other kind of realtime use case FWIW: https://github.com/atomicobject/heatshrink
twotwotwo··on Dav1d: performance and completion of the first release
(jbk's recent reply answers this better than I could.)
twotwotwo··on Dav1d: performance and completion of the first release
Thanks, seemed like something like this might be the case, but good to hear it confirmed and the details. And thanks again for the work on dav1d!
twotwotwo··on Dav1d: performance and completion of the first release
The motivating observation here is that I know of a few GPU vendors offering hybrid decoding for HEVC and VP9, but no hybrid decoders put together by the open-source community. (Counterexamples are interesting!)

Reasons a GPU vendor might be better able to do this sort of thing than an outsider who can sling OpenGL include: 1) some hybrid decoders are described as leaning partly on special-purpose video decoding hardware, which tends to be a black box to us, and 2) more-detailed understanding of and access to the details of the hardware might let you efficiently express something that's inefficient or awkward in just GLSL--in other words, same kind of reason people care about Metal/Vulkan vs. OpenGL or asm vs. C.

(The further down in the weeds I get the less sure I am of precise technical correctness, but a couple concrete things that seem to make shaderizing decoding tricky are: 1) AV1 has a ton of control-flow-y elements--blocks can be split many different ways and be different sizes, and there are lots of prediction modes--and branchy code can be bad for shader efficiency, and 2) some things seem to block parallelism, e.g. for intra prediction you need the blocks you're predicting from before you can do predictions for the next block. And given the CPU-GPU transfer latency you can't ping-pong back and forth at will; you need large chunks that run well strictly on the GPU. Could be that pieces like the transforms and post-filtering that can be cleanly separated into GPU steps, though.)

An efficient open-source AV1 decoder based just on OpenGL/GLSL would be great! But since it wasn't mentioned as an ambition in the post, community-written hybrid decoders seem rare, and we had an expert about AV1 decoders in the thread, it did not seem unreasonable to me to ask how realistic it was.

Though if you manage to write an open-source OpenGL-accelerated AV1 decoder, that would definitely answer my question and leave everyone happy. :)

twotwotwo··on Dav1d: performance and completion of the first release
It's super neat to see desktop-class machines should be able to play 1080p AV1 fine with zero hardware support.

I think the lack of mention of GPUs in the post means the answer will be "no", but is this an area where open-source folks could realistically someday lean on the GPU for any help with decoding at all?

I see mentions of CPU/GPU "hybrid decoding" from GPU vendors, but can imagine that might only be something realistically possible with the lower-level access to the GPU the vendor's own driver team has, not via the documented shader languages and APIs.

twotwotwo··on Available on Google Cloud: Intel Optane DC Persistent Memory
Still a big gap. Random read time from NVMe Flash is on the order of 100µs, whereas service time for reads from this medium are lower. You can get an idea of how much lower based on the QD1 numbers of the SSDs based on it at https://www.anandtech.com/show/11953/the-intel-optane-ssd-90....

On top of that, the DRAM-like form is supposed to much further lower latency by 1) getting rid of NVMe and software overhead and 2) letting you read/write as little as a (64b) cache line at a time. We still don't know what the exact remaining latency is, and I bet the few with access through this program will still be NDAd from talking about it. We also don't know about the price/GB.

Those numbers, esp. price, will have a lot to do with how broad an impact this has at first: you can imagine a scenario where most folks currently building large DBs would find it worthwhile to replace 2/3 of their RAM with 5x as much of this stuff for the same price, though that seems kind of unlikely to be imminent. Or we may find out it's only going to be worth it in some niche applications and the rest of us have to wait some generations before it reaches us (if it ever does).

NVMe Flash is, obviously, still sufficient for a lot of workloads and today is nothing like, say, 2004 when I was writing DB-backed apps and HDD seeks were my bane. Notably, if your OLTP DB can have a lot of transactions in flight at once, or your reporting workload is doing sequential reads, you can take advantage of the very high throughput of modern Flash SSDs when working on lots of I/Os in parallel.

twotwotwo··on Global Kernel Locks in APFS
I'm too late to the thread, but wonder if locking might have to do with updating access times on the dirs on read--that would help justify a read-only workload taking some sort of exclusive lock. The "fix" there would be something like relatime to get atimes set infrequently.

There're def a ton of other possibilities. Some locking could be overbroad, like an exclusive lock where a reader lock would be enough. I don't see super-strong evidence that any locks involved are actually global, just that they're under contention here. And I can understand shipping a product with somewhat excessive locking because perf issues with specific workloads are a better problem to have with your shiny new FS rollout than data loss.

Anyway it's mostly shooting in the dark for us here (though cool some folks disassembled the functions), but there are some shots in the dark that look different from what I could find in the comments already here :)

twotwotwo··on Global Kernel Locks in APFS
They released the format spec here: https://developer.apple.com/support/apple-file-system/Apple-...
twotwotwo··on Poor Man’s Bose – Open Office and on the Go Noise Control
I got the big Leight headphones a while back and more recently QC35's.

My wife happened to get the older model MPOW adapter in the post; it broke with the blue-flashing-light issue that appears in some user reviews--she replaced it with a Yeti, which worked. Also, MPOW has newer models that might not have the issue and at least one reviewer said MPOW replaced their blue-flashing-light unit.

Seems accurate that the Leight things' passive isolation, combined with playing most any sound through them, should make background speech indistinct enough to be less distracting. Generally, like the post says, ANC is great at quieting deep rumbles (cars, trains, etc.), and physical isolation is better at blocking higher pitches (speech and higher noise). (Also ++ to the comment saying it's a shame many folks have to make up for employers imposing open offices, but only so much a single worker can do about that.)

What the Bose have going for them are 1) ANC seems like a legit win for train or plane trips, 2) I wanted a BT headset (including a mic for phone calls) and the QC35s provide that, 3) the QC35's are decent, though not audiophile-level, as headphones. And I'd heard lots of praise for them from acquaintances, which made me hopeful there'd be no unpleasant surprises.

The QC35's are doing the job. I don't know if some cheaper/different arrangement would also have done the job. ANC seems great when you want it, but for me that's not every day; maybe I could have gone w/something cheaper, or two setups similar to the blog post, one for work/calls and the other for the occasional noisy trip.

twotwotwo··on Zstandard Compression and the application/zstd Media Type
Ah, great that there's an official number. And does seem like incentives are aligned for servers to try to do the reasonable thing.
← PreviousPage 8 of 19Next →