The RAM is no longer fast: unless cached, it takes around 150 CPU cycles to access the RAM.
The RAM is no longer byte addressable. It’s closer to a block device now, the block size being 16 bytes for dual-channel DDR, 32 bytes for quad channel.
Too bad many computer scientists who write books about those algorithms prefer to view RAM in an old-fashioned way, as fast and byte-addressable.
For most practical purposes I believe in x86 computers, the block size to consider should be at least a cache line, so 64 bytes.
https://en.wikipedia.org/wiki/3M_computer
I now think the next target ought to be latency and power defined, in particular with IOT requirements.
Microseconds, Milliwatts, Millions of endpoints.
or, for storage, Microseconds, Millions IOPS, Multi-Parity
or for computer, efficiency, IOT goals:
Milli-watts as a constraint for a benchmark of compute Millions of endpoints / processes or cores on a network topology Microseconds as a measure generically of access to resources, whether memory is sat on another node, or local store, the delay ought to be inside the same order of magnitude as a target.
My purpose in all of that, is, should there - in fact, can there be - consideration of architecture and topology that avoid .. rather can we aim for linear cost in addressing complexity at all, as a goal, or has that been lost already?
I mean "that" and "lost" very vaguely, being non expert, but my question is really should I imagine that there are no effective gains to be had, designing for a IOT style or massively networked future, from the way memory is addressed, or has the complexity that we have, been introduced out of necessity, so will be here to stay, for practical reasons, so the idea of low latency, low power, IOT "grid computing" on a ad hoc basis, is smoke in my pipe?
Don't forget the 8-deep prefetch buffer. The real block size is more like 128 bytes for dual channel.
It'll be wonderful if we actually can get some simplifications in our byzantine architectures, although - I wonder if it doesn't all boil down to our "RAM" (fastest storage) becoming "smarter" - as CPUs manage the three levels of cache - and we "only" loose the "slow disk/ssd" on the far end. CPU cache becomes the new RAM, and cache management microcode becomes our new memory allocators....?
While you can't easily write into other processes anymore, the barrier is more of a suggestion again.
> Tests show that simple ECC solutions, providing single-error correction and double-error detection (SECDED) capabilities, are not able to correct or detect all observed disturbance errors because some of them include more than two flipped bits per memory word
But anyway - even if ECC was perfect at preventing the issue, lots of hosts do not use ECC. That includes practically every desktop.
Sounds like a great use-case for lmdb :)
/s
But ComodoHacker's comment, made me think yet again, why was ACID compliance ever a issue?
I was reliving some nostalgia at the weekend, explaining to a friend how I got excited Microsoft Transaction Service came bundled with NT.
That was my "free" ACID transactions.
It as cross platform, then, too. (or at least multi arch, and advertised to play nice with things like IBM CICS, which may have been much of the point of the bundling, to win deals, even in check box tallies)
MTS is one of the few OS level dependencies SQLServer has. But i think the cross platform origin I recall, was born out when SQLServer/Linux appeared.
I have all this time been confused.
I get it, if you don't need ACID, and have other design reasons, go ahead.
But, well I just always saw it as a problem solved, or plug and play solvable, thanks to MTS. Getting a book on MTS is hat convinced me NT was serious and our business should take heed. If you're a small shop, have margins, can work with fat servers - or as we did, fundamentally scale through transaction routing in the first place - NT (plus the variations of services for Unix now for Linux) can be a happy place.
Incidentally, I believe the middleware - driver that Intel is shipping with Optane, is the work of ScameMP.
This is their Flash Expansion description: http://www.scalemp.com/products/flx/
we've used their product very happily - it may be a good fit especially if you are staging oversize db's you intend to shard, but need them up behind a connection while you test, which was our need.
N.B. Scale MP has a free tier which may also fit your needs.
Not meaning to shill, but I never know why I don't hear of them more, our experience was absolutely satisfying.
edit: typos; "free"/free edit: removed "very" from "may be a very good fit" about ScaleMP - felt so for us, but can't say why anything that works to meet specific need is qualitatively better when doing the job is a binary y/n..
and to add, now if products like Optane eliminate the performance cost discarding ACID transaction compliance has been justified by, then will that not upset a few conceptual applecarts? I mean, I think some very loose and fast argument has been given, surrounding non ACID compliance and data and databases generally, over recent years, and certainly the performance cost trade off arguments has appeared to me to mask logic elsewhere that needs attention.
https://en.wikipedia.org/wiki/Single-level_store
I must admit that until looking into it more closely i figured it was no different from the memory map of a micro. Silly me.
Should devices like tablets, with enclosed batteries, be required to have physical circuit breakers for power, as a security measure, if compromised?
We realized that we had to have a planned action to block MACs from the network, in response to any device having questionable integrity.
Even a small Faraday cage was considered - WiFi not the only radio on portables: laptops without removable batteries hop across LTE via VPN... so that was another policy to set a script to shut down.
Persistence, in this case of processes - or just not being able to remove a battery - is a threat that with good reason shocked us, because it is so ubiquitous. I believe the moment a unscheduled reboot or shutdown occurs, at the very least all LAN/WAN access needs to be automatically cut.
edit:typo
There are workarounds, like adding a layer of faster, cheaper ram, but then this starts to look like a big perf improvement in a rather traditional system.
A while ago (a few years?) there was some buzz about a new kind of machine from HP (maybe based on memristors? which were also in the news around then, IIRC), that was supposed to do away with that distinction. They called it The Machine or something like that (:-). I did not follow it at the time, after the initial read, so don't know what happened to it.
"BUD17-503 The HPE Machine and Gen Z" at Linaro Connect 2017
[1] https://en.wikipedia.org/wiki/Keith_Packard
Googled his name and found this:
A look at The Machine [LWN.net]:
https://lwn.net/Articles/655437/
[2] On a side note, Motif was pretty powerful. I remember a colleague of mine who was also in that course, creating a rudimentary app like MS Paint, in the class, in just half an hour or so - as the instructor was teaching, in fact. (Maybe he had studied it some before, of course.) As he demoed it to us, he went "Foo!" :)
The main obvious advantage of using non-volatile RAM across the board is that it won't consume power all the time, like DRAM.
This page says 100ns: https://gist.github.com/jboner/2841832
This one says 60ns: http://stackoverflow.com/q/4087280/126995
I think the difference comes from the latency of operation from the CPU point of view vs actual memory/drive latency.In the article they seem to be talking about the drive latency.
On DDR3, the full latency of a miss to ram is, in a low-bandwidth scenario:
latency of the full cache system, typically expressed as the L3 latency
+ latency of opening a row (Trcd)
+ latency for reading from an open row (Tcas)
+ latency of passing data from memory controller to L1 cache
In a situation with some but not anywhere near full load on the memory subsystem: caches
+ latency of closing a row (Trp)
+ latency of opening a row (Trcd)
+ latency of reading from an open row (Tcas)
+ latency of passing data to L1
and when doing full tilt random access: caches
+ time remaining waiting out the minimum allowed row active time of the previous memory access (Tras)
+ latency of closing a row (Trp)
+ latency of opening a row (Trcd)
+ latency of reading from an open row (Tcas)
+ latency of passing data to L1
The total latency is typically between 50 to 150 ns depending on the CPU and RAM in use.Similarly, the difficulty in large data problems is often more of getting the data in the first place. This is often about coordinating the data creation of many machines and systems.
So, for most of us, this shift will not be huge. Because it is mostly irrelevant. Even systems that do have this much data often benefit from algorithms that don't rely on directly accessing and processing all of it in one shot. If only for resilience. (That is, if a system failing doesn't mean reprocessing all of the data, restarting and recovery is often faster and easier to deal with.)
Sometimes it seems that the diff between a CPU and a cluster is the suffix put on the latency times.
http://netoptimizer.blogspot.com/2014/05/the-calculations-10...
Hm, 67 ns per packet.
So even this local storage would be the drag in many scenarios...
Not sure drive is quite the right word, any more. Has a better nomenclature settled yet?
This is huge deal. SSD's started it. It always seemed wrong for me to address memory through a disk interface.
The main issue is that the re-design of software for permanent non-volatile storage is huge. It goes back decades, and there are many design decisions that need rethinking.
We've always made a distinction between memory and disk. Much of computer science is about algorithms that recognize the difference between slow, persistent disk and fast, volatile RAM and account for it somehow.
What happens if the distinction goes away? What if all data is persistent? What if we can perform calculations directly on persisted data without pulling it into RAM first?
My guess is that we'll start writing software very differently. It's hard for me to predict how, though.