Live data from Hacker News

Cache is the new RAM

blog.memsql.com

71–80 of 97 posts

Re: Cache is the new RAM

#71
Okay, if the title is correct, then to heck with traditional RAM and, instead, have very long addresses, say,

     a(i).b(j).c(k) ...
stored in, say, a key-value store. Then, as usual for caching, just hash that long address.

Why do that? Mostly no one really wants the sequential addresses, and a lot of work in software and the processor is calculating those sequential addresses nearly no one really wants anyway. So, e.g., software collection classes, just let the keys be the long addresses and f'get about AVL trees, red-black trees, etc. And for sparse matrices, just use the row and column indices as the addresses and f'get about all the tricky addressing for sparse matrices. Etc.

Re: Cache is the new RAM

#72
post #7

The database I want still doesn't exist. Here's what I want: - Easy sharding, a la Elasticsearch. I want virtual shards that can be moved node to node and an easy to understand primary/replica shard system for write/reads. I want my DB nodes to find each other with an easy discovery system with plugins for AWS/Azure/Digital Ocean etc. - Fucking SQL. I don't want to learn your stupid DSL. I want to give coworkers a SQ…

Check out python blaze: http://blaze.pydata.org/docs/v_0_6_5/index.html

http://continuum.io/blog/blaze-datasets

Re: Cache is the new RAM

#73

> It pisses me off to no end these developers have to out-think SQL and re-invent the whole damn new wheel for "efficiency's" sake. Worked with someone who did this a couple years ago. I keep trying to get him to explain why he was reinventing sql, and never did get a clear answer to that. > just waggles their dick around saying Sorry to be the one to say it, but I don't think that part was necessary or appropriate t…

There seems to be a culture clash on HN. On one side there is California, where "dick wagging" is an unnecessary instance of gendered language, certain to drive women out of the tech industry. On the other side there's the rest of the world, where being offended by "dick wagging" seems dazzlingly childish. It's just a penis, most grown men and women know what they are and observe their motions on a daily basis. In Bh…

[deleted]

Re: Cache is the new RAM

#74
That's how it has always been. We take different storage/memory technologies, sort them by their speed and price, put the fastest but most expensive closest to the CPU and the slowest but cheapest as far as possible. Minimizing memory footprint allows us to do more work on the faster end while minimizing storage cost allows us to store terabytes of data on your bookshelf.

There might have been just two or three levels initially: cpu register(s), system ram, and external storage. Now the spread has several more steps: registers, L1 cache, L2 cache, maybe L3 cache or part of memory as disk cache, SSD (either as a standalone drive or as an on-disk cache inside a traditional hard drive), and the good old spinning platter. We've mostly let go of tape storage by now but those are still sold for their capacity.

However, from the programmer's point of view, nothing has necessarily changed.

We have several levels of storage, more than before, ranging from the fastest on-chip cache ram to the mechanical storage and we still optimize our programs to run mostly in the fastest tip of this memory pyramid. What has changed is the size of the spread itself: the gap between the fastest and the slowest is huge in numbers. But relatively, not so much.

A quick guesstimate of the ratio of microseconds needed for a zero-page read in C64 vs. reading a byte from the 1541 floppy drive versus a read from cpu cache vs. a read from a spinning platter tells that the relative difference still roughly on the same order of magnitude. From various sources, I get a figure between 50-100 million times faster between the fastest and slowest read.

That is also what makes programming so much fun: everything gets redone all the time and the pace of advancements is crazy yet some things don't change. We just do more complex things but still bump into essentially the same tradeoffs.

Re: Cache is the new RAM

#75
post #55

Earlier quoted context omitted.

> in conjunction with dick waggling is just funny, now that I think about it. You understand that 'dick waggling' in this sense does not refer to the mechanical motions of a penis, right? That it's what we call in English a "euphemism"? The gender-neutrality of the subject makes perfect sense when you understand that this euphemism, unlike human genitalia, is not gender specific. In this case, "dick waggling" is a eu…

You understand that it isn't a "euphemism" as euphemisms are substitutions for vulgarity, not substitutions of vulgarity. Notice how the replacement you suggest, "unwarranted bravado," isn't blunt or vulgar? The term, as it was used, is a metaphor. As a metaphor, its imagery is fair game for criticism. As for the criticism itself, I think it stands as the phrase is unnecessarily gendered.

