Showing posts with label disk. Show all posts
Showing posts with label disk. Show all posts

Thursday, July 9, 2015

In-Memory Computing Summit 1: The Database Game, The Computing Game, Is Changing Significantly


So why was I, a database guy, attending last Monday what turned out to be the first ever In-Memory Computing Summit – a subject that, if anything, would seem to relate more to storage tiering?  And why were heavy-hitter companies like Intel, SAP, and Oracle, not to mention TIBCO and Hitachi Data Systems, front and center at this conference?  Answer:  the surge in flash-memory capacity and price/performance compared to disk, plus the advent of the Internet of Things and the sensor-driven web, is driving a major change in the software we need, both in the area of analytics and operational processing.  As one presentation put it, software needs to move from supporting Big Data to enabling Fast (but still Big) Data.
In this series of blog posts, I aim to examine these major changes as laid out in the summit, as well as their implications for databases and computing IT.  In the first post, I’d like to sketch out an overall “vision”, and then in later posts explore the details of how the software to support this is beginning to arrive.

The Unit:  The “Flat-Memory” System

In an architecture that can record and process massive streams of "sensor" data (including data from mobile phones and from hardware generating information for the Internet of Things) there is a premium on "stream" processing of incoming data in real time, as well as on transactional writes in addition to the reads and queries of analytical processing.  The norm for systems handling this load, in the new architecture, is two main tiers:  main memory RAM and "flash" or non-volatile memory/NVRAM (approximately 3 orders of magnitude).  This may seem like hyperbole when we are talking about Big Data, but in point of fact one summit participant noted a real-world system using 1 TB of main memory and 1 PB of flash.
Fundamentally, flash memory is like main-memory RAM:  more or less all addresses in the same tier take an equal amount of time to read or change.  In that sense, both tiers of our unitary system are "flat memory", unlike disk, which has spent many years fine-tuning performance that can vary widely depending on the data's position on disk.  To ease the first introduction of flash, it provided interfaces to CPUs that mimic disk accesses and therefore make flash's data access both variable and slow (compared to a flat-memory interface).  Therefore, for the most part, NVRAM in our unitary system will remove this performance-clogging software and access flash in much the same way that main-memory RAM is accessed today.  In fact, as Intel testified at the summit, this process is already underway at the protocol level.
The one remaining variable in performance is the slower speed of flash memory.  Therefore, existing in-memory databases and the like will not optimize the new flat-memory systems out of the box.  The real challenge will be to identify the amount of flash that needs to be used by the CPU to maximize performance for any given task, and then use the rest for longer-term storage, in much the same way that disk is used now.  For the very largest databases, of course, disk will be a second storage tier.

The Architecture:  Bridging Operational Fast and Analytical Big

Perhaps memSQL was the presenter at the conference who put the problem most pithily:  in their experience, users have been moving from SQL to NoSQL, and now are moving from NoSQL towards SQL.  The reason is that for deeper analytical processing of data such as social-media whose value is primarily that it's Big (e.g, much social-media data) use of SQL and relational/columnar databases is better, while for Big Data whose value is primarily that it's fresh (and therefore needs to be processed Fast) SQL software causes unacceptable performance overhead.  Users will need both, and therefore will need an architecture that includes Hadoop and SQL/analytical data processing. 
One approach would treat each database on either side as a "framework", which would be applied to transactional, analytical, or in-between tasks depending on its fitness for these tasks.  That, to me, is a "bridge too far", introducing additional performance overhead, especially at the task assignment stage.  Rather, I envision something more akin to a TP monitor, streaming sensor data to a choice among transactional databases (at present, mostly associated with Hadoop), and analytical data to a choice among other analytical databases.  I view the focus of presenters such as Redis Labs on the transactional side and SAP and Oracle on the analytical side as an indication that my type of architecture is at least a strong possibility.

The Infrastructure:  If This Goes On …

One science fiction author once defined most science fiction as discussing one of three “questions”:  What if? If only …, and If this goes on …  The infrastructure today for the new units and architecture is clearly “the cloud” – public clouds, private clouds, hybrid clouds.  With the steady penetration of Hadoop into enterprises, all of these are now reasonably experienced in supporting both Hadoop and SQL data processing.  And yet, if this goes on …
The Internet of Things is not limited to stationary “things”.  On the contrary, many of the initial applications involve mobile smartphones and mobile cars and trucks.  A recent NPR examination of car technology noted that cars are beginning to communicate not only with the dealer/manufacturer and the driver but also with each other, so that, for example, they can warn of a fender-bender around the next curve.  These applications require Fast Data, real-time responses that use the cars’ own databases and flat memory for real-time sensor processing and analytics.  As time goes on, these applications should become more and more frequent, and more and more disconnected from today’s clouds.  If so, that would mean the advent of the mobile cloud as an alternative and perhaps dominant infrastructure for the new systems and architecture.
Perhaps this will never happen.  Perhaps someone has already thought of this.  If not, folks:  You heard it here first.

