Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
NovaX
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
61.
▲
by
NovaX
4y ago
Caffeine doesn't offer off-heap maps or primitive collections (many other great libraries do). It does use a data sketch for compact frequency storage and optimizes against the cpu cache line to avoid unnecessary memory accesses. There
62.
▲
by
NovaX
4y ago
It is handled by W-TinyLFU where I use this scenario as a stress test [1]. While LIRS / LIRS2 did not pass this one scenario, the quality of the work behind that policy leads me to believe it could be improved to handle that case. [1]
63.
▲
by
NovaX
4y ago
What about MRU-biased workloads? For example an analytical loop or row scanning in a db query? In those cases recency is a negative signal and there may not be much frequency to extract (e.g. equal frequencies in a loop). Instead the policy
64.
▲
by
NovaX
4y ago
frecency sounds similar to Redis' LFU which uses logarithmic counters [1]. Unfortunately many of these algorithms only do a good job in specific workloads and under perform in others. That's perfectly fine if one can narrow to a s
65.
▲
by
NovaX
4y ago
> TinyLFU does not handle dynamic changes to demand to the cache like 2Q does That was resolved in a follow up paper [1], though Ristretto does not implement this. It is implemented by Caffeine, mentioned briefly in this article, which i
66.
▲
by
NovaX
4y ago
Part 2 covers adaptivity and expiration. [1] There are also slides from Usenix Fast 20, but the video was not released (relevant [2], full [3]) [1] http://highscalability.com/blog/2019/2/25/design-of-a-m
67.
▲
by
NovaX
4y ago
"Operating Systems: Design and Implementation" is a classic book that was walks through Minix. It was a commonly used as a follow up course with projects to modify its code. Due to the author wanting to keep it dedicated towards e
68.
▲
by
NovaX
5y ago
In his book on api design, he repeatedly calls himself the next Newton. He rants that others don't recognize his genius yet, but expected to be revered by historians. The actual content in the book was shallow and poor. I hope he rece
69.
▲
by
NovaX
5y ago
It was added by these maintainers in 2.x and did not exist in 1.x. The maintainers are also different from 1.x developers and took the brand. They may regret their past decisions, but it was is irresponsible to claim that it was not their f
70.
▲
by
NovaX
5y ago
Unfortunately not. I simply realized later that my application design was conceptually similar to ECS. I could walk you through it over a Zoom, though.
71.
▲
by
NovaX
5y ago
entity = instance id component = metadata + data system = metadata processors This way you can decouple business rules from the model by using metadata to instruct how the entity should be processed. At work we use json schema as our type s
72.
▲
by
NovaX
5y ago
A language's core values is not determined by a small, vocal, subculture of its ecosystem. In Java's case, it was set early on to be a "blue collar" language [1]. If programmers fail to follow the spirit of the language
73.
▲
by
NovaX
5y ago
> In Java it would be a nest of SortComparator interfaces and SortAlgorithm implementors, which would act to hide the algorithm itself. That is odd because when I look at the Java style, DualPivotQuicksort [1], it seems that the language
74.
▲
by
NovaX
5y ago
The last version, 10, brought in a scan resistant cache (the PR is interesting [1]). It would have made a fun blog post. Hopefully they can write more about the internals when they make these types of improvements. [1] https://gi
75.
▲
by
NovaX
5y ago
I'm disappointed that the author forget about the WordPerfect Suite in Java [1]. That's the cool mid 90s running Java 1.0 on your beefy Pentium 133mhz desktop. You can still freely download and run it (it was unusably slow back th
76.
▲
by
NovaX
5y ago
My only experience with Go was to help advise a team when porting a Java cache. They struggled with performance because Go kept fighting them. This was partially due to it having a poor concurrency library, resulting in excessive use of rea
77.
▲
by
NovaX
5y ago
That assumes the developer can provide correct hints, which unfortunately is rarely true. In my experience it is better to invest in an algorithm that can detect these patterns, learn from the workload, and optimize accordingly. Modern cach
78.
▲
by
NovaX
5y ago
They decided against it, I believe because ClockPro was too complicated (but maybe NIH?). Instead they devised their own algorithm, DClock, borrowing ideas but is also different [1]. They use an ad hoc sizing rule (50%-99%) [2] which can dr
79.
▲
by
NovaX
5y ago
A multi-threaded benchmark of a cache should be fully populated and use a scrambled Zipfian distribution. This emulates hot/cold entries and highlights the areas of contention (locks, CASes, etc). A lock-free read benefits thanks to cp
80.
▲
by
NovaX
6y ago
Are you comparing a single threaded hash benchmark to a multithreaded cache benchmark? An unbounded concurrent hash table has 1B reads/s on a 16 core machine (~60M ops/s per thread)
81.
▲
by
NovaX
6y ago
> However, if this design is used as a local cache over shared memory for a high throughput system (trading? ML feature store?) the scalability can be handy. In that case, one might be concerned about the hit rates. While FIFO & LRU
82.
▲
by
NovaX
6y ago
Two other papers that may be of interest are RC-Cache [1] (admission policy) and Deep Cache [2] (prefetch policy). [1] https://ieeexplore.ieee.org/document/9109339 [2] https://dl.acm.org/doi/10.114
83.
▲
by
NovaX
6y ago
The minimum-increment approach for a frequency sketch is supposed to help improve the sketch's accuracy. Instead of incrementing all of the hashed counters (e.g. 4), it first reads to find the minimum, and then only increments those. W
84.
▲
by
NovaX
6y ago
I would recommend W-TinyLFU [1]. It offers higher hit rates, is adaptive, has lower metadata overhead, is O(1), and is the only policy that is robust against all workload patterns we have tried. This is what I proposed to the Linux folks wh
85.
▲
by
NovaX
6y ago
ARC shares the concept of non-resident (ghost) entries with LIRS, but uses that to dynamically adjust the SLRU partition (an LRU where probation entries are promoted to a protected region on a second hit). LIRS has fixed partitions and uses
86.
▲
by
NovaX
6y ago
What is the relationship of this change with mm/workingset.c? [1] That implements a custom algorithm, Double Clock, which is inspired by LIRS. This patch touches related code, but not that file where the core algorithm is described. I
87.
▲
by
NovaX
6y ago
> Kotlin methods are final by default unless marked open, and thus nonpolymorphic dispatch unless through an interface. This is a language construct and not enforced within the byte code. There have historically been reasons to allow fin
88.
▲
by
NovaX
6y ago
In the context of concurrent programming they are well known. We are not discussing how to program a PDP-8 but how to efficiently design multithreaded algorithms. This article recommends Nir Shavit’s book, who has written many well known pa
89.
▲
by
NovaX
6y ago
This is known as BP-Wrapper, a batching and prefetching technique, that also coined the term lock amortization. Sometimes this is confused with flat combining, which came out a little later and is a slightly different concept. [1] https:&#
90.
▲
by
NovaX
6y ago
Perhaps the author is referring to a technique such as how a cache can be made concurrent [1]. In that case every read is a write, as LRU requires moving entries. Since an LRU is often implemented as a doubly-linked list, it either is a ver
More ›