I think the term you're both looking for is 'dysphemism'. (Edit: typographical error).

Re: Cache is the new RAM

#76

> It pisses me off to no end these developers have to out-think SQL and re-invent the whole damn new wheel for "efficiency's" sake. Worked with someone who did this a couple years ago. I keep trying to get him to explain why he was reinventing sql, and never did get a clear answer to that. > just waggles their dick around saying Sorry to be the one to say it, but I don't think that part was necessary or appropriate t…

There seems to be a culture clash on HN. On one side there is California, where "dick wagging" is an unnecessary instance of gendered language, certain to drive women out of the tech industry. On the other side there's the rest of the world, where being offended by "dick wagging" seems dazzlingly childish. It's just a penis, most grown men and women know what they are and observe their motions on a daily basis. In Bh…

Avoiding gendered words as a recept for more women in IT seems very funny to me.

My language forces you to add gender-dependent postfixes to every verb and noun. Nobody have a problem with that, and I think there's more women in IT here than in US.

It's obviously not the source of problem. The source is people being jerks. You don't fix that by changing the non-jerks language (jerks won't care).

In fact nonjerks weren't jerks because they treated women the same as everybody. When you embarass them into treating women differently (more carefully) it becomes more awkward and reminds women more often they are different here. Counterproductive IMHO.

Regarding unnessesary vulgarity - it seems weird for me, no matter if it's gendered or not. But people use different styles of communication, that's the diversity people are so proud of.

Regarding SQL - yes please. It's a perfectly good wheel, don't reinvent it without a really good reason.

Re: Cache is the new RAM

#78
I once learned, in the good old mainframe times, that there are 3 sizes of databases: Small size that fit into RAM, medium size that fit on one computer, and big databases, that require a cluster of computers.

The relational model, and SQL databases play their strong roles in medium size databases, but are to much overhead for a fast small database, and do not scale well for big databases.

It was hoped at that time, that Moors law will beat Wirths law (who claimed this law much later), that big databases will soon be medium sized, nobody would care about performance of small databases that much, and we could happy use SQL for all problems. This was true for surprisingly long time, and still is, if your problem fits into a medium size database.

Unfortunate, computer history turns in cycles, and tends to forget lessons from the past. Coding access to a bunch of different databases was at least standard under COBOL. Coding for half a dozen NoSQL databases now, is a complete mess.

Re: Cache is the new RAM

#79

A couple points I would make with respect to the article: - In-memory databases offer few advantages over a disk-backed database with a properly designed I/O scheduler. In-memory databases are generally only faster if the disk-backed database uses mmap() for cache replacement or similarly terrible I/O scheduling. The big advantage of in-memory databases is that you avoid the enormously complicated implementation task…

What's so terrible about mmap()? LMDB seems to use it to great effect: http://symas.com/mdb/

Re: Cache is the new RAM

#80
post #76

Earlier quoted context omitted.

There seems to be a culture clash on HN. On one side there is California, where "dick wagging" is an unnecessary instance of gendered language, certain to drive women out of the tech industry. On the other side there's the rest of the world, where being offended by "dick wagging" seems dazzlingly childish. It's just a penis, most grown men and women know what they are and observe their motions on a daily basis. In Bh…

Avoiding gendered words as a recept for more women in IT seems very funny to me. My language forces you to add gender-dependent postfixes to every verb and noun. Nobody have a problem with that, and I think there's more women in IT here than in US. It's obviously not the source of problem. The source is people being jerks. You don't fix that by changing the non-jerks language (jerks won't care). In fact nonjerks were…

>My language forces you to add gender-dependent postfixes to every verb and noun.

If there's truly no gender neutral way of saying something, then I'd imagine that people always use one gender for generic cases, and as such it's not exclusionary. Which is different from having the option and not using it.

>The source is people being jerks.

Non-jerks being exclusionary is arguably far more of a problem than isolated jerks. If one person says "lol women suck at computers", they're obviously a moron, and can be dismissed. Whereas if everyone around you subtly assumes that all programmers are male, it's far more hurtful, because they're people that you respect.

>When you embarass them into treating women differently

Asking for gender neutral language isn't asking people to treat women differently.

Post reply on HN