HNHacker News
TopNewBestAskShowJobs

tanelpoder

6,486 karma · joined July 15, 2018

A long-time computer performance nerd, creator of 0x.tools

blog: tanelpoder.com

submissionscomments
tanelpoder··on Understanding Modern Storage APIs: A systematic study of libaio, SPDK, io_uring [pdf]
A modern (database) engine that does millions of IOPS and uses a single (or a few) IO completion polling threads, typically pinned on dedicated CPUs, instead of having all CPUs busy handling “random” IO completion interrupts. Such apps tend to use thread-per-core architecture and have their own IO queues and dispatchers built in the app layer.

Examples: ScyllaDB, RedPanda. Both are using the Seastar framework for scheduling and IO.

tanelpoder··on The SGI XFS Filesystem
The reason for using raw/block devices back then (or Veritas VxFS that created additional raw devices to access VxFS files in a manner that bypassed regular OS filesystem I/O codepath & restrictions for reads & writes) was concurrent I/O.

In a busy database there are lots of processes reading a datafile and multiple processes writing (like DBWR checkpointing dirty blocks from buffer cache, but also some others), so this caused unnecessary file level contention in the OS kernel. Note that Oracle has I/O concurrency control built in, you can't have two processes accidentally writing the same block to the storage at the same time or a reader reading a "torn block" due to an ongoing write (the serialization happens at buffer lock/pin level in Oracle code).

So you wanted to have concurrent I/O and you either had to use raw devices or Veritas VxFS back then. Later on concurrent I/O became available for some other filesystems too, like Solaris UFS having the "cio" mount option, etc.

tanelpoder··on The SGI XFS Filesystem
Note that Oracle still uses "raw" block devices for high-performance configurations. It's called Oracle Automatic Storage Management (ASM), basically you give it a bunch of block devices without any partitions or file systems on them and ASM does its own "extent" placement, striping, mirroring, snapshots, etc. And Oracle's Exadata scale-out appliance also uses block devices without any filesystems directly, the DB nodes talk to any storage nodes over InfiniBand/RDMA (older hardware) or RDMA over Ethernet/RoCE.
tanelpoder··on Red Canary Mac Monitor
"Mac Monitor is practically the macOS version of the Microsoft Sysinternals tool Procmon."
tanelpoder··on Ask Wirecutter: Can you recommend a not-smart TV for me?
Basic.tv

Edit: as in you have to code BASIC to change the channel

tanelpoder··on Bracketed paste mode (2013)
I discovered this when I upgraded bash shell to the latest version (5.0) with HomeBrew on my Mac machine. This in turn used the readline 8.0 library that had the bracketed paste feature enabled by default. I had to `set enable-bracketed-paste off` in my .inputrc to revert back to previous behavior.
tanelpoder··on Firefox 66 to block automatically playing audible video and audio (2019)
Yup, this baffles me too. The counterarguments seem to be that "you're gonna see autoplaying content anyway and this just makes the advertisers life harder".

I think Google added an option to disable all/most autoplaying content in Chrome a couple of years ago. But they quickly backtracked and removed that flag, claiming that it breaks in-browser games or something like that. It's a pretty weak reason for me, I don't care about in-browser games, I just want to read a news article without some irrelevant video popup distracting me, plus blasting audio.

tanelpoder··on Firefox 66 to block automatically playing audible video and audio (2019)
What if I don't care about advertiser efficiency and just want to read a webpage with static content (without video popups and audio unasked for).

(Yes I know such sites/tricks may increase my download traffic and brower CPU usage, etc, but I would just stop using such sites then, as I do now)

tanelpoder··on Firefox 66 to block automatically playing audible video and audio (2019)
Which ones reliably work these days? (I have tried a few in past, none of them actually disabled all videos/popups with sound and moving content)
tanelpoder··on My Fear of Commitment to the First CPU Core
Thanks for the props :-) This might not mean that much here. But one very useful thing that came out of the long Oracle RDBMS performance career is that now I'm not afraid of addressing (attacking?) systems of any complexity. As the Oracle DB is one of the most complex pieces of software out there (it can also be a cache-coherent distributed system, BTW) so once you learn how to handle that, plus all the OS, storage interactions, you'll be capable of dealing with most (if not all) RDBMS out there :-)
tanelpoder··on My Fear of Commitment to the First CPU Core
Thanks for writing this up and doing the work preceding the writeup. Every time I read your articles, I learn something important and new (and I consider myself pretty good in the Linux perf/troubleshooting space :-)
tanelpoder··on Show HN: I trained an AI model on 120M+ songs from iTunes
Curious, did you just get the album/song lists from iTunes and get the corresponding raw music audio from other sources or does iTunes really allow one user account to download the raw audio of 120M songs?
tanelpoder··on Intel Cuts Employee Pay to Maintain Quarterly Dividend
Wouldn't the previous employer in the previous state still be able to sue you in their state (as your old employment contract specifies that any disputes will be resolved in the courts of that previous state)?
tanelpoder··on A corrupt file led to the FAA ground stoppage – also found in backup system
Yep and if you ship WAL transaction logs to standby databases/replicas, corrupt blocks or lost writes in the primary database won't be propagated to the standbys (unlike with OS filesystem or storage-level replication).

Edit: Should add "won't be silently propagated"