Wednesday, May 9, 2012

Rules for IT: The 90-10 Rule for SSDs

Over the last couple of years, as disk has gained attention relative to tape and SSDs have arrived as a probably-chosen option in all sorts of hardware, I keep hearing a plaintive question from analysts – including myself – why don’t vendors such as EMC and IBM seem to be giving users guidelines for how much SSD to use? Well, I don’t have an answer for that question as of yet. However, it occurred to me today that my experience holds a guideline that just might be useful to IT. So, as a throwaway on an interesting day, I’ll just sketch it out in this blog post.

What I was taught by reading one of the great computer books of all time, Tanenbaum’s Structured Computer Organization, is that the ratio between fast and slow storage (e.g., main memory and disk) seems to naturally follow a 90-10 rule. Specifically, that rule more or less goes as follows:

Make 90% of the storage slow storage, and you will achieve 90% of fast-storage performance at 10% of its cost.

I realize that the implications of this are not apparent at first glance, so let me try to explain them (as best I understand them from a lifetime of experience): In the average application, 90% of the time the information needed for that application as it is running can, by hook or by crook, be in main memory waiting when the application needs it. The other 10% of the time, the application needs to load that information from disk, and on average that load makes that instruction’s performance 100 times slower. So you have slowed the application by 10% compared with its performance if you have all the main memory that is needed.

However, if the speed is 100 times slower, the cost of storing that piece of information is also 100 times smaller – and so, 10% of your storage is now “full cost” main memory, and 90% is “1/100 cost disk”, for a total cost of 11% of a main-memory-only system.

However, this explanation alone does not capture the implications of the 90-10 rule for IT. Fundamentally, IT budgets run along the lines of: do more at the same cost. And so, the way it translates into IT buying is: switch from main-memory-only to memory-plus-disk and you can handle 9 times the workload at the same cost. And, on average, that’s the best price-performance you can get.

Now, we have a situation in which a new technology, SSDs, comes in between memory and disk, with intermediate access times and intermediate pricing. It would seem that in this case, somehow, the 90-10 rule is thrown completely out of whack: both memory-to-SSD and SSD-to-disk ratios should be 30-70, or some other huge reduction. However, it seems to me that 90-to-10 is still pretty close to the right ratio in both cases. Think of it this way: in the cases where memory goes to SSD instead of disk (81% of all cases), the speedup might mean an optimal ratio of 94-6. However, where memory needs to go to disk instead (9% of the cases), the optimal ratio of disk and memory is 90-10, so the disk-SSD and SSD-memory ratios are around 70-30. Averaging 1/10 times 30 and 9/10 times 6, you come up with a ratio of 90.6 to 9.4 for both memory to SSD and SSD to disk. Sorry, I just couldn’t resist all that math.

So why shouldn’t vendors say 90-10, your mileage may vary, and just have done with it? Because it isn’t just your mileage may vary, it’s your mileage may vary depending on the type of application.
Inevitably, any system you buy needs to perform on one type of application rather than, or more than, others. And the 90-10 figure is an average gained from experience – it is never going to be more than an average. Into the indefinite future, the correct ratio for a particular application may go as high as 95-5, and as low as 75-25 (my vague sense of the likely limits).

So the decision process on SSD that I would follow if I were an IT type would be: what is the maximum “safe” ratio for a given application that must be on this system, or, if you want to figure that out indirectly, what is a safe distance above the minimum average performance for that application? Let’s see, it’s compute-bound, so both ratios should probably be around 93-7 …

But I just want to hammer home the reason why you want to do SSDs in the first place, now that the price is right. Remember, you got 90% of the performance for 10% of the cost when you added disk? Well, if you then add SSDs, the result is like 81% of the performance at 40% of the cost.

Only that’s misleading. What it really means to IT is, compared to an all-main-memory system, you now get 22 times the performance at the same cost.

Gee, you’re not getting as much bang for the buck as when you moved from memory to memory-plus-disk? Well, boo. Hoo. That stuff is so 50 years ago. You’re getting 2.5 times the price-performance you had yesterday – for free.

As far as I can tell, the 90-10 rule lives. Just another free service from us analysts, while those lazy vendors forget to look in their history books.

And if I’m wrong, I’m sure some vendor infuriated by the insult just above will correct me. In which case, you the IT buyer will still have the rule you need. As Alfred Bester said in “The Stars My Destination”, it’s always a lovely day somewhere.