6,486 karma · joined July 15, 2018
blog: tanelpoder.com
Another research/testing area is whether I need to worry about memory ordering and possibly add some memory barriers, especially on ARM platform, as the eBPF task iterator passive sampler is an outside observer, periodically running on a different CPU, not injected to the context (and critical path!) of the monitored threads via tracepoints/probes.
One exception was when I visited a customer in Shanghai, it turned out that my purely technical blog was blocked in China (at least back then) as it was hosted on a wordpress.com subdomain. I then migrated it my own domain and it was accessible in China too.
The other reason is definitely tech-marketing for my business, but hopefully with 99% quality and 1% noise :-)
One thing that I had missed was function call argument tracing, but looks like ftrace will soon have it too (update: it's actually available on modern kernels already, look for CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS kernel config option).
https://lwn.net/Articles/1003386/
https://lpc.events/event/11/contributions/1106/attachments/7...
So that's just another way to demo what the higher-level "AI" similarity search means, but visually much more striking to people who are not that technical or are just getting started with this "AI" stuff.
Importantly, the web app also displays the SQL statements and execution plans (with performance metrics) that were executed in Postgres for generating the webpage. This makes some experimentation faster & easier as you could tweak the SQL or some parameter - create a different (vector) index - and just hit refresh in your browser to see the new results and the new execution plan with performance metrics.
My second goal was to blend together data from traditional tables (order history) and the newly generated embedding vectors, so I combined both worlds into a basic recommendation engine example. I first find top 20 most similar-looking cats compared to the selected one and then list the top purchased products by the 20 most similar-looking cats, all done within a single SQL query.
I haven't yet written a "formal launch post" of the CatBench Postgres/pgvector app that I used for examples in the current article, but all the source code and install instructions are already available here:
But when I see select distinct at the start of a big and complex query, I do immediately suspect that the developer might have missed some join condition down the line and “got too many rows” back from the query. And since the rows look like duplicates due to the missing join predicate, for a junior (or careless) developer, the quick “solution” is to just apply distinct in the top level query to get rid of these pesky duplicates, declare success and move on.
Showing examples of the "extended thread activity sampling" approach on DuckDB, MySQL, Postgres and Oracle.
The v2.0 UI GIF is here: https://github.com/dbsid/moats_rac
P.S. I've ran Linux/X (plus VMWare VMs with Windows) on my desktop machine with few complaints since the '90s and it was always the laptops that had issues, causing me to switch back to Windows after a couple of weeks of trial & frustration in the 2000s. I got Windows pretty performant & usable though, even attended Mark Russinovich'es Windows Internals class in London back in 2006 or so :-)
I still see MacOS as the best choice for my desktop/laptop uses (browser and SSH), but I also have a documents folder that I’ve accumulated over decades. I still use various .txt files in the docs folder as my low tech note taking apps.
I use the Spotlight or Alfred keyboard shortcuts (that also use spotlight index?) for quickly opening the files when needed - and annoyingly my most important file - notes.txt - regularly disappears from the Spotlight index and suggestions. It’s been like that for at least 5 years, probably closer to 10. I’m not even trying anymore, will just open the file from command line with vi as the fallback step.
[1] https://en.wikipedia.org/wiki/STONITH
[2] https://docs.oracle.com/en/operating-systems/oracle-linux/8/...
It is a correct metric when your block device has a single physical spinning disk that can only accept one request at a time (dispatch queue depth=1). But the moment you deal with SSDs (capable of highly concurrent NAND IO), SAN storage block devices striped over many physical disks or even a single spinning disk that can internally queue and reorder IOs for more efficient seeking, just hitting 100%util at the host block device level doesn't mean that you've hit some IOPS ceiling.
So, looks like the GPU "SM efficiency" analysis is somewhat like logging in to the storage array itself and checking how busy each physical disk (or at least each disk controller) inside that storage array is.
Regarding a durable/asynchronously destaged write cache, I think EMC Symmetrix already had such a feature in the end of '80s or 1990 (can't find the source anymore).
Otherwise, great article, illustrating that it's queues all the way down!
Edit: or Stripe.