
Go and a not tiny amount of memory - relyio
https://hackernoon.com/go-and-a-not-tiny-amount-of-memory-a7a9430d4d22
======
henpa
I wonder if libraries such as freecache[1] and bigcache[2] wouldn't offer a
better solution for this use case.

[1]
[https://github.com/coocood/freecache](https://github.com/coocood/freecache)
[2] [https://github.com/allegro/bigcache](https://github.com/allegro/bigcache)

------
peterwwillis
Every time I read one of these it's like watching someone in college learn
about databases, but it's actually a company.

~~~
dang
Regardless of how wrong or ignorant someone is, please don't be a jerk in
comments here. That's far worse in its systemic effect on the site. It looks
like the entire thread needs to learn this.

If someone is wrong or ignorant, teach them something. Then we all learn.
Alternatively, it's fine not to comment.

~~~
peterwwillis
Uh. I never said anyone or anything was wrong or ignorant. My comment was a
meta comment; there's nothing to teach.

~~~
dang
Maybe I misunderstood you, but to me it read like a putdown. Snarky putdowns
are the kind of thing we're trying to avoid here, especially when the putdown
is apparently for lack of knowledge.

------
jzwinck
So you use a GC and have occasional CPU usage spikes. You correctly identify
the cause. You then use "unsafe" code to go behind the GC's back and build
some stuff which probably has crash bugs or worse, and by your analysis solves
a problem which was not significant.

I shouldn't be surprised. The red flag was flying as soon as IOP was used in
singular form.

Input/Output Operations Per.

~~~
zackelan
> I shouldn't be surprised. The red flag was flying as soon as IOP was used in
> singular form.

> Input/Output Per.

IOPS can also be "I/O operations per second" and in that context "1 IOP" is a
meaningful quantity.

Particularly when AWS and other cloud providers sell capacity in units of
IOPS: [https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-
io-c...](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-io-
characteristics.html)

