Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
NovaX
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
31.
▲
by
NovaX
3y ago
By long running I just meant anything that was not fast compute. I was more focused on finding the reference link so I agree my wording wasn’t clear. Go started without preemption and added it later. The Java team has indicated a similar pa
32.
▲
by
NovaX
3y ago
Yeah, I wasn’t being particular about this exact issue and was generalizing about synchronization pinning the carrier. A deadlock is trivial once the implications of that are thought through. https://mail.openjdk.org/piperma
33.
▲
by
NovaX
3y ago
It is a known caveat that virtual threads do not work well with long running synchronization by pinning the thread. That unfortunately means that for many applications it may be premature to adopt them, but it is mature enough for broader e
34.
▲
by
NovaX
3y ago
Or the author’s simulator if you prefer C. See their hyperbolic for an example. https://github.com/1a1a11a/libCacheSim/blob/develop/libCache...
35.
▲
by
NovaX
3y ago
That could work efficiently in a sampled caching policy. For example, Hyperbolic [1] maintains the frequency and insertion time on each entry and evicts the entry in the sample with the least utility value of frequency / (currentTime -
36.
▲
by
NovaX
3y ago
The problem with that approach is not only the time and effort to capture and analyze the trace, but that the workload changes over the application's lifetime. When the workload is expensive and important then cache analysis is worth d
37.
▲
by
NovaX
3y ago
Oh, thank you! I didn't realize that LRU Maintainer Thread was more than an expiration reaper. When it was first being introduced that was its first responsibility as lazy expiration removal by size eviction meant dead entries wasted c
38.
▲
by
NovaX
3y ago
Locking does not mean blocking. If you don't block the readers on the LRU reordering then it scales very well. That's a trick that's been in my production systems for 14 years now, and pretty much everywhere in Java land, tha
39.
▲
by
NovaX
3y ago
Those guarantees are also what makes the algorithm exploitable and inflexible to handle unknown or adversary workloads. Your LRU example suffers in scan / loop / zigzag patterns, which the author's policies do poorly at as we
40.
▲
by
NovaX
3y ago
Unfortunately most researchers do not consider attack vectors and often consider inputs that do not meet their preferred examples to be invalid. If a hostile user is able to pollute the cache so that it significantly degrades then that expl
41.
▲
by
NovaX
3y ago
Yes, basically you sample requests to improve concurrency and rely on the hottest entries to be more frequently observed in the sample. Memcached uses 60s intervals between promotions and a try-lock guard. A small variation is to do this pr
42.
▲
by
NovaX
3y ago
/u/someplaceguy, Those LIRS traces, along with many others, are available at this page [1]. I did a cursory review using their traces with Caffeine's and the author's simulators to avoid bias or a mistaken implementation
43.
▲
by
NovaX
3y ago
I think you may be right. The library author said he made many changes because implementing the eviction policy following the paper's design was pretty awful. > First, I tried to implement cache on hash table and lock free queues, a
44.
▲
by
NovaX
3y ago
I found sorting by recency to be helpful to see what mistakes users would make. There is not much feedback in open-source until after an api is released, at which point it is usually too late to fix problems. Seeing what users did, what fru
45.
▲
by
NovaX
3y ago
Oh interesting. Typically the gradle release notes, like 8.4-rc-1, will have comments that imply that Groovy build scripts compile but Kotlin ones lag. "Gradle now supports using Java 21 for compiling, testing, and starting other Java
46.
▲
by
NovaX
3y ago
Kotlin, not Groovy, has been the culprit for slower Gradle support. I believe there was some split module pain in Groovy wrt Java 9, but it has been very smooth since then. The Kotlin compiler on the other hand is not very forgiving. This i
47.
▲
by
NovaX
3y ago
qlio [1] was a really elegant implementation of this pattern before it was named and popularized. That provided a nice decoupling of the FE/BE teams by allowing very quick iterations, with an early means to compose apis to simplify the
48.
▲
by
NovaX
3y ago
not to distract from your valid points but, when used properly, Caffeine + Reactor can work together really nicely [1]. [1]: https://github.com/ben-manes/caffeine/blob/master/examples/c...
49.
▲
by
NovaX
3y ago
It is sad that Googling didn't find the answer by ChatGPT did. --- Here's an excerpt from the book "Java Threads" by Scott Oaks and Henry Wong, published by O'Reilly Media, which discusses green threads: "Green
50.
▲
by
NovaX
3y ago
I don't think VTs should be used in practice until Java 22, when it is likely that synchronization (monitors) will be supported [1]. A lot of code may synchronize and be non-trivial to convert to a ReentrantLock, such as ConcurrentHash
51.
▲
by
NovaX
3y ago
To clarify, the 1% window was a heuristic that we recommended in the first paper a a good default for most workloads. However we showed that sometimes a larger window was needed, and concluded that as future work. The follow up paper, which
52.
▲
by
NovaX
3y ago
Yes, I think that is my main concern in that often research papers do not disclose the weaknesses of their approaches and the opposing tradeoffs. There is no silver bullet. The stress workload that I use is to chain corda-large [1], 5x loop
53.
▲
by
NovaX
3y ago
In a shifting workload their algorithm achieves a 0.01% hit rate whereas LRU, ARC, and LIRS have a 20% hit rate and adaptive W-TinyLFU has an almost 40% hit rate.
54.
▲
by
NovaX
3y ago
You have a large corpus of similar workload patterns. Simply using a 750GB trace or many samples from a cluster of machines doing the same work does not make it a meaningful variety. It would be reasonable to have also tested with the trace
55.
▲
by
NovaX
3y ago
The LIRS papers do a good job of taking different workload patterns, such as loop and zig-zag and mixing multiple patterns together, to validate that their algorithm is robustly good as a general purpose cache. This seems to take traces wit
56.
▲
by
NovaX
3y ago
> Nondeterministically? Or maybe it was deterministic that "test" won over "main" because it was lexicographically larger?) Java uses classpath ordering for resolution, so a duplicated fully-qualified class name will
57.
▲
by
NovaX
3y ago
You can use native memory tracking to better inspect offheap usages. I had a similar problem where the default MaxMetaspaceSize was excessive and adjusted it to a reasonable setting. -XX:NativeMemoryTracking=summary jcmd <pid> VM.nati
58.
▲
by
NovaX
4y ago
You might enjoy the alternative approach taken by .NET's threadpool which uses hill climbing to dynamically adjust the number of threads. See this articles [1] and its references to Microsoft's papers on their design. Semi-related
59.
▲
by
NovaX
4y ago
Support for Markdown-based JavaDoc has been available since at least 2009 via multiple implementations [1, 2]. There have been many extensions thanks to the doclets api. The difference here is that Markdown will be included in the standard
60.
▲
by
NovaX
4y ago
Another to add to your collection, https://github.com/yahoo/Oak
More ›