tanelpoder··on Maersk/IBM to discontinue TradeLens, a blockchain-enabled global trade platform
This is a great summary!
tanelpoder··on Maersk/IBM to discontinue TradeLens, a blockchain-enabled global trade platform
"Unfortunately, while we successfully developed a viable platform, the need for full global industry collaboration has not been achieved."

So... they successfully built the solution, but then failed to build a suitable problem for it?

tanelpoder··on Ship Wreck Database
Reading the title, I thought it was about another new database engine!
tanelpoder··on The new Mac Pro chip could double or quadruple the power of the M2 Max
Only ThreadRipper Pro mobos support that much as far as I know. ThreadRipper Pro CPUs are AMD EPYC server grade CPUs that are customized/rebranded for the workstation market segment. The regular “gaming CPUs” and motherboards support only 64-128 GB of RAM. Some have 4 DIMM slots, but the CPU still has only 2 channels, so with 4 DIMMs you won’t get any memory access throughput increases, just more space for caching stuff to avoid disk IOs. EPYC/TR Pro have 8 memory channels…
tanelpoder··on The new Mac Pro chip could double or quadruple the power of the M2 Max
Yep. The 1.5 TB max capability came “for free” with the Intel Xeon architecture (if you chose to populate the 12 DIMM slots with the expensive 128 GB ones).

Might be that very few people (if anyone at all!) actually did that or needed that.

Edit: However, 384 GB of RAM seems a too low maximum though for a maxed out 2023 professional workstation.

tanelpoder··on The new Mac Pro chip could double or quadruple the power of the M2 Max
Or just support additional memory boards, full of DRAM DIMMs, plugged into PCIe slots, accessed over CXL protocol (no need to use Optane, Intel killed it off anyway).
tanelpoder··on Pipe Viewer
I have written a (free OSS) Linux tool called `psn` for this kind of stuff [1]. It samples each interesting thread's state from /proc/PID/task/TID/status,wchan,syscall etc and shows you a summary of which threads were blocked in which state, in which syscalls and where in the kernel were they stuck (wchan). It can be used with applications like pv, tar, dd, mysqld, httpd, etc.

[1] https://0x.tools/#linux-process-snapper

tanelpoder··on Telefunc: Remote Functions instead of API
So now we’ll have another layer of an RPC API that under the hood calls the already existing REST API?
tanelpoder··on Why “go nuts, show nuts” doesn’t work in 2022
Does tumblr really hijack the browser back button? I tried to get back to HN from that link by hitting the back button, but I got redirected back to the tumblr article. I could have just closed the browser tab, but a long-press on the back-button allowed me to select this HN page from the recent history. Why does anyone still do this? Do they really think I give in and stay reading/browsing tumblr forever instead of doing what I had planned?
tanelpoder··on Someday aliens will land and all will be fine until we explain our calendar
But what if the aliens don’t even have (don’t need) the concept of an integer, therefore no concept of prime numbers - and no need to split times of natural cycles into equal integer-sized intervals?
tanelpoder··on Ask HN: Books on designing disk-optimized data structures?
I bought the "Algorithms and Data Structures for Massive Datasets" book recently, haven't had a chance to read it yet. "Massive" datasets should automatically imply using (mostly) on-disk data structures...

Edit: add link:

https://www.manning.com/books/algorithms-and-data-structures...

tanelpoder··on GCP, AWS, and Azure ARM-based server performance comparison
Good idea, thanks - the reader mode in Safari worked ok.
tanelpoder··on GCP, AWS, and Azure ARM-based server performance comparison
Was hoping to see the results, but the images were all blurry dummy placeholders (some sort of lazy loading for images?). The images had a text on "click here for preview", but when I clicked it, nothing happened (I have ad-blockers, maybe that's why some JS code was disabled).

But what the heck, this is not how wepages should work - click here to "unblur" the image? Why add such an extra step? To save bandwidth cost?

tanelpoder··on High System Load with Low CPU Utilization on Linux? (2020)
The main reason for mentioning the disk I/O demand was that all the other (classic) Unixes only include CPU demand as part of system load and not I/O. This will confuse sysadmins coming from Solaris/HP-UX/AIX/BSD background.

The other reason is that I've troubleshooted plenty of Linux load spike problems that are about CPU demand spikes only, usually due to some spinlock that gets held unusually long or some interrupt storm issue or some sort of a "database logon storm" due to connection pools in the app server suddenly creating thousands of additional DB connections...

tanelpoder··on High System Load with Low CPU Utilization on Linux? (2020)
Author of the blog post here. Thanks for the feedback and the extra XFS details (I'm not a big XFS expert). Is the XFS "lazytime" the same thing as the "relatime" mount option?
tanelpoder··on High System Load with Low CPU Utilization on Linux? (2020)
Yep, I once tested (and verified) that PSI doesn't account for the asynchronous I/O completion waits (io_getevents) just like Linux system load doesn't. So, both of them would miss the asynch I/O completion waits as a thread waiting for async I/O completion is in S state (not D). Once problem is so big that the block device I/O queues get full and even io_submit() calls hang - these threads would sleep in D state, so would contribute both to system load and PSI.

Edit: I understand that PSI was created as an easy (and cheap) to query metric to see if your Android mobile device has a problem (and some apps need to be killed) and not really for full blown troubleshooting drilldown of server workloads.

← PreviousPage 9 of 13Next →