Live data from Hacker News

Garnet – A new remote cache-store from Microsoft Research

github.com

101–110 of 120 posts

Re: Garnet – A new remote cache-store from Microsoft Research

#101

Garnet’s storage layer, called Tsavorite, was forked from OSS FASTER, and includes strong database features such as thread scalability, tiered storage support (memory, SSD, and cloud storage), fast non-blocking checkpointing, recovery, operation logging for durability, multi-key transaction support, and better memory management and reuse. https://www.microsoft.com/en-us/research/blog/introducing-ga...

Yes, another OSS project by Microsoft

Re: Garnet – A new remote cache-store from Microsoft Research

#102
post #76

Judging from comments here I guess no one uses memcached anymore ?

I remember last using it in 2016 or so and it didn't seem particularly easy to configure (we wanted an LRU cache and it had a bunch of options that weren't very well explained, and we couldn't work out why it kept evicting items). We swapped it out for Redis and it was easy to configure and worked how we expected.

Re: Garnet – A new remote cache-store from Microsoft Research

#103
post #51

Earlier quoted context omitted.

Could you expand on "It was the opposite of DNS: it was never a problem."? Feel like I'm missing some interesting history here.

It’s just a common saying “the problem is always DNS”. When you have a weird networking issue, the problem always seems to be DNS. Either some misconfigured DNS entry or DHCP giving you the wrong server address, etc… And then the problem is confounded by the fact that, ironically, DNS works so well that we don’t think of it as a primary point of failure. So inevitably, when there is a DNS problem, it’s the last thing…

I just faced an issue with redis this week. It was causing my Javascript heap memory to go bust. I thought it was a data leak in my code but it turns out the redis client was filling it up and I fixed it by simply adding a static delay every 1 million set operations so that the garbage collector had enough time to do its job. (I was stress testing for a total of 6 million set operations)

Re: Garnet – A new remote cache-store from Microsoft Research

#104

Earlier quoted context omitted.

surprised to see a garbage collected language project (C# for Garnet) beat redis/dragonfly

Manual memory management vs garbage collection trades speed of allocation for speed of freeing memory. Freeing memory is expensive in a garbage collected language, but allocation is basically free. Modern garbage collectors are very good and handle many common use cases rather efficiently, with minimal or zero pauses, such as freeing short-lived objects. Many GC operations are done in parallel threads without stoppin…

Correction: JVM implementations perform escape analysis, in particular, because Java does not have structs. .NET does not perform escape analysis for objects and all attempts to experiment with it so far has shown greater impact on compilation speed with little to no profit in allocation rate. However, you will find average allocation traffic much lower in .NET because C# already puts way more data on stack through structs, non-boxing operations (where Java boxes), stack allocated buffers, non-copying slicing with spans and object pooling (which is common in Java too).

Re: Garnet – A new remote cache-store from Microsoft Research

#105

Earlier quoted context omitted.

Manual memory management vs garbage collection trades speed of allocation for speed of freeing memory. Freeing memory is expensive in a garbage collected language, but allocation is basically free. Modern garbage collectors are very good and handle many common use cases rather efficiently, with minimal or zero pauses, such as freeing short-lived objects. Many GC operations are done in parallel threads without stoppin…

Correction: JVM implementations perform escape analysis, in particular, because Java does not have structs. .NET does not perform escape analysis for objects and all attempts to experiment with it so far has shown greater impact on compilation speed with little to no profit in allocation rate. However, you will find average allocation traffic much lower in .NET because C# already puts way more data on stack through s…

Thank you, I missed the stack allocation design doc stating it’s on the roadmap. (https://github.com/dotnet/runtime/blob/main/docs/design/core...)

Appreciate the detail about the stack allocated bits in .NET.

Re: Garnet – A new remote cache-store from Microsoft Research

#106

Earlier quoted context omitted.

Correction: JVM implementations perform escape analysis, in particular, because Java does not have structs. .NET does not perform escape analysis for objects and all attempts to experiment with it so far has shown greater impact on compilation speed with little to no profit in allocation rate. However, you will find average allocation traffic much lower in .NET because C# already puts way more data on stack through s…

Thank you, I missed the stack allocation design doc stating it’s on the roadmap. ( https://github.com/dotnet/runtime/blob/main/docs/design/core... ) Appreciate the detail about the stack allocated bits in .NET.

Yeah, it kind of is. There are quite a few of experiments that are conducted to see if they show promise in the prototype form and then are taken further for proper integration if they do.

Unfortunately, object stack allocation was not one of them even though DOTNET_JitObjectStackAllocation configuration knob exists today, enabling it makes zero impact as it almost never kicks in. By the end of the experiment[0], it was concluded that before investing effort in this kind of feature becomes profitable given how a lot of C# code is written, there are many other lower hanging fruits.

To contrast this, in continuation to green threads experiment, a runtime handled tasks experiment[1] which moves async state machine handling from IL emitted by Roslyn to special-cased methods and then handling purely in runtime code has been a massive success and is now being worked on to be integrated in one of the future version of .NET (hopefully 10?)

[0] https://github.com/dotnet/runtime/issues/11192

[1] https://github.com/dotnet/runtimelab/blob/feature/async2-exp...

Re: Garnet – A new remote cache-store from Microsoft Research

#107

Garnet’s storage layer, called Tsavorite, was forked from OSS FASTER, and includes strong database features such as thread scalability, tiered storage support (memory, SSD, and cloud storage), fast non-blocking checkpointing, recovery, operation logging for durability, multi-key transaction support, and better memory management and reuse. https://www.microsoft.com/en-us/research/blog/introducing-ga...

I did follow FASTER implementation long ago. I thought it was very promising as a persistence library for a proof of concept project with high performance requirements I was working on then. BTW, it looks like both efforts are lead by the same person [1]

[1]: https://github.com/badrishc

Re: Garnet – A new remote cache-store from Microsoft Research

#110
post #80

Earlier quoted context omitted.

It’s great but you’re locked into visual studio if you want the most out of it (they put 95% of their effort in tooling there). You want to use visual studio?

I work in .NET on the daily on an M1 MBP using primarily VS Code and occasionally Rider. There's no need for VS for most (any?) .NET workloads these days. That's why I wrote it was an early mis-step. Nowadays, it's easy to do .NET dev on any platform. In fact, we ship our production runtime to AWS t4g (Arm64) instances.

The debugger is night and day vs visual studio. Not even comparable. Like 1% vs 99%. And there’s other tooling.

It can be done, but it’s so inferior to VS that you might as well use VS.

Post reply on HN