Slashdot Mirror


MySQL Creator Contemplates RAM-only Databases

Aavidwriter writes "Peter Wayner asks Michael 'Monty' Widenius of MySQL, 'When will RAM prices make disk drives obsolete for database developers?' From Monty's answers, it sounds like hard drives may be nothing but backups before long." From experience, I'd wager that RAM failure rates are less than hard drive failure rates, so it might also mean more stability from that perspective.

288 comments

  1. Not only need oodles of RAM... by Anonymous Coward · · Score: 4, Insightful

    But also a very strong Memory Manager. We've all seen a poorly written program corrupt memory.

    1. Re:Not only need oodles of RAM... by Anonymous Coward · · Score: 2, Informative

      Not exactly an original idea, in memory DB's have been around for quite some time.

      Depending on the application it may not be feasible to have a in memory DB for a long time.

      I currently work on DB's that are many hundreds of gigabytes as well as terabytes, some are even pentabytes(sp?). It will be a long time before a we can afford to buy a terabyte of memory to hold our DB's.

      Eventually it could be a possibility but its still cheaper to buy hard drives and let the DB just cache in memory the active stored procedures, indexes etc.(instead of the whole DB).

      In Memory would be a performance improvement obviously but Im not holding my breath for it to be a practical solution anytime soon.

      Maybe for smaller scale DB's systems.

      Have to remember that its more then just data and indexes its also everything the optimizer needs to figure out the best way to run a query for example(histograms, statistics, for cost based analysis) could also be partitioning information and other performance related information that also has to be loaded into memory.

      So there is a good chance its the future, but for some its still a long way off.

    2. Re:Not only need oodles of RAM... by larry_larry · · Score: 1

      Gamma rays will kill RAM contents... anyone know how resilient HDs are to these? Various error correction schemes/circuits can be used to limit these effects (as others have discussed). You're restricted to 4Gig with a 32bit bus... the 64bit variety for > 4G... and big RAMs aren't that cheap! The memory management/corruption problem could be avoided if the RAM were put on a separate data bus and controlled explicitly by some sort of a SQL controller with exclusive access to the RAM. Perhaps a chip with a processor for codeable memory indexing algorithms and a shmit load of RAM might be useful in the future.

    3. Re:Not only need oodles of RAM... by Anonymous Coward · · Score: 0

      You make it sound so complicated. Just populate a board with RAM and attach an IDE/SCSI interface. The OS need never know what it's actually talking to.

    4. Re:Not only need oodles of RAM... by larry_larry · · Score: 1

      Makes sense but your RAM drive is then limited to the speed of your interface rather than the access speed of the RAM or CPU bus. What you mention is certianly way simpler than what I'm talking, but I was thinking in terms of super-high speed accesses. I'm chip designer and don't really know what I'm talking about when it comes to databases.

  2. Umm...now? by James_Duncan8181 · · Score: 1, Funny

    *cough* Google? Big enough for ya? *cough*

    --
    "To any truly impartial person, it would be obvious that I am right."
    1. Re:Umm...now? by Anonymous Coward · · Score: 3, Informative

      And large image-bases are too much for RAM today. Remeber the 640K limit? I'd guess that more than 50% current corporate databases would fit in a single gigabyte, including indexes.

      The real speed improvements, according to the guys working on projects like Bamboo on sourceforge come not from the fact that it's in RAM, they test against SQL in RAM and show that most of the performance improvements come from keeping the data in the same process space as the application operating on the data. If they're right, putting MySQL in RAM or Oracle or Microsoft SQL Server is a small improvement.

      The large speed improvements come from lowering the process boundary hopping overhead--marshaling and all that good stuff.

    2. Re:Umm...now? by Angry+White+Guy · · Score: 1

      The large speed improvements come from lowering the process boundary hopping overhead--marshaling and all that good stuff.

      You think that everyone is a DB admin? The real speed improvements come from sane database design, something that many software vendors do not understand.

      Software designers, your new word for the day is index. Learn it, understand it, love it!

      --
      You think that I'm crazy, you should see this guy!
    3. Re:Umm...now? by los+furtive · · Score: 1

      And don't forget running statistics every now and then.

      --

      I'm a writer, a poet, a genius, I know it. I don't buy software, I grow it.

    4. Re:Umm...now? by Angry+White+Guy · · Score: 3, Interesting

      Hell, I'd just be happy if they would normalize their tables. I've seen joins across three tables which all hold essentially the same data, and working on the entire result set after downloading it to the client and then uploading the whole thing back when one thing has changed.

      And they wonder why I'm crazy.

      --
      You think that I'm crazy, you should see this guy!
    5. Re:Umm...now? by Anonymous Coward · · Score: 2, Interesting

      Normalize until it hurts, denormalize until it works. Until you hit the really huge databases, you won't appreciate that saying.

    6. Re:Umm...now? by Anonymous Coward · · Score: 0

      *cough* Extremely atypical application? *cough* Embarrassingly parallelizable queries? *cough* Immense hardware cost that somebody who has other work to do couldn't afford? *cough* Idiot. Maybe Google's the only "database" you ever work with, but it's pretty much unlike what everyone else needs.

    7. Re:Umm...now? by Christian+Smith · · Score: 1

      Process context switches are of the order of microseconds (sub microsecond.)

      Disk IO is of the order of milliseconds!

      Context switches are several orders of magnitude quicker than disk IO. If data can be stored in RAM, that is the biggest gain you can get (given the same database design.)

      What the Bamboo guys may be on about is not transporting large result sets over the wire between the client and the server, which can be really slow in relative terms. Don't know what the bamboo project is, however, so that last bit is a stab in the dark.

  3. What about crashes? by Anonymous Coward · · Score: 0

    Better make a hard disk backup... constantly!

  4. ECC RAM? by Big+Mark · · Score: 3, Interesting

    I remember reading somewhere that, due to things like thermal radiation and cosmic rays, every so often a bit in RAM is changed by 'accident'... isn't the ECC RAM (which, IIRC, negates the effects of such interaction) horrendously expensive though, more so than the 'normal' SDRAM variants we have these days?

    1. Re:ECC RAM? by Anonymous Coward · · Score: 0

      Is your database infrastructure not worth the extra money? You could do things half-assed, but your employer might not like it.

    2. Re:ECC RAM? by SQL+Error · · Score: 1

      ECC RAM is actually incredibly cheap; just not quite as incredibly cheap as non-ECC RAM. All it means is that you get 9 memory chips instead of 8. It should be 12.5% more expensive, but it doesn't quite work that way.

    3. Re:ECC RAM? by sholden · · Score: 1

      Double the price isn't 'horrendously' expensive...

    4. Re:ECC RAM? by SirDrinksAlot · · Score: 1

      ECC ram is just as bad as regular ram execpt that if the parity bit got corrupt then that entire block gets wasted. ECC is just a little better, not a lot, its not perfect.

    5. Re:ECC RAM? by Junta · · Score: 4, Informative

      Not true, you are describing Parity RAM. Let's review:

      Normal RAM: no errors detected
      Parity RAM: an extra bit is used to store the XOR of all the othe bits on the line. If the math doesn't work, the OS can be informed the data at a particular address is corrupt, and let the software decide how to best cope with the condition. Only odd numbers of bit errors can be detected.
      ECC RAM: Uses a more complicated method and even more bits to provide single-bit error *correction* and double-bit error detection. The odds of two bits on the same line being corrupt is slim unless the ram is really bad. Single bit errors cause no problems. Double bit errors are at *least* detected. More than that and chances are the memory module is so screwed that even if the OS doesn't get it reported, the problem will be obvious to the user.

      --
      XML is like violence. If it doesn't solve the problem, use more.
    6. Re:ECC RAM? by HidingMyName · · Score: 1
      Many of the replies talk about error detection (parity) but don't really describe error correction. Error correction involves:
      • Detecting an error
      • Locating exactly what data was corrupted
      • Inverting the error (correction)
      For n bits of user data, an extra log(n) (base 2) additional bits of metadata are needed (to encode the position of the corrupted bit) for each bit of error correction we want to support. This is how Hamming Codes work. Hamming codes designed to correct k errors (k n) they can detect k+1 errors so for 64 bit word memory with single error correct (double error detect) we need 8 extra bits, which about 12.5% extra memory, plus some logic in the packaging. A 10-15% price premium is about right.
    7. Re:ECC RAM? by toddestan · · Score: 1

      Why not do something like a ram RAID array? Thay way you have a backup for random memory errors.

      I suppose you still have the problem if this bit is a 1 in this array and a 0 in the other array, which one is right? I guess either a third array (hey RAM is cheap) or some kind of logic to figure it out, if that's possible.

    8. Re:ECC RAM? by PhilHibbs · · Score: 2, Informative

      I think ECC RAM inserts extra bits after the first, second, fourth, eighth, etc. data bits. So for 32-bit memory, you need 6 extra bits. I would guess that 32-bits is probably a good balance between efficiency and protection.

    9. Re:ECC RAM? by DickBreath · · Score: 1

      Is there any reason a memory controller couldn't be designed using RAID principles? That is, n+1 banks of memory get you n banks of storage. Each word of the extra bank holds the XOR of the words at same location in the other banks. Now if one bank (ECC obviously) detects a multi-bit error, the memory controller can correct it. Better yet, a bank could be taken offline, or even hot-swapped.

      Another idea, have m x n banks of effective storage by using (m+1) x (n+1) actual banks of memory and do the XOR thing in two dimensions. Now the memory doesn't have to be ECC. The memory controller could detect any number of bit errors in a single bank. Have a five bit error? It is detected. And the memory controller could identify which bank is at fault, and then compute the correct value.

      Maybe this is already done? This kind of high availability hardware would bring a whole new kind of reliability to our p2p servers.

      --

      I'll see your senator, and I'll raise you two judges.
    10. Re:ECC RAM? by SClitheroe · · Score: 4, Interesting

      Actually, there are RAID memory systems out there. One of HP's high end Intel servers has it. Hot swappable RAM as well...very neat stuff

    11. Re:ECC RAM? by perljon · · Score: 1

      And when you are spending millions on your database infrastructure, who cares about the extra 20-40k in memory.

      --
      This isn't the sig you are looking for... Carry on...
    12. Re:ECC RAM? by malia8888 · · Score: 1
      I remember reading somewhere that, due to things like thermal radiation and cosmic rays, every so often a bit in RAM is changed by 'accident'...

      Here in the tropics seaside hard drives often die within a year because of the humidity and salt. Guess we need some paper.

      --
      Harpo Tunnel Syndrome--my wrist feels funny.
    13. Re:ECC RAM? by SQL+Error · · Score: 1

      Actually, you need 7 bits for SECDED (single error correct, double error detect) ECC on 32 bits of data. With a 64-bit bus, you need 8 ECC bits - which is the same as you'd need for byte parity. Which is why no-one uses parity checking any more: ECC is better and costs the same.

    14. Re:ECC RAM? by Anonymous Coward · · Score: 0

      Here in the tropics seaside hard drives often die within a year because of the humidity and salt.

      No, its really all the cutie island babes you bang on top of your desk that causes the damage. Lucky dog!

    15. Re:ECC RAM? by buysse · · Score: 1

      Incorrect. For parity, you need one additional chip (in the example you cite.) So, for every 8 bits, you need one additional bit. All that parity does is tell you that it failed to store the incorrect information. ECC is one step further -- think of it like RAID-5 for memory. It not only tells you that it's incorrect, it lets you determine the correct value. IIRC, for 32-bit memory you need 40 bits for parity and 36-bits for ECC. It may be 42 bits for ECC.

      --
      -30-
    16. Re:ECC RAM? by malia8888 · · Score: 1
      You made my whole Saturday A.C.... malia=mary in Hawaiian.....

      I laughed so hard my coconut bra fell off.

      now so I don't get modded down for offtopic, if you have an air-conditioner, the hard drives last longer. But here in the islands kilowatt hours are so expensive it cuts into our mai tai money.

      --
      Harpo Tunnel Syndrome--my wrist feels funny.
    17. Re:ECC RAM? by aiken_d · · Score: 1

      And then there's chipkill, which does one better than ECC by being able to correct multi-bit errors and even function if an entire chip dies.

      More Info: http://www.ece.umd.edu/courses/enee759h.S2003/refe rences/chipkill_white_paper.pdf&e=747

      Cheers
      -b

      --
      If I wanted a sig I would have filled in that stupid box.
  5. Correct me if I'm wrong by Sayten241 · · Score: 3, Insightful

    but doesn't RAM need power running through it to hold its data? If this is true and we do switch to RAM for our SQL servers, all it would take is one fool to trip over a power chord (or just a power-outtage) to lose one heck of a lot of data.

    1. Re:Correct me if I'm wrong by BenV666 · · Score: 1

      That's what we have UPS for or battery backed ram. Also running a your database in RAM doesn't mean you don't have to backup...

    2. Re:Correct me if I'm wrong by sholden · · Score: 4, Informative

      There are these things called batteries. Of course the article mentions them, but who reads the articles anyway...

      RAM only needs a trickle to keep refreshed...

    3. Re:Correct me if I'm wrong by Eevee · · Score: 1

      That's why you have redundant power supplies on your server, running off of seperate UPS systems. And you tuck all the power cords out of the way.

      True paranoia, though, is when you have two power distribution units, on opposite sides of the room, each with their own backup generator.

    4. Re:Correct me if I'm wrong by Anonymous Coward · · Score: 0

      Odd, the only thing I lose to power chords is hearing.

    5. Re:Correct me if I'm wrong by Anonymous Coward · · Score: 0

      Redundant power supply? Silly. People I know who take the idea of ram-based servers seriously all plan for redundant computers at at least one other physical location.

    6. Re:Correct me if I'm wrong by ichimunki · · Score: 2, Informative

      You mean there's articles we're supposed to read? If we did that, how we would ever get in on the discussion while it was still "live"?

      If you ask me, RAM is still too expensive to make this feasible. The article seems to assume that the examples listed are typical. But for so many purposes the idea of keeping the whole database in memory is a huge waste unless RAM gets a lot cheaper. For $100 you can get 120GB of HD or 256MB of RAM. That's not a comparable expense. And depending on the database, you are not likely to need the whole thing in RAM most of the time. In fact, how ofen is speed going to be important enough to justify this?

      If you have a system where speed is of the essence and the size is not prohibitive, can't existing DB engines be tuned to cache as much as possible if not all of the data in RAM already?

      --
      I do not have a signature
    7. Re:Correct me if I'm wrong by siveliini · · Score: 1

      The atricle mentions batteries to back up the power. In addition to this all changes can be saved to disk on a separate process so that data lookup and handling won't suffer but you can still build up the database to ram from disk if ram is somehow resetted.

      So in fact this would add an "additional" backup process and your data would be even safer than before.

    8. Re:Correct me if I'm wrong by Anonymous Coward · · Score: 0

      Flash RAM isn't volatile...but what is its half-life for data storage?

    9. Re:Correct me if I'm wrong by Hungus · · Score: 5, Interesting

      You really cant compare things like that for databases. AISITA (as is stated in the article) the big bottlenecks for both are similar in nature but orders of magnitude in scope. I currently work with a medical database where everything has to be logged. Disk access is a big factor for us, so we use fibre channel scsi (specifically Seagate 73.4GB 10000RPM) where the cost is more like 700 dollars for 70gb) (basically $10 per GB not the $1 per GB you are showing) Also there is the issue of supporting hardware but we will ignore that for the time being.

      time for some napkin math:

      1 512MB ecc reg pc2100 dim -> $ 78 or $156GB

      1 70GB Fibre Channel Drive -> $700 or $ 10GB

      Now lets factor in raid (for access speed and redundancy)

      we typically put 8 drives in a bundle which tends to give us 36% of the total drive capacity (mirrored raid 5 aka raid 6 remember teh ram is ecc reg so this factoring is already in place for it)
      8 * $700 -> $5600 for
      36% * 8 * 70 = 200GB
      This give me approximately 1GB for $28
      now thats a factor of 5.6 (call it 6) in price from ram only. AND i still get a prolly 4 fold increase in throughput. Not bad at all in my book.

      --
      Bad Panda! No Bamboo for you! In matters of importance ACs will not be responded to. Want to say something critical,OK
    10. Re:Correct me if I'm wrong by lokedhs · · Score: 1

      Keeping two systems consistent (esp at different locations with slow (i.e. slower than disc busses) is probably more expensive than biting the bullet and spend the cash you need to get reasonable performance with discs.

    11. Re:Correct me if I'm wrong by lokedhs · · Score: 1
      You haven't used databases much have you? Real database use something called a "transaction log" that does exactly this.

      In fact, you can get your beloved RAM database by putting the data partition on a RAM disc, and only have the transaction log on a (mirrored) disc.

      Then again, read some basic textbook on databases and see what they say about the idea. You'd be suprised.

    12. Re:Correct me if I'm wrong by DickBreath · · Score: 3, Funny

      doesn't mean you don't have to backup...

      Don't have to what?.

      What is this strange new word you use? Some new jargon? Don't you geeks have enough incomprehensible terms already without making up new ones? Why can't you just keep things simple and not use all this "technical talk".

      --

      I'll see your senator, and I'll raise you two judges.
    13. Re:Correct me if I'm wrong by Beliskner · · Score: 4, Informative
      RAM for our SQL servers, all it would take is one fool to trip over a power chord (or just a power-outtage) to lose one heck of a lot of data
      The military and Banks already have databases on SANs with battery-backed RAM and HD upon battery failure 'solid-state disks'

      UPS is old technology, the battery needs constant replacement, and very few have multiple redundant batteries and/or transistors to deal with wear and tear. Yes even a simple MOSFET transistor is not 100% reliable. Usually the only way to tell a battery is dead is your UPS fails when you need it (this happened to us when my MD was demonstrating our service live to customers, afterwards was the only time he's taken less than 9 months to sign off a purchase order on new equipment). A UPS also has a power cord to pull out when you recoil after burning your fingers on a Seagate Cheetah 15000RPM HD in the server room. A UPS also trips if you overload it, which again means the UPS fails when you most need it.

      Other posts mention cosmic radiation at high altitude makes RAM fail. Last time I checked there were no Quad-Xeon Oracle databases on Concorde, although if the International Space Station were to use one this might pose a problem for non-ECC RAM. Anyway, somebody could always write a driver to do software-ECC with Reed-Solomon for RAM if it becomes necessary.

      Huge databases (>500 Gigabyes) would benefit most from this as running a simple OUTER JOIN query on the biggest tables will require most of the database to be called into RAM.

      • Small databases become slow due to HD latency problems if they do a lot of WRITE operations (the database is stored in RAM, the transaction log is appended to, COMMIT TRANS). This would benefit least FROM RAMdisk because a HD append operation is cheap, however it would benefit database speed in mid-backup
      • Mid-size databases become HD-intensive due to aggregate queries/triggered operations over large '>RAM' datasets. For instance enforced cascading deletes where millions of tuples are being deleted cascaded to hundreds of other unindexed tables (in my job I go to the toilet whenever I run a query like this).
      • Huge databases where 'Index size' > 'RAM size' - the simplest query would benefit hugely from more RAM or faster storage or RAM-storage. With current databases this would be a 10Gig Eth connection to a Terabyte RAMSan solid-state disk.
      In the future, who knows, maybe a FPGA/ASIC DPU (Database Processing Unit) for INSTANT COMMIT like NVidia's GPU?
      --
      A caveman dreams of being us, the incalculable power and riches. We dream of being Q, then what?
    14. Re:Correct me if I'm wrong by Anonymous Coward · · Score: 0

      Go to http://www.ovonics.com/ and look up "Electronic Memory". This is also called Ovonic Unified Memory. It offers high enough speed to be directly usable as RAM in a computer system, it stores its data w/o change for 10 years (or more) without power, is instant-on, etc ...

      The people at Ovonics are R&D'ing technologies using amorphous crystaline structures, and have technologies in solar panels, fuel cells, NiMH batteries, CD-RW and DVD-RW, and hydrogen storage. They are the inventors of the core technology for NiMH batteries and what allowed CD-RW and DVD-RW disks to exist at all.

      FD: I own stock in the company, but only because it's exciting to think of the ramifications of their technology, and how big the company can be.

      - David

    15. Re:Correct me if I'm wrong by B3ryllium · · Score: 1

      No - true paranoia is when you shut the machines down, because "they're safer that way". :)

    16. Re:Correct me if I'm wrong by eric2hill · · Score: 1

      "mirrored raid 5 aka raid 6"

      Not quite. RAID 4 (n + 1) stripes data across the disks and writes a parity block in line with the block on the parity disk. RAID 5 cycles the parity block among all the n + 1 disks. Mirrored RAID 5 is two RAID 5 volumes mirrored to each other. RAID 6 writes two parity blocks on two different drives in the set. RAID 5 can withstand one drive failure. RAID 6 can withstand two drive failures. Mirrored RAID 5 can withstand an entire array of drives failing, but costs more in terms of total number of disks.

      --
      LOAD "SIG",8,1
      LOADING...
      READY.
      RUN
    17. Re:Correct me if I'm wrong by karlanka · · Score: 1

      Where have uou been the last 15 years. This is exactly what every weel-tuned database is doing.

    18. Re:Correct me if I'm wrong by rodgerd · · Score: 1

      Your comment was a parody, right?

    19. Re:Correct me if I'm wrong by Beliskner · · Score: 1

      Additionally, after backup/restore/checkpoint/DEFRAG INDEX and memory-intensive queries or stored procedures on the SQL server, the RAM-cache becomes flushed to make room for the operation (LRU pages purged). This is why after some queries/operations the database becomes inexplicably lethargic. Many databases don't even allow the DBA to force the RDBMS to disallow LRU Primary Key main table Indexes to be flushed out of cache! We cannot control cache! This is why many databases warn against running memory-intensive queries (in violation of SQL standard), it's because they use simple caching techniques.

      --
      A caveman dreams of being us, the incalculable power and riches. We dream of being Q, then what?
  6. I already do this in SQL... by VCAGuy · · Score: 3, Interesting

    With our Exchange server, we use a Platypus Qik Drive to send our retrieval times through the basement. We put the database on Qik Drives (but mirror it hourly on to HDDs)...it makes our effective Exchange bandwidth limited to the gigabit ethernet port on the server.

    --
    Q: "Why do sound techs say 'check 1, 2'?"
    A: "Cause if they could count any higher they'd be lighting techs."
    1. Re:I already do this in SQL... by VCAGuy · · Score: 1

      Allright, I'm an idiot (thinking about SQL when I wrote the subject, then writing about Exchange)...back to bed for me!

      --
      Q: "Why do sound techs say 'check 1, 2'?"
      A: "Cause if they could count any higher they'd be lighting techs."
    2. Re:I already do this in SQL... by FreeLinux · · Score: 4, Informative

      Wow! $25,000 for 16 GB of RAM disk seems a tad high or widespread adoption.

      It's also interesting to note that Microsoft was going to release what they called In Memory Database(IMDB) support in Windows 2000. However, this feature was removed after Windows 2000 RC2 due to technical issues.

    3. Re:I already do this in SQL... by natmsincome.com · · Score: 1

      I haven't used an Amiga for almost 5 years (My Gradfather had one) But one of the coolest things it had that I haven't ever seen on the PC was a RAM drive.

      It acted just like a floppy drive and was only 4 Meg but it was one of it's coolest features. You could install games, demos, etc to the ram disk and then play them off the ram disk.

      If something goes wrong just reset and it's gone. All the programes in the RAM drive were really quick (supprise supprise) and most programs could use it like /tmp in linux.

      I know there are similar things in linux and windows but most of them are just addons. What made the Amiga cool was the fact that it was built into every Amiga (I think) and most programs were smaller than the RAM drive. Most games were less than four meg*.

      *For a PC this sounds small but for the Amiga this was enough as most of the games were the Arcade games since they have a similar OS. Also The Amiga had a similar layer to Dirrect X but in on a ROM chip this ment that graphics and Sounds were way ahead of the PC. I've seen a couple of games ported over to the PC and either they end up going from 1Meg to 50+ meg for the same game or they use and emulator.

    4. Re:I already do this in SQL... by cygnusx · · Score: 1

      > I know there are similar things in linux and windows but most of them are just addons.

      MS-DOS had RAMDRIVE.SYS bundled with it back in the v3.x days (possibly earlier). Very useful in the days of slow 5.25" disks.

    5. Re:I already do this in SQL... by sheldon · · Score: 1

      "However, this feature was removed after Windows 2000 RC2 due to technical issues."

      Not so much technical as priorities. They discovered that they were essentially rewriting all the code in SQL Server and that it wasn't signifigantly faster than SQL Server. It was decided it was simply a waste of time.

      Like others have pointed out SQL Server, Oracle, etc. already maintain their own caches of data in memory. So on SQL that accesses the same chunks of data, the response is really quite fast.

    6. Re:I already do this in SQL... by Realistic_Dragon · · Score: 1

      "However, this feature was removed after Windows 2000 RC2 due to technical issues."

      Wow - now that must be something to see, a techincal issue that would stop _Microsoft_ releasing a product.

      --
      Beep beep.
    7. Re:I already do this in SQL... by Anonymous Coward · · Score: 0

      Platypus QikCACHE is WAY overpriced for what it does. It should be $200 unpopulated.

    8. Re:I already do this in SQL... by dissy · · Score: 1

      > Wow! $25,000 [cdw.com] for 16 GB of RAM disk seems a tad high or
      > widespread adoption.

      Wow! Whats funny is someone just like you said the same thing about harddrives.
      I mean, $25,000,000 for a 10 gig drive?!? Thats a tad high to EVER take off!

      Except for the fact we can now get a drive 25 times as large for 100,000 times less the price (250gb for $250) and not only that but 10gig drives and much larger ARE common place, so i'd have to say you have very high chances of being wrong :)

      The same can be said for HDs, ram (system ram), CPU speed, modem speed, etc etc etc.

      As appliactions are found, the hardware becomes more in demand, so the production costs begin to lower with bulk, and prices fall.

      If using RAM for your databases is truly better to the point its noticable, people WILL start using that method, and it WILL start to get popular.

    9. Re:I already do this in SQL... by Anonymous Coward · · Score: 0

      I find it hard to believe that your organization has a 16GB database but can't afford a $25,000 hardware investment for it.

    10. Re:I already do this in SQL... by treat · · Score: 1
      But one of the coolest things it had that I haven't ever seen on the PC was a RAM drive.

      In the days of DOS, you might have an 8MB system with only 640K available to applications. The remaining space could only be used for 1) the few applications that supported the high memory extensions 2) disk cache 3) ram disk. Because all of the disk caching software was so poor, a cache larger than a couple meg often hurt performance. A RAM disk was the only use for the extra memory, and in the days of floppy drives and 500KB/s hard drives, the performance difference was quite dramatic.

  7. How About by Anonymous Coward · · Score: 0

    "will power outages or system crashes make RAM only databases obsolete for database developers?" :-P

  8. Reboot? by bazik · · Score: 1

    So what to do in case of reboot (Kernel upgrade)?

    Saving the "ramdisk" on memory sticks? ;)

    --


    --
    One by one the penguins steal my sanity...
  9. bad idea by Anonymous Coward · · Score: 2, Insightful

    RAM is highly susceptible to transient faults. Things like comic radiation at high altitudes make computing a real problem. ECC helps this but it won't totally eliminate it. With a hard drive, the probability of a hard fault goes up but a soft fault goes down.

    1. Re:bad idea by CausticWindow · · Score: 2, Funny

      I've heard about comic radiation..

      It tickles and is really funny.

      --
      How small a thought it takes to fill a whole life
    2. Re:bad idea by Anonymous Coward · · Score: 0

      "Things like comic radiation at high altitudes make computing a real problem"

      How high are you're racks? I would think extreme cold would cause failure before radiaton at those altitudes.

    3. Re:bad idea by rent · · Score: 1

      I was in another world, a world of 20,000 girls and rectangles to an optomitrist, a man with a golden eyeball...

  10. Already exists? by gilesjuk · · Score: 3, Insightful

    Surely a well tuned database server stores uses quite a lot of RAM for buffering?

    Nobody in their right mind would have a busy database server which accesses the hard disk like crazy. A few years back I saw Oracle servers running NT with 4GB of RAM, so I guess they're using even more now.

    1. Re:Already exists? by KingDaveRa · · Score: 1

      Well yeah. Kind of explains why on one of the database servers at work its using up all free ram. So much so there's only 100mb free. Itself its using about 700mb I think. From what I've read thats about right. (Gig of ram in the server). The hard drive rarely does much.

    2. Re:Already exists? by NineNine · · Score: 2, Insightful

      . A few years back I saw Oracle servers running NT with 4GB of RAM, so I guess they're using even more now.


      I few years back, I saw a Sun box running Oracle with 64 Gig of RAM... They're already using quite a bit more. I can't even begin to fathom how much RAM a DB stored in RAM would take. It would be absolutely astronomical for any reasonable sized database. Sysadmins would spend all day swapping out RAM sticks as they died.

    3. Re:Already exists? by zzztkf · · Score: 1
      Yes, that's right.

      Given memory price range, it's not difficutlt to set up database avoiding disk access in most cases. As for Oracle, majority of tuning tips are used to keep required data on RAM from more than ten years ago the first time I used.

      The first step to tune it up is always to check buffer cache hit ratio.

    4. Re:Already exists? by sholden · · Score: 3, Insightful

      No that's not right.

      The whole thing was about not writing to disk *ever* (in the normal running of the database anyway).

      No matter how much memory buffer cache the database is using, in order to be ACID it has to be *writing* to the disk and waiting for those writes to be *written to disk*.

      Removing the disk completely removes any need for all that...

    5. Re:Already exists? by khuber · · Score: 1
      Nobody in their right mind would have a busy database server which accesses the hard disk like crazy.

      Believe it or not, some people have data that doesn't fit in RAM and has to access disk.

      -Kevin

    6. Re:Already exists? by proj_2501 · · Score: 1

      You can make disk writes almost as fast as RAM by using a Disk-Caching-Disk setup (RAM buffer + 2 hard drives)

      Writes go to the RAM buffer which flushes immediately to a cache disk, which never bothers seeking to a new track. During idle time this stuff is written back to the actual data disk.

    7. Re:Already exists? by sql*kitten · · Score: 5, Insightful

      Surely a well tuned database server stores uses quite a lot of RAM for buffering?

      Well, a professional database like Oracle manages its own cache, but MySQL really only relies only on the OS-level cache. The problem with that approach is that the database knows a lot more about what you're doing, so it can make much smarter decisions about what to cache, what to age out, what to prefetch, etc. On an Oracle server, you want to lock the buffer in memory, and leave as little as possible over for the OS filesystem cache. You see, if a block doesn't exist in the cache, it has to be fetched from disk into the database cache, and if it does, the db will go straight to its own cache. Another caching layer inbetween provided by the OS is just wasted.

      I don't think Monty understands any of this; in the article he seems to say that ACID, rather than being a fundamental principle of relational databases, is just something you need to do because disks are slower than RAM. The only reason that you might not want full ACID and use semaphores instead, as he suggests, is because you are only updating one record in one table in a single transaction!

      Further, if he is thinking in terms of a few Gb of data, then he is a little out of touch with modern database usage. SouthWest airlines do not have a database that stores 10 bytes of data for every seat on every flight, and I have a hard time figuring out why they would want to - the database of seats would be tied into the customer records, the freight/baggage handling database, the billing records, the accounting system. That is the point of relational database, that you can query data based on data that exists elsewhere. Monty thinks in terms of databases that have only a few tables, because that's all you can do in MySQL. He says that database programmers are forced to be very careful about the consistency of their data - well those using MySQL are, but those using Oracle (or any other database with real transactions and real integrity constraints) find it's all taken care of transparently.

    8. Re:Already exists? by ctnp · · Score: 1

      A few years ago I worked on a project with Lucent that dealt with an in-memory database system that Bell Labs invented in 1995. It was called DataBlitz and was part of their QTM platform.

      I can't find any public technical details, but DataBlitz is mentioned here and here, and I'm sure if anyone wanted they could google it for more. I'm still obligated to keep my mouth shut, though.. let me just say it seemed like a very hokey system that was prone to many problems.

      The system requirements for QTM was outrageous .. the smallest machine I worked on was a 4-banger Sun with 32 gigs of RAM.

    9. Re:Already exists? by Anonymous Coward · · Score: 1

      I'm glad I'm not the only one out there who thinks MySQL is a toy!

      It's a nice enough database, but stop comparing it to SQL Server, Oracle, etc, and start comparing it to Access and File Maker Pro.

    10. Re:Already exists? by sholden · · Score: 1

      Writing to a disk (even without a seek) is no where near the speed of writing to RAM.

    11. Re:Already exists? by Anonymous Coward · · Score: 0

      Doesn't access have better transactional safety than mysql?

    12. Re:Already exists? by Anonymous Coward · · Score: 0

      If MySQL doesn't have it's own cache, what's this?

      http://www.mysql.com/documentation/mysql/bychapter /manual_Reference.html#Query_Cache

      Dipshit.

    13. Re:Already exists? by blancolioni · · Score: 2

      If MySQL doesn't have it's own cache, what's this?

      Uh, something very very different from a cache as one might normally use the term in the context of a database implementation.

      I find it staggering that MySQL doesn't have a cache. It's not like it's a difficult thing to write -- you need to have a page in memory to look at it, so it costs almost nothing to keep it there.

      Dipshit.

      On the other hand, why am I bothering to tell you anything?

    14. Re:Already exists? by khuber · · Score: 1
      TimesTen is probably the most widely used in-memory RDBMS.

      -Kevin

    15. Re:Already exists? by astrashe · · Score: 0

      It sounds like you know a lot more about this than I do, but your point about the DB cache is exactly what I thought about when I read the article.

      I used MS-SQL server for a web project. Our database wasn't huge, but it was bigger than the RAM on the server. Even so, it managed to cache most of what was important. We just threw RAM at the server, and let the cache take care of the rest. It worked pretty well.

      In that case, the whole business was pretty much contained in the database -- losing the data would have probably put the company under. So we had to put a lot of thought into backups, and things like offsite replication. We worried more about making sure the data was protected than we did about performance.

      So as an amateur DBA, that would be my main concern -- how does using a RAM based scheme impact my ability to protect the data?

    16. Re:Already exists? by Reziac · · Score: 1

      Thanks for the informative posts. Just from curiosity, how much data are we talking about for a large corporation, say SW Air or BofA?

      --
      ~REZ~ #43301. Who'd fake being me anyway?
    17. Re:Already exists? by sql*kitten · · Score: 5, Interesting

      Just from curiosity, how much data are we talking about for a large corporation, say SW Air or BofA?

      Impossible to put a figure on the total amount of data that exists within an organization, but a typical SAN in a major financial institution has terabytes online. UBS Warburg has 2 Tb in just its general ledger database. Acxion has 25 Tb in its data warehouse, which will mainly be used for queries, whereas the GL database will be more transaction heavy. SouthWest is an Oracle customer, but it doesn't say here how much data they have.

    18. Re:Already exists? by Anonymous Coward · · Score: 0

      You can't have more than 4GB memory under NT. 2^32 - 1 = 4GB...

      Apart from that, NT takes 2 GB for the OS and 2 GB for the applications.

    19. Re:Already exists? by PizzaFace · · Score: 2, Interesting
      I don't think Monty understands any of this; in the article he seems to say that ACID, rather than being a fundamental principle of relational databases, is just something you need to do because disks are slower than RAM.
      In fairness to Monty, it's his interviewer, Peter Wayner, who suggests that ACID is just for keeping RAM and disk synchronized. Monty at one point cautions, "You still need commit/rollback, as this functionality is still very useful on the application level."
    20. Re:Already exists? by nagora · · Score: 1
      He says that database programmers are forced to be very careful about the consistency of their data - well those using MySQL are, but those using Oracle (or any other database with real transactions and real integrity constraints) find it's all taken care of transparently.

      So, you're claiming that Oracle makes sure that your design has all the required normal forms for you? Gosh! No wonder it's so expensive!

      TWW

      --
      "Encyclopedia" is to "Wikipedia" what "Library" is to "Some people at a bus stop"
    21. Re:Already exists? by Anonymous Coward · · Score: 0

      Doesn't access have better transactional safety than mysql?

      Access does not have a better *anything*. Well, maybe the GUI.

    22. Re:Already exists? by K-Man · · Score: 1

      Yes, RAM has always been a part of every RDBMS.

      The main performance difference in a main memory DBMS is in the addressing. Systems like Oracle identify a row of data by its tablespace, data file, block, and row number, which means that each reference involves translating the above keys to an address in the cache, and, failing that, doing an I/O to bring the block into memory.

      A main-memory DBMS uses pointers to reference data, and requires little translation to access a given row, except that done by the virtual memory system. That's why main-memory DBMS people claim a large performance advantage, even over Oracle running in RAM.

      --
      ---- "If we have to go on with these damned quantum jumps, then I'm sorry that I ever got involved" - Erwin Schrodinger
    23. Re:Already exists? by Anonymous Coward · · Score: 0

      I find it staggering that MySQL doesn't have a cache. It's not like it's a difficult thing to write -- you need to have a page in memory to look at it, so it costs almost nothing to keep it there.

      It's staggering that you would believe a database that performs as well as or better than Oracle in many applications doesn't have built-in cacheing.

      http://www.eweek.com/article2/0,3959,293,00.asp

    24. Re:Already exists? by Anonymous Coward · · Score: 0

      Uh, something very very different from a cache as one might normally use the term in the context of a database implementation.

      Uh, what's this then?
      http://www.mysql.com/documentation/mysql/by chapter /manual_MySQL_Optimisation.html#Memory_use

      Dipshit.

    25. Re:Already exists? by proj_2501 · · Score: 1

      Yes, that's why the DCD writes to RAM first.

    26. Re:Already exists? by Anonymous Coward · · Score: 0

      I work for a big ibank.
      We have ~ 100T on our SANs.
      Oracle, MSSQL, and Sybase, mainly....

    27. Re:Already exists? by Reziac · · Score: 1

      25TB?? [faints] Sure puts perspective on this discussion!!

      --
      ~REZ~ #43301. Who'd fake being me anyway?
    28. Re:Already exists? by sholden · · Score: 1

      You can't continue until the data is on the disk. In the RAM buffer isn't good enough, since if it goes down right then it isn't on disk...

    29. Re:Already exists? by Anonymous Coward · · Score: 0

      The only reason it performs better than Oracle in some cases is because it doesn't do (safety wise) things that Oracle does. Otherwise with a properly setup Oracle (a fair test!) I'm sure the two would be fairly close (if not Oracle beating MySQL).

      And the caching that's referred to is NOT the links that are pointed out. It's the page file caching. Which means that Oracle manages its own paging (database data), while MySQL relies on the OS for file management.

      Also, MySQL cannot synch itself with disk rotations and time disk reads/writes to avoid long seek times (it relies on the OS for that). Oracle on the other hand craws into the OS and ensures that things are done the way it wants.

    30. Re:Already exists? by Beliskner · · Score: 1
      I don't think Monty understands any of this; in the article he seems to say that ACID, rather than being a fundamental principle of relational databases, is just something you need to do because disks are slower than RAM
      If you think about it, any Array has all the ACID properties (if you ignore writing out to disk). You'll at least get a runtime error upon ACID failure.
      --
      A caveman dreams of being us, the incalculable power and riches. We dream of being Q, then what?
    31. Re:Already exists? by sql*kitten · · Score: 1

      If you think about it, any Array has all the ACID properties (if you ignore writing out to disk). You'll at least get a runtime error upon ACID failure.

      Only if you are only updating one array element - analogous to one row in one table - within a single transaction. If you have a transaction that affects many rows in many tables, then you need full ACID. In practice, a database will use full ACID even if it only has to do a single row in a transaction. Speaking from personal experience, it's not uncommon to write a single transaction that updates multiple rows in each of 10 or 12 tables at once, and sometimes many more.

    32. Re:Already exists? by phippy · · Score: 1

      I'm coming into this thread late, and haven't read all the way up...but I can tell you that even with "raw" file transactions, Oracle doesn't handle it's own file i/o outside of the OS. what I mean by that is that Oracle (and pretty much every other database out there) is still subject to the device control and i/o of the OS. if the OS sucks, the database is going to suck.

      also...make sure not to confuse database "paging" with the virtual memory-management "paging"...they are different.

      (all of that said, I have no business claiming any database being better than another)

    33. Re:Already exists? by Beliskner · · Score: 1
      But in terms of what Monty said, MySQL should be treated like an Array with some nice features like recovery. It's obvious to any DBA that MySQL wasn't designed for multiple tables with related data. It would be easier to handle linked lists. I'm not saying MySQL is bad - you might as well make Array illegal in which case 99% of all C++ programs would collapse. Use whatever data storage is appropriate.

      There's no point MySQL getting transactions, because then it would become JARDB (Just Another Relational Database). Even Micro$oft doesn't copy Oracle's DB precisely despite the fact that Oracle outclasses SQL Server.

      MySQL excels at small often-read datasets with unrelated tables. Relate them at your peril! Or just get Postgres. Why do we want to see MySQL just become another Oracle or Postgres clone? Why do we try to turn an ant into a homo sapien?

      --
      A caveman dreams of being us, the incalculable power and riches. We dream of being Q, then what?
    34. Re:Already exists? by sholden · · Score: 1
      From page 3:
      data are stored in a safe storage within tens of milliseconds on average
      For ACID you have to wait until that happens. SDRAM has a write cycle time measured in nanoseconds, which is a damn sight faster than "tens of milliseconds".
  11. moron contemplates ?pr?/bs-only 'media' by Anonymous Coward · · Score: 0

    the creator is not amused.

  12. And the Computing Darwin Awards... by Anonymous Coward · · Score: 2, Interesting

    ...goes to whoever is crazy enough to put their entire database in RAM.

    Now if the RAM was non-volatile and was static with the power off that would rock, but volitile RAM - are you crazy?!!

    1. Re:And the Computing Darwin Awards... by Anonymous Coward · · Score: 0

      Huh? Google already does this...

    2. Re:And the Computing Darwin Awards... by DickBreath · · Score: 1

      Now if the RAM was non-volatile and was static with the power off that would rock

      So what about all this "flash ram" stuff we see for our mp3 players, portable pr0n viewers, and whatnot?

      Maybe someone could design a new kind of high-speed drive fitting into a standard drive bay, that takes a bunch of MultiMediaCard's in an (m+1) x (n+1) matrix to provide a total storage of m x n cards, using RAID principals in two dimensions such that the memory controller could correct any number of bit errors in a single module, and furthermore the module could be hot-swapped.

      It would be much faster than disk? (Wouldn't it? Or are these flash ram things slow?)

      It would be non-volatile, and therefore could be made "plug-compatible" as a replacement for a mechanical drive.

      --

      I'll see your senator, and I'll raise you two judges.
    3. Re:And the Computing Darwin Awards... by TomGardner · · Score: 1

      |..goes to whoever is crazy enough to put their entire database in RAM.

      Many real-time applications, including some that I use every day, do just that.

      For example, at least mobile phone operator relies on subscriber and account information being held in RAM which is occasionally backed up to disk. The 5 nines reliability derives from replicating the data in other bits of RAM scattered around the world.

  13. Comment removed by account_deleted · · Score: 2, Informative

    Comment removed based on user account deletion

  14. unique problems by ramzak2k · · Score: 2, Interesting

    "RAM failure rates are less than hard drive failure rates, so it might also mean more stability from that perspective" Well that is because they havnt been subjected to that sort of load as yet. RAM could pose its set of unique problems once implemented as databases.

    --

    Siggy Say, Siggy Do
    1. Re:unique problems by Anonymous Coward · · Score: 0

      Considering RAM is used to buffer most of disk activity, and indeed a place to store data once read form the hard disk, how can you say it hasn't be placed under such a load.

      In any HDD solution, the RAM would have compariable load to the HDD.

      In any RAM system, the load would probably be lessened as all the DMA is from CPU to ram, and not CPU -> RAM -> HDD -> RAM -> CPU and malarky.

      So.

    2. Re:unique problems by dna_(c)(tm)(r) · · Score: 1

      I agree, contemplate a low end 128MB typical PC memory, scale it to a HDD's size of 20GB (*=160). Suppose you have 1% failure rate over a time t for that 128MB memory. This means p=99% (faultless working) for 128MB and 0.99^160 for the 20GB (or 20.0277% over time t). The same reasoning would apply for HDD, make them smaller, and surface faults would decrease logarithmically. Or am I wrong ?

    3. Re:unique problems by ajs · · Score: 1

      Excuse me, since when is RAM not subjected to constant unyeilding load?!

      Or are you talking about the stability of RAM-resident databases (which is NOT what the line you quoted was talking about, it was purely about RAM failure rates).

  15. don't be afraid by Anonymous Coward · · Score: 1

    we (being in the dbase 'business' for years) were also suspect of the the lack of clirking & whirring as evidence that our inf. wouldn't poof.

    truth is, hard rammed data media, is possibly more reliable.

    the access time/dependability make it worth investigation.

    in the 'future' the counter-person will ask: do you waNT payper liesense FUDge on your chip, or the penguin drop-ins. we know which we'll choose for ours.

  16. True, however.... by gilesjuk · · Score: 4, Insightful

    If you have a database that is stored in RAM and periodically written out to the hard disk (for backup reasons) then you get better performance than if you have a database that is reading and writing most of the time.

    UPS would prevent the data loss, the database could be written to disk when the power fails.

    1. Re:True, however.... by sql*kitten · · Score: 1

      If you have a database that is stored in RAM and periodically written out to the hard disk (for backup reasons) then you get better performance than if you have a database that is reading and writing most of the time.

      EMC and similar storage arrays have done this for decades; the array cabinet itself contains enough backup power to flush the caches to disk and power down cleanly if the main power supply fails (assuming you didn't already have a UPS there, of course, and if you can afford EMC then you can afford a diesel generator in the basement :-) ).

    2. Re:True, however.... by lokedhs · · Score: 1
      You'd still need to write the log to disk, or you'll end up with inconsistent data when rebooting after a system crash.

      This doesn't matter for MySQL though, since they never cared about data integrity anyway.

    3. Re:True, however.... by Anonymous Coward · · Score: 0

      I was using this in 1997. The product is from Micromuse, and in called Netcool/Omnibus. It is written using Sybase libraries, and runs entirely in memory, periodically updating ascii files on disk. Upon reboot, it creates a database in memory; loads the database from the disk files; and continues on it's merry way.

    4. Re:True, however.... by gilesjuk · · Score: 1

      Anyway, rather than modify applications to store everything in RAM why not create a new filesystem (forking from an existing one of course) especially for the task or add some tuning parameters to the OS (they probably already exist and need utilising). It seems the best way to do things, then any application can take advantage of the facility.

    5. Re:True, however.... by Anonymous Coward · · Score: 0

      Like the tmpfs filesystem Solaris has had for years? /tmp *is* memory.

  17. Not until I can put my ram in a redundant array by Anonymous Coward · · Score: 0

    See subject.

  18. Considering the non-existent ACID support by Anonymous Coward · · Score: 5, Funny

    Considering the non-existent ACID support in MySQL it sounds like a good idea, it's not like MySQL will get any more errorprone than it is now...

  19. It works! by The+Original+Yama · · Score: 3, Interesting

    When our site was slashdotted last year, we were able to cope with the load after putting our database into RAM. It's probably not the best solution, since the RAM would get deleted if the system crashes (or the power goes out, etc.), but it's a good temporary measure.

  20. Fundamental concerns... by jkrise · · Score: 4, Insightful

    I guess the issue with databases is not only speed and reliability, but a totally different ballgame called 'user-perception'. Even now, tape drives are used to archive databases; despite the fact that less than 1 in 1000 of the tape media get used for actually retrieving the data during a crash. NAS devices and the like have changed this, but the temptation remains to use tape.

    I guess the RAM vs disk debate is on similar lines - but there are some vital differences:
    1. Disks (esp. IDE) have become a commodity item and can be accessed by different system architectures easily.
    2. IDE and SCSI standards have stood the test of time - 13 and 20 years respectively, unlike RAM wihch has evolved from Parity, non-EDO, EDO, DRAM, SDRAM, DDR-RAM, RAMBUS RAM etc., and suffers several patent and copyright encumberances.
    3. Although RAM prices are driving down, the h/w to interface speciality RAM banks is proprietary and hence cost-prohibitive, and comes with attendant long-term supportability risks - think Palladium, or even Server mobos over the last 10 years. TCO for RAM based systems could thus be much higher than disk-based systems.

    Overall, except for apps that need super-high speeds, and users that can risk proprietary stuff, disk-based databases shall remain.

    My 0.02

    --
    If you keep throwing chairs, one day you'll break windows....
  21. Hard Disks doesnt keep up... by Yag · · Score: 1

    Everything in pc market is going faster month by month, everything but disks. Disks are becoming a bottleneck, sure, but we dont need to replace them with RAM, we need to replace them with a good subsitute. Ibm NanoDrives could be the answer, dunno (speed like RAM, 100gb/cm, no power needed to keep data...), but, RAM is RAM, hard disks are hard disks, we need just better ones.

  22. Some thoughts on RAM by Effugas · · Score: 4, Interesting

    RAM-resident Database? Yes, that would be Google -- a massive, massive cluster of x86 boxen with a couple gigs of RAM apiece. Each gets a portion of the hashspace, leading to near-O(1) searchability. I'm pretty sure all the big search engines work this way, at this point -- the DB is checkpointed into RAM, but is never actually run from it.

    Recent discussions about disks vs. CPU's have ignored the massive decreases in the cost of RAM. For a very long time, the secret bottleneck in PC's (in that it wasn't advertised heavily) was RAM. That's starting to disappear -- there's a gig in my laptop, and there's no discernable improvement in all but the most intense applications if I were to go beyond that.

    Virtual Memory is already on the chopping block; any time it's imaginable that a system might need another gig of storage, it's probably worth going to the store and spending the hundred dollars.

    But what if more RAM is indeed needed? One of the most interesting developments in this department has involved RDMA: Remote DMA over Ethernet. Effectively, with RAM several orders of magnitude faster than disk, and with Ethernet achieving disk-interface speeds of 120MB/s, we can either a) use other machines as our "VM" failover, or more interestingly, b) Directly treat remote RAM as a local resource -- a whole new class of zero copy networking. This Is Cool, though there are security issues as internal system architectures get exposed to the rough and tumble world outside the box. It'll be interesting to see how they're addressed (firewalls don't count).

    What next, for the RAM itself? I don't think there's much that value in further doublings...either of capacity, or soon, of speed. What I'm convinced we're going to start seeing is some capacity for distributed computation in the RAM logic itself -- load in a couple hundred meg in one bank, a couple hundred meg in another, and XOR them together _in RAM_. It'd just be another type of read -- a "computational read". Some work's been done on this, though apparently there's massive issues integrating logic into what's some very dumb, very dense circuitry. But the logic's already done to some degree; ECC verifiers need to include adders for parity checking.

    My guess...we'll probably see it in a 3D Accelerator first.

    *yawns* Anyway, just some thoughts to spur discussion. I go sleep now :-)

    Yours Truly,

    Dan Kaminsky
    DoxPara Research
    http://www.doxpara.com

    1. Re:Some thoughts on RAM by BenV666 · · Score: 1
      For a very long time, the secret bottleneck in PC's (in that it wasn't advertised heavily) was RAM. That's starting to disappear
      ... It still is, however, the bottleneck is moving up towards the cache...
    2. Re:Some thoughts on RAM by jkrise · · Score: 1, Troll

      "Recent discussions about disks vs. CPU's have ignored the massive decreases in the cost of RAM"

      I don't recollect a disk vs CPU debate!
      RAM prices might have decreased, but implementing databases over RAM need proprietary architectures over and above RAM, which srives the price up. Let me explain. A commodity $200 PC can support 500GB of disk space (4 * 120GB + USB drives). OTOH a mobo supporting even 4GB of RAM could cost over $2000, and it's likely a proprietary design.

      "For a very long time, the secret bottleneck in PC's .. was RAM"

      Not true. I'd say software bloat is the chief culprit. 1MB-->4MB-->16MB-->64MB-->256MB is the route which DOS to Win3.1 to Win95 to Win2K to WinXP has taken. From the user point of view, from Win95 onwards, there's been nothing great to shout about. S/w is the bottleneck.

      " Directly treat remote RAM as a local resource (RDMA) -- a whole new class of zero copy networking. This Is Cool, though there are security issues as internal system architectures get exposed to the rough and tumble world outside the box. "

      In the ultimate analysis, a simple architecture works better than a complex one. Already Linux based systems do not have the overhead of checking for millions of viruses, bloatware, inefficient security mechanisms etc. unlike the Windows counterparts. I'd rather design a tightly-coupled cluster of Linux based systems than a high-tech Seti type system.

      To sum up, disks are simpler, cheaper, less complicated, stable designs over longer durations and thus, much better. And from the SQL approach, disk-based systems provide protection from DRM.

      --
      If you keep throwing chairs, one day you'll break windows....
    3. Re:Some thoughts on RAM by Kevin+Stevens · · Score: 5, Interesting

      this is true, google does hold everything in RAM, but google does not care if one of those boxes goes down and they have to rely on a couple of hours old data for searches. However, a financial institution, or even a webstore, can not afford to just lose a couple of transactions if a machine goes down. I do not think this model would work well except for Databases that are primarily read only (IE you wont have to write to disk that often), since for this to work for most DB's you are going to need an up to the millisecond snapshot of the DB. Google is in a unique position where it is not critical for its data to be 100% up to the minute, and that is why it works. There are many applications for this, but this is not really a one size fits all solution.

    4. Re:Some thoughts on RAM by Salamander · · Score: 3, Insightful
      any time it's imaginable that a system might need another gig of storage, it's probably worth going to the store and spending the hundred dollars.

      A gig is nothing in the enterprise space. What happens when a terabyte is the unit you allocate between applications or departments, and a petabyte is still big but no longer guaranteed to be the biggest on the block? Gonna walk down to the store and buy a terabyte of RAM, plus a CPU and chipset and OS capable of addressing it? This whole discussion is based on a faulty concept of what "big" is nowadays. For a truly big database, RAM isn't going to cut it. RAM and disk sizes have grown rapidly, but database sizes have (at least) kept pace. That will probably always be the case. If something came along that was even bigger than disks, but even more cumbersome to access, databases would interface to it anyway. General-purpose OS access won't be far behind, either. VM is far from dead; if anything, the change that's needed is to get rid of bogus 2x/4x physical-to-virtual ratios in broken operating systems like Linux and Windows so they can address even more virtual memory.

      we can either a) use other machines as our "VM" failover, or more interestingly, b) Directly treat remote RAM as a local resource

      I worked at a company several years ago (Dolphin) that allowed just this sort of remote memory access at the hardware level. Even then, there were so many issues around consistency, varying latency (this is NUMA where access is *really* non-uniform), and system isolation (it sucks taking a bus fault because something outside your box hiccuped) that the market resisted. InfiniBand HCAs don't even do that; access to remote memory is explicit via a library, not just simple memory accesses. RDMA over Ethernet is even less transparent, and has a host of other problems to solve before it's even where IB is today; it's a step backwards functionally from software DSM, which has been around for at least a decade without overcoming the same sort of acceptance issues mentioned above.

      What I'm convinced we're going to start seeing is some capacity for distributed computation in the RAM logic itself

      You could start with IRAM at Berkeley. There are links to other projects as well, and some of the papers mention still more that don't seem to be in the links. A lot of what you talk about is possible, and being thought about, but a lot further off than you seem to think.

      --
      Slashdot - News for Herds. Stuff that Splatters.
    5. Re:Some thoughts on RAM by yarbo · · Score: 2, Informative

      "OTOH a mobo supporting even 4GB of RAM could cost over $2000, and it's likely a proprietary design." My $200 MSI K7D Master L supports 4 Gigabytes of RAM link

    6. Re:Some thoughts on RAM by GigsVT · · Score: 1

      One of the most interesting developments in this department has involved RDMA [infinibandta.org]:

      How does this relate to the Distributed Shared Memory effort of OpenMosix? (which is already in beta thanks mostly to the MAASK group!)

      --
      I've had enough abrasive sigs. Kittens are cute and fuzzy.
    7. Re:Some thoughts on RAM by Realistic_Dragon · · Score: 1

      "b) Directly treat remote RAM as a local resource -- a whole new class of zero copy networking."

      Been there, done that - I once worked on a flight simulator that used a shared memory area accross many machines to distribute data as things progressed.

      It's not as cool as it sounds and was eventually ditched for ethernet (not TCP/IP, just raw network messages) for real time information exchange.

      In the final analysis however, it's probably faster for high bandwidth applications to build a dedicated high speed bus than to read and write out of one memory area and avoid all of the locking and multiple access issues, and for low speed applications (where latency is small compared to data processing time) a conventional (but souped up) ethernet style system is probably adequate and a good deal cheaper.

      --
      Beep beep.
    8. Re:Some thoughts on RAM by Anonymous Coward · · Score: 0

      near-O(1) searchability

      What exactly is "near-O(1)?" Would that be O(log n), O(log log log log log n)?

    9. Re:Some thoughts on RAM by Anonymous Coward · · Score: 0

      It means O(1) 95% of the time, O(something else) the rest of the time...lots of algorithms use this average case approach rather than the worst-case approach you first learn about in cs classes. Like the simplex algorithm, it's exponential worst-case, but everybody uses it because you need a very degenerate case to get bad results.

    10. Re:Some thoughts on RAM by drinkypoo · · Score: 1
      this is true, google does hold everything in RAM, but google does not care if one of those boxes goes down and they have to rely on a couple of hours old data for searches. However, a financial institution, or even a webstore, can not afford to just lose a couple of transactions if a machine goes down.

      Ahem.

      "Imagine a beowulf cluster of these things."

      Actually that's not particularly the kind of cluster I'm imagining but you get the idea. The best way is just to have failover. I don't see why you are saying that google doesn't have to be up to the minute as if this design were inherently slow; it's not slower, it's faster. It's true it's distributed, but there are ways to make that not cause you too many problems. They involve throwing more hardware at the problem but that's not necessarily a serious drawback.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    11. Re:Some thoughts on RAM by vadim_t · · Score: 2, Informative

      Tyan Tiger MP: Dual AMD CPU, up to 4GB ECC Reg RAM (IIRC), PCI64, about $200
      Tyan Tiger MPX: Dual AMD CPU, up to 4GB ECC Reg RAM, PCI64, about $260. Registered RAM not needed in the first 2 slots.

      A perfectly decent board, btw, I have the second one and it's rock solid. Now, to be completely fair, according to Tyan you will only get 3.5GB or so, depending on configuration due to the address space allocated to AGP and other things. Probably you can get very close to 4GB by using a PCI video card.

    12. Re:Some thoughts on RAM by batkins · · Score: 1

      O(1) is constant time. In other words, regardless of the size of a particular data structure, it takes the same amount of time to access an element. This is normally considered a Good Thing.

    13. Re:Some thoughts on RAM by Kevin+Stevens · · Score: 1

      I didnt mean that 'up to the minute' comment to mean its slow. It is much faster... but I guess I had a whole scenario in my head that I didnt explain enough... What I was saying is that google is constantly updating its database of searches and whatnot, and as most know, its a giant cluster system. So... one node goes out, you lose that latest information on a search. Now.. I have never seen a search fail, so they must use older data for the search. IE lets say a node goes down that has some of the information about the huge tornado storms that have rocked the south in the past week. Now someone does a search on 'tornado south' and they will not get that information in their search. Thats what I was referring to as not being up to the minute. I am not completely pulling this out of my ***. I have read an interview w/ one of the google heads that describes in vague terms how it works. Essentially they go around once a week and just replace failed components. My real point was that RAM is volatile, and you will need to have the DB backed up to a disk at all times- for most applications, you cant lose even a single transaction. And for write intensive applications, you lose alot of the benefits of using RAM disks, since the disk is still a bottleneck anyway. But of course read only oriented applications would rock using a scheme like this.

    14. Re:Some thoughts on RAM by rtscts · · Score: 1
      Virtual Memory is already on the chopping block;
      That's a swap or page file. Virtual Memory is an abstraction, a virtualised memory space. Hiding the physical details simply makes swap files transparent to the application, but doesn't automatically make swap == virtual memory.

      Other than that, I agree. My Linux machines have been running without swap for years. It's a shame Windows' memory manager is designed to swap whether you need to or not, or it gets testy. I've actually gone 180 from past practise, and started using RAM for normally disk based tasks. tmpfs on /tmp for example.
    15. Re:Some thoughts on RAM by Effugas · · Score: 1

      Very, very insightful post. (Mods, do your thing.)

      You are quite correct that enterprise scale databases have increased at a similarly astounding pace; however, one rarely taps OS resources to manage that space. Oracle is more than happy to access raw volumes, and any efficient memory management system at even the Terabyte scale _is_ _not_ going to resemble the average desktop or server's requirements. It's just a completely different layout.

      I don't think "Virtual Memory" is the appropriate term for large database; the nature of the backing store is just so different. Among other things, the "swap file" is actually relevant upon reboot! So I stand by my original assertion -- VM is dying.

      I had thought of RDMA as a more efficient model for cluster communication, i.e. shared memory models actually worked transparently across hosts, and MOSIX processes could simply migrate where required. Stability-wise, it seems _all_ cluster operations can involve hosts simply failing to respond; this just seems a more efficient way to exchange data (since DMA massively reduces the CPU involvement in data transfers).

      IRAM doesn't seem to be what I'm thinking. Neomagic put out a GPU with integrated DRAM for laptops; logic and storage on the same die isn't so unique. But simple, non-branching math, massively distributed, could eventually grant order-of-magnitude speed improvements for a select group of operations by avoiding the Von Neumann bottleneck. I know that Don Becker had some work in this area, and I _know_ there are problems bringing it to market. My point is that RAM can't get much bigger, and soon enough it won't be able to get faster, so the only thing left is to make it smarter.

      Thanks!

      --Dan

    16. Re:Some thoughts on RAM by Effugas · · Score: 2, Insightful

      Others have rebutted your assertion on RAM availability.

      Clearly you haven't used XP much. I've got an XP Video Server hooked up to a TV; it has uptime of around four months right now. Good luck getting a Win9x machine to do that -- 95 literally could never stay up more than 47 days, due to a clock related overflow. They've done ALOT to fix stability, and it's nothing but ignorance to claim otherwise.

      It's nice to be able to finally change your IP address without rebooting, too. :-)

      95->98 was a huge jump. ME was an ummitigated disaster, but 2000 and XP have been herculean tasks that really have paid off well.

      I'm a hardcore Linux/FreeBSD/OpenBSD user and programmer, but credibility demands honesty.

      Linux would have many, many more viruses if it was even remotely as popular as a client platform. Since it's a popular server, it actually has more out-of-the-box remote roots (IIS notwithstanding).

      Disks aren't necessarily simpler; the amount of work you need to do to keep really slow data on disk efficiently cached in RAM is monstrous. What you want to do is batch all sorts of operations together in RAM, then blast it onto the disks in an atomic operation, but do it such that if the disks crash during a blast, the data is still accurate...it's messy; disks introduce major latency within which failures can occur. RAM is so low latency that this is much, much less a problem -- the moment a batch is ready to be checkpointed, it's already practically there. So RAM approaches, beyond being faster, become simpler.

      --Dan

    17. Re:Some thoughts on RAM by Effugas · · Score: 1

      GigsVT--

      Hardware support (_D_irect _M_emory _A_ccess).

      --Dan

    18. Re:Some thoughts on RAM by Effugas · · Score: 1

      RD--

      Things are a bit different now. With 100MB/sec to 1GB/sec of bandwidth available from GigE/10GigE, the high speed bus itself is going commodity. But the speeds are so high that you wouldn't necessarily want to pump that through your CPU for serving purposes.

      Enter RDMA -- which uses raw Ethernet messages, not IP.

      --Dan

    19. Re:Some thoughts on RAM by gidds · · Score: 1
      What next, for the RAM itself? I don't think there's much that value in further doublings...either of capacity, or soon, of speed.

      Capacity, maybe, but speed? I remember the days when RAM ran at the same speed as the processor. Then we had processors running at multiples of the RAM speed, then cache memory because the RAM wasn't fast enough, then two levels of cache, three... Cache is very ingenious and useful, but now that we have processors running at twenty times the RAM speed, it has a lot of catching up to do, and I can't see how you can say that soon, faster RAM won't be of benefit.

      --

      Ceterum censeo subscriptionem esse delendam.

    20. Re:Some thoughts on RAM by Elwood+P+Dowd · · Score: 2, Interesting

      Um, in most datawarehouseing situations (for example, a bank), it is assumed that you are not working with the most recent data. You are working with a snapshot from 10 minutes ago. Or two hours ago. Or a day ago.

      Your characterization is still correct, in that my transactions from last week cannot disappear once they've been posted, but Google has this problem as well. Google solves it with massive redundancy. I don't know if that would be cost effective for my bank.

      --

      There are no trails. There are no trees out here.
    21. Re:Some thoughts on RAM by fishbowl · · Score: 1

      You made the OP's case by splitting hairs.
      Now, which boards support more than 4GB? What do you need when you want *way* more than 4?

      --
      -fb Everything not expressly forbidden is now mandatory.
  23. shows MySQL != "real" database by Anonymous Coward · · Score: 4, Insightful

    Many databases contemplate database sizes in the tens to tens of thousands of gigabytes. For smaller databases, RAM is an easy thing, and even for a small number of gigabytes it might be reasonable. For larger databases RAM would be unthinkable. The fact that a database developer doesn't know what databases are used for is disturbing.

    Most modern databases also make very effective use of RAM as a cache in order to speed up queries. I don't know about MySQL since I don't use it. My guess, however, is that it does not, since that would eliminate the need for this stupid measure.

    As far as reliability, RAM is more vulnerable to transient things like cosmic radiation. ECC memory will take care of most single-bit problems (there are lots of them...), but all it can do for multi-bit failures is determine that yes, your data is screwed.

    Also, swapping out a bad hard disk in a RAID configuration is relatively simple and has a recovery process. Suppose your RAM stick fails; what is your recourse? You've permanently lost that data, and systems with hot-swappable RAM are much more costly than ones with similar capabilities for hard drives.

    Finally, consider the problem of catastrophic system failure. If the power goes out, your RAM dies but your hard disk is still safe. If it is worse (say your facility burns down) then it is much easier to recover data from the charred remnants of a hard disk than from the charred remnants of a DRAM chip.

    The idea of replacing disks with DRAMs has been around for quite a while now. But disks continue to get (a bit) faster and (much) larger. Every time the morons want to replace it they get shot down. More sensible people focus on using the resources available in ways such as caches that make systems faster and more reliable.

    1. Re:shows MySQL != "real" database by ajs · · Score: 4, Insightful

      It's true MySQL is not a real database. After all, it rarely has press releases, the support contracts don't cost nearly enough and what's more it's so easy to administer that your average UNIX guy with a basic RDMS background can get by. It's the freakin' anti-christ!!!

      Seriously, can we all just get over size comparisons? MySQL runs a lot of very useful databases from my dinky little statistics systems that are less than 10MB to giant multi-TB DBs. When you talk about the latter being RAM-resident, you're usually not talking about ALL of the data, but rather indexes and as much of the indexed columns as possible. In that sense a database can be fully RAM-resident on a 4-16GB machine and still have many more TB on disk.

    2. Re:shows MySQL != "real" database by Anonymous Coward · · Score: 0

      MySQL runs a lot of very useful databases from my dinky little statistics systems that are less than 10MB to giant multi-TB DBs.

      No, MySQL runs a lot of very useful *filesystems*.

    3. Re:shows MySQL != "real" database by lokedhs · · Score: 1
      If it's price that gets you so upset, I recommend you take a look at SAP DB. It's a proper database, strong enough to run SAP R/3 (which should, to anyone that knows about R/3, be enough proof it's enterprise capable) and it's GPL'ed.

      It does take a little bit more time to learn than PostgreSQL, which would be the other GPL'ed alternative, but it's easier than Oracle and needs much less (if any) maintenance.

      Deutche Post runs their R/3 system on it, and it's a huge system.

    4. Re:shows MySQL != "real" database by cperciva · · Score: 1

      Postgresql is not GPL. Postgresql is distributed under the BSD license.

    5. Re:shows MySQL != "real" database by rnicey · · Score: 2, Informative

      You really don't know what you're talking about do you?

      a) Of course MySQL has RAM cache. Here is one part of it:
      http://www.mysql.com/documentation/mysql/bych apter /manual_Reference.html#Query_Cache

      b) More than a bit here or there and your disk data is probably toast also. Where do you think the data on the disk is computed from?

      c) There are hot-swap/raid type RAM motherboards available also. But that's not really the point.

      I run a master MySQL/innodb database from disks and I replicate to 20 slaves each of which has the data that I need to move fastest on a 6GB ramdisk. Load balancing software ensures that should one drop dead (and it happens occasionally) it just tries another. You ought see my throughput, I'll put it against your disk array anytime.

      Right tool, right job. Bias is not a tool.

    6. Re:shows MySQL != "real" database by lokedhs · · Score: 1

      Thanks for the clarification. I'll try to double-check better in the future.

    7. Re:shows MySQL != "real" database by Mr.Ned · · Score: 1

      MySQL 4 does have a RAM cache which greatly speeds things up. MySQL 3 didn't.

    8. Re:shows MySQL != "real" database by Anonymous Coward · · Score: 0
      Of course MySQL has RAM cache. Here is one part of it:
      http://www.mysql.com/documentation/mysql/bychapter /manual_Reference.html#Query_Cache

      You really are a fuckwit, aren't you. Which bit of "a query cache" did you not understand? What real databases have is a data cache, which is managed by the database engine because it knows far better than the file system which chunks of data will be required next - because it's asking for them. Jeez.

    9. Re:shows MySQL != "real" database by rnicey · · Score: 1

      Really? What you fail to understand is that this is needed much less in a total RAM environment because seek time is almost none. Think about what cache is for a moment. Move frequently used data to your fastest access medium (typically ram). If you operate entirely from your fastest medium. Duh. Not much need for storgae cache.

      Other types of cache help in calculating starting points and other 'access helper' functions. Things like caching optimizer results etc. A lot of this is done, but I admit there is a long way to go. None of this goes anywhere to deciding where to store the main data though.

      You also seem to think MySQL is any sort of database, it really isn't. It's an SQL front end to a database engine, of which there are many. MyISAM, InnoDB, bDB, etc. Take your pick.

      Turn your anonymous filter off and post something useful for a change.

    10. Re:shows MySQL != "real" database by MattRog · · Score: 2, Informative

      You really don't know what you're talking about do you?

      It is fairly clear you are the one who is a bit confused here. Because, typically, disk is the primary data storage mechanism and main memory capacity is less than the total size of a database the enterprise DBMS vendors (this does NOT include MySQL) have what is commonly referred to as a 'data cache' (vendors may call it something else) which stores data pages in main memory (there are other caches for other data structures, but we're only concerned with the data cache at this point). I'll explain common techniques and then why the data cache is typically superior to MySQL's 'query cache'.

      Note: I am going to generalize throughout, so there may be differences between your favorite enterprise DBMS and what I say here so please don't post 'My DBMS does all but this one tiny thing the same': the theory is more or less the same.

      Data caches are managed by the DBMS and are strictly controlled by the DBA. Typically most caches are managed by a MRU/LRU (most/least recently used) algorithm to keep stale pages out of the cache (although the DBA can configure the algorithm to suit the particular needs of the system). Also it is possible to split the data cache up into smaller chunks (called cachelets, pools, etc.) and bind those to different physical database objects (tables, indexes, etc.). You can thus ensure that an important table is always going to have room in the cache by binding a dedicated cache to it. You can also prioritize objects so that if more than one object is sharing a cache you ensure it has priority over another one.

      MySQL relies upon the OS filesystem cache to do this work for them. This is an obvious advantage from a MySQL code developer's standpoint since they do not have to write any additional code to handle this. However there are some fairly significant drawbacks and limitations with this simplistic approach. Simply put: the DBMS (via knowledge from the DBA and query statistics) has a much better 'big picture' than the OS. As such, the DBMS can set an optimal strategy for maintaining the cache. I am not intimately familiar with OS data caches so I will not comment on them except I guess that they 'assume' that most data accesses will be of the 'sequential file access type' (e.g. apps will request blocks of a particular file in a sequential fashion). Individual physical row retrieval issues aside, this is very rarely the case in OLTP systems. Even if not, they still are dealing with limited knowledge and could never be as efficient as a DBMS-run cache.

      OS caches are also not nearly as configurable, which comes as no surprise since they are not really designed for this type of use (or mis-use as the case may be). MySQL zealots often quote "best tool for the job" which I wholeheartedly agree. The OS cache is obviously NOT the best tool for the job for DBMS use. Not having a configurable data cache is a huge limitation - and considering past MySQL AB views of things like referential integrity (everyone remembers the infamous 'what for?' quote from the TODO list) it is probably due to ignorance of DBMS products and/or laziness (as an aside, isn't it a little scary that misguided people attempt to deploy MySQL in mission-critical use when it was developed by people who really have no clue about DBMS in general?).

      Enough rambling aside, we now know both what a DBMS-managed data cache is and why they are superior to OS-level caches. What about the vaunted MySQL 'query cache'?

      Pure junk.

      Ok, I typed that firmly tounge-in-cheek, in the context of a feature for MySQL, it is not pure junk. However, this is not a superior feature that MySQL has over enterprise DBMS products. To put it bluntly: the query cache is a cheap imitation to a data cache and is primarily needed because of the lack of a data cache. Before we can discuss it, go

      --

      Thanks,
      --
      Matt
    11. Re:shows MySQL != "real" database by dubl-u · · Score: 1

      As far as reliability, RAM is more vulnerable to transient things like cosmic radiation. ECC memory will take care of most single-bit problems (there are lots of them...), but all it can do for multi-bit failures is determine that yes, your data is screwed.

      This is just a silly argument. It applies equally to in-RAM and on-disk databases. The "on-disk" databases still use RAM with the assumption it just works, and any well-tuned database will keep your most important data in RAM anyhow. And the "in-RAM" databases that I've used do snapshotting and transaction logging to disk.

      In either case, if RAM becomes corrupted in a way the hardware doesn't detect, you probably won't notice. If you do notice, about all you can do is try to recover the right data from backups.

      Finally, consider the problem of catastrophic system failure. If the power goes out, your RAM dies but your hard disk is still safe. If it is worse (say your facility burns down) then it is much easier to recover data from the charred remnants of a hard disk than from the charred remnants of a DRAM chip.

      If somebody is keeping data in a fashion where the best option is to sift through smoldering ashes, find a charred piece of hardware, and hope to hell that somebody in a clean room can pull the data off, then either a) the data isn't important, or b) that person is a dolt.

      The right thing to do is to have backups and, if disaster recovery time is important, hot spare servers in a separate location. Thanks to today's cheap bandwidth, it's even possible to keep your servers running transactions in parallel, so that the spare hardware is constantly up to date and doublechecking the work of the primary system. Of course, COTS software is probably 15 years away from taking advantage of that, but it's certainly a possibility in a custom system.

    12. Re:shows MySQL != "real" database by ajs · · Score: 1
      And filesystems are databases too (some moreso than others, ClearCase for example was actually a relational fileystem with revision control semantics).

      However, the comparison of MySQL to a filesystem falls short in several respects:

      • Filesystems are typically single-key (e.g. like DBM)
      • Filesystems are typically comprised of a small number of tables (usually 2-5 depending on the FS complexity) that map pre-defined data fields (e.g. the "superblock" and other fileystem meta-data; "directories", "inodes", to use the UNIX terms) where relational databases such as MySQL provide an infrastrucutre for building such a layout, or any other...
      • Filesystems are most often quite limited in the data types that they can support and the query semantics that can be used to access them. Most modern databases support a common subset/superset of the SQL datatypes. MySQL has its own types as well as the SQL types. I think there are one or two missing simply because they haven't been high-demand items.
      The whole "MySQL is just a filesystem" thing got a little tired about 5 years ago....
    13. Re:shows MySQL != "real" database by ajs · · Score: 1

      If it's price that gets you so upset

      I'm not upset at all, and the price doesn't bother me in the least. I pay a comparitively nominal fee for OS support, and in environments where I rely heavily on my database, I would usually buy an additinal support contract with the vendor of the database. All of that is, of course, regardless of the database. MySQL, Oracle, PostgreSQL, DB2, SAP DB, whatever... I don't really care as long as the things I need are there and the price is right for what I'm doing. The thing that usually makes me stay with MySQL is that it's one of the simplest to install and use, which means that I do all of my prototyping with it.

      Woefully, with just about every database out there, the price includes a hefty TCO based on the fact that the database administration is black magic. This is less true with PostgreSQL and Sybase (is Sybase still around, I loved that database...) than it is with Oracle, but EVEN LESS SO with MySQL. The database relies on the OS to provide caching, storage growth, etc and the DB just worries about parsing and executing queries and structuring data for fast, reliable access. I love being able to just "mv" a table (or even JUST THE INDEXES) to a new disk array when I need to and then create a link. Beats the hell out of having to grok the "alter tablespace" command... *shudder*

      This is, IMHO, the right way to go because UNIX/Linux admins already know how to tune their OS and filesystem, so there's no reason for MySQL to go outside of a database's core expertise. Generally, I find that MySQL's performance win over a DB like Oracle is most often a result of not trying to re-implement the OS. Caching is a really good example, since the OS is much better at filesystem cache managment than the DB can be. Why? Lots of reasons from cache management semantics in the processor, bus and disk controlers to the fact that for sufficiently beefy NAS or SAN environemnts, caching may not be a good plan.

      Enjoy!

  24. BTDT by Anonymous Coward · · Score: 0
  25. Still needs a HD by SirDrinksAlot · · Score: 1

    You're still going to need to write any changes to the disk or else you could risk loseing everything if something (hardware or software) failed.
    useing ram to read out from the database wouldnt be a bad idea tho.

    1. Re:Still needs a HD by Anonymous Coward · · Score: 0
      Databases already does this, and has been for quite some time. Setting the memory arena for the database to the same size or larger than the database itself has always been somehting you could do in order to maximise DB performance.

      In all honesty I fail to see where the amazing news is. Then again, I should expect that from the MySQL people who time after time has proved themselves to know next to nothing about databases.

  26. Niche applications by digitalhermit · · Score: 2, Insightful

    This is interesting. Lots of responses so far have said that putting a database into volatile memory is preposterous. But from reading the article I'm not certain if it's such a bad idea in some situations. There are often sites that have a lot of relatively static data in their databases. These sites often use a backend database because it's easier, programmatically and as far as maintenance is concerned, to do so rather than create lots of static pages. Writes to the database could be done as a pass-through so they do get written to the disk "backup". A good example may be Google's cache -- the pages do not need to be re-indexed all the time but speed is critical. If RAM can be faster and, possibly even use less power than a hard drive, then there is a benefit. In Google's case, there is no writing, only queries.

    This means that in any situation where data is unchanging except for periodic updates this could be a good idea.

    1. Re:Niche applications by Anonymous Coward · · Score: 0

      Then run two databases, one on disk for writes, one in RAM for reads, and replicate between the two.

      Oh wait, MySQL doesn't support that either...

    2. Re:Niche applications by bobbozzo · · Score: 1
      Then run two databases, one on disk for writes, one in RAM for reads, and replicate between the two.
      Oh wait, MySQL doesn't support that either...

      Actually, it does.

      --
      Nothing to see here; Move along.
  27. ebay uses solid-state ram drives for performance by billmil · · Score: 2, Interesting

    http://www.imperialtech.com/success_ebay.htm

    The basic idea: use solid state ram drives (with separate power supply) for your busy tablespaces and your redo logs.

    This leverages 'cheap ram' technology with existing (and proven and scalable) db architecture.

    For ebay, for example, they might store 'active items' in 'ram-drive-backed' tablespace and 'old items' in the 'hard-drive-backed tablespace'.

    These solid-state drives are expensive, but additional Oracle licenses (or moving from 'standard' to 'enterprise' or to 'clustered') are very very expensive.

    bill m

  28. This is nothing new by smackdaddy · · Score: 2, Informative

    There is already a leading in Memory database that is extremely fast. Check out TimesTen. That is what we use. There is also another one called Polyhedra. But the redundancy on Polyhedra doesn't appear to be as good as TimesTen, and it doesn't support Unicode either.

    1. Re:This is nothing new by Anonymous Coward · · Score: 0

      Provue publishes Panorama for Macs & PCs. Its wicked fast and powerful. Last time I used it (its been a while) I thought it was fabulous. It used to be pretty popular on the Mac. I plan get get an updated copy before too long.

  29. The nature of a database by electrokal · · Score: 1

    I imagine that most databases are read far more than they are written, if all new writes or modifications of data were immediately written to hard drive, wouldn't that create a minimal performance hit while preventing any data loss due to catastrophe?

    1. Re:The nature of a database by Anonymous Coward · · Score: 0

      Hello, McFly ... That's how all of the "big boy" databases already work. Data modifications are done by "write ahead logging". The Log record is written to disk first, and then the cached data/index pages are written to in RAM. The data is persisted on disk *first* and then the RAM cache is updated.

  30. Importance of ACID Properties in a DB System... by RTMFD · · Score: 4, Insightful

    ...have nothing to do with the medium the data is stored in! What you're trying to guard against is concurrent access of resources by transactions which in cases can cause incorrect or inconsistent results in a RDBMS. I think this article is a bit obvious for most people who've had any training in how databases actually work and I think Monty was actually pretty gracious for taking the time to give the interviewer a smidgeon of clue.

    1. Re:Importance of ACID Properties in a DB System... by sql*kitten · · Score: 5, Insightful
      I think this article is a bit obvious for most people who've had any training in how databases actually work and I think Monty was actually pretty gracious for taking the time to give the interviewer a smidgeon of clue.

      From the article:

      Is it easier to maintain ACID principles with pure RAM?

      Yes. This makes ACID almost trivial.


      Umm, no. There is no difference in the ACID algorithm whether the database is stored in memory or on disk. The only thing that is easier to do in memory is to fake it, because for low levels of concurrency you can serialize everything without anyone noticing. But that strategy will collapse under load. Far better to do it properly the first time. Yeah, it slows you don't with a single user, but when you have tens or hundreds of users connected, it'll still work.


      With RAM the algorithms that one uses to store and find data will be the major bottleneck, compared to disk thrashing now.


      Actually, the algorithms are the bottleneck on disk too. Monty would know this if he had a query optimizer like the one in Oracle (or had even looked at an explain plan).


      It's when you store data on disk that you are still manipulating on disk that you need the ACID principles.


      Nonsense - you need ACID if there is any conceivable case in which two users might want to access the same data at the same time, or if there is any conceivable case that a write could fail, or if you want to support commit/rollback at all. In other words, if you're running a database and not a simple SQL interface to flat files. Hell, there's an ODBC driver for CSV that does all that MySQL does.

    2. Re:Importance of ACID Properties in a DB System... by Anonymous Coward · · Score: 0

      you are full of it. you should try to not criticize things you only partially understand.

    3. Re:Importance of ACID Properties in a DB System... by RTMFD · · Score: 1

      Hmm, I'm not sure (I can't get in Monty's head), but my guess is that Monty was answering a different question than the one the interviewer was asking. I suppose the reviewer believed since all of this stuff was now in RAM, one could simply slap a mutex or some other locking mechanism around the shared resource and magically satisfy ACID properties. Monty seemed to be saying that not having to consider crap like OS buffering would make implementing an ACID database a lot easier and some shortcuts for concurrent access control could be taken in places where you might not need the strictness of strategies like multi-version timestamps. I really hope he's not as clueless as the reviewer.

    4. Re:Importance of ACID Properties in a DB System... by platypus · · Score: 1

      Monty seemed to be saying that not having to consider crap like OS buffering would make implementing an ACID database a lot easier ...

      But, they don't even know the OS they are programming to, so either you use O_SYNC when on posix, or you can't predict anything about VFS buffering. And even when using O_SYNC, you are in no way guaranted (when using pure IDE IIRC) in what order your commands will hit the disk, and when (on-disk cache).

      So, I also have no idea w.t.f. the physical nature of the storage medium should have to do with ACID.

  31. Already in Use by NearlyHeadless · · Score: 3, Informative
    There are already memory-resident databases in use. For example, Lucent uses them for creating products which process cell-phone transactions. See http://www.bell-labs.com/project/dali/.

    There are some cool ideas there. They use two copies on disk for backup in case of system failure. Because of this they don't have to do page-latching.

    In some configurations, though, this is irrelevant, because write transactions lock the whole database! Because they know all transactions will be extremely short, this is faster than locking at page or row level.

  32. Mod parent up!!! by Anonymous Coward · · Score: 0

    You are spot on. The guys at MySQL have never had a clue about relational databases, and this probably explains why MySQL is not a relational database. :)

  33. Been there Done that got the T-shirt.... by WinPimp2K · · Score: 2, Interesting
    in 1985. The system was a TRS-80 IV (CPU was an 8080) that had been overclocked and had a megabyte of RAM stuffed in it. The RAM cost more than the computer. The application was a point-of-sale system for video stores and it used floppies for backup (a 10 meg HD for a "trash-80s was even more expensive than the additional RAM) The idea was that the user would fire up th machine in the morning, the system would load program files and data from 360K floppies to RAM disk. Several times during the day, the user would back up the data to the floppies and again after closing before shutting the system down. We sold about 30 systems like that.

    I told my boss that it was a very Bad Thing as the stores could lose data so easily. He told me several things:

    • Running entirely in RAM, the system was very very fast. When the system could smoke a more expensive IBM PC-XT running a dBase app, he could sell more systems
    • Every system would have a UPS as he refused to sell them without
    • He signed my paycheck, not the other way around
    As best I can figure, Darwin was more interested in awarding JATO assisted drag racers back then because we got lucky and actually had more trouble with the systems using hard drives. That was back during the heyday of the small mom-and-pop video stores. The last of those RAM disk based systems that I knew of converted to a "real" system in 1993. I believe they were assimilated by one of the national chains soon after.
    --

    You either believe in rational thought or you don't
    1. Re:Been there Done that got the T-shirt.... by Tablizer · · Score: 1

      Running entirely in RAM, the system was very very fast. When the system could smoke a more expensive IBM PC-XT running a dBase app, he could sell more systems

      I don't know about the cache level at that specific time, but later dBase-based tools used RAM caching. If your table was smaller than avialable RAM, it barely even touched disk.

      Further, it was trivial to periodically "naturally sort" your tables in order of the most frequent query groupings to speed them up by reducing disk hopping. If you knew your tools, then speed was usually not an issue. It almost sounds like you thru hardware at the problem instead of software. Plus, PC's outlived TRS-80's.

    2. Re:Been there Done that got the T-shirt.... by WinPimp2K · · Score: 1

      I never did learn dBase, skipped directly from CTREE to SQL so I can't address the fine points of tweaking dBase (the "queries" in this kind of application were all along the line of single record lookups). But back then dBase was interpeted, and our main competition was the system that someone's brother in law cobbled together to run a mom-and-pop video store.

      PC's did indeed outlive TRS-80's. I had actually been hired on to do a complete rewrite and port of the product from TRS-DOS and BASIC to the PC using "C". But first, I had to prove I could do the job by finishing up a few "loose ends" that the boss had promised to some customers. The original programmer's "documentation" was a paperback book from Radio Shack with wizards and rocket ships in the cover art. Once I got through that 2 month project, he found he could still sell the TRS-80s, so I was stuck with tweaking the darn thing for another year. (basically until sales stopped dead and the boss finally realized the horse he was sitting on smelled bad and attracted a lot of flies)

      Some good did come of it though. In that year I discovered QNX. Using a multiuser multitasking OS and ISAM system (CTREE) from the start (instead of some kludge on top of DOS) probably saved the company since I didn't lose time thrashing out network and multiuser issues. It also saved boatloads of money for our customers as we could hang cheap dumb terminals off even an XT. Of course, with a 286 running in protected mode we could hang as many as 10 terminals off a machine with 8 megs of RAM. In the mid to late 80s, PCs were expensive, and networked PCs were even more so. I never had to price networking software back then but I assume that Netware or MSFT LAN licenses were fairly pricey. We were able to sell multiuser systems for a very decent profit for quite a bit less than our networked competitors.

      --

      You either believe in rational thought or you don't
  34. Just wait for a crash .. by satsuke · · Score: 2, Informative

    Memory sounds like a good idea in theory .. but what about power failures or momentary blips .. UPS can help but not eliminate that risk.

    A recent hardware write up I read from HP / Compaq has ram partitioning / raid'ing on some of the higher end x86 servers .. with some options for active standby and hot replacement available.

    Another little burb was that with ram .. as the number of individual ram components increases the risk of a single bit non ecc correctable fault scales up accordingly .. such that with 8 gig + arrays the chance of uncorrectable error approches 50% per time interval

    I know memory can develop stuck bits without any warning .. several of the Sun Fire 6800 series machines I work with on a regular basis develop these kinds of errors occasionally .. though with Sun the hardware is smart enough to map around the error and make relevent OBP console & syslog entries.

    1. Re:Just wait for a crash .. by Fulcrum+of+Evil · · Score: 1

      Another little burb was that with ram .. as the number of individual ram components increases the risk of a single bit non ecc correctable fault scales up accordingly .. such that with 8 gig + arrays the chance of uncorrectable error approches 50% per time interval

      So what? Most high-end systems scrub the ram every so often, correcting ECC faults as they go. Hell, some of the Opteron chipsets do this (go AMD!).

      --
      "We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"
  35. Re:MySQL embarasses themselves again by Anonymous Coward · · Score: 0

    way to go the mod who uses mysql as the db for his homepage and thinks it can do it all, parent is +1, Informative

  36. Cost ratio? by Anonymous Coward · · Score: 1, Interesting

    A quick run of CDW.COM should answer your question. The cheapest 1GB SDRAM DIMM runs a little over $220, making a terabyte a little under a quarter million dollars. On the cheap end of SCSI hard drives, about 20GB can be had for about $120, making a terabyte RAID about $6,000.

    Since hard drive space is keeping pace in increasing size and decreasing price, while data storage requirements are shooting further through the stratosphere everytime a manager or executive utters the words "data warehouse," the most economical fail-safe solution will always win and a 27:1 cost ratio isn't going to convince anyone to switch. Cheap IDE & SCSI arrays will continue to dominate OLTP applications for the reasonably forseeable future until such time as that ratio is cut to 1:1, which will happen about the time probe storage atomic memory hits CompUSA.

  37. Praedictus by SubtleNuance · · Score: 1

    Ive used (Praedictus' (goofy name i know..)) database. resides totally in memory, used (in my case) to do Statistical Process Analysis in a manufacturing environment.... closed source.

  38. ACID? by ortholattice · · Score: 4, Interesting
    Maybe I read it wrong, but the interview seems to give the impression that Atomicity, Consistency, Isolation and Durability compliance is primarily concerned with keeping the disk in sync with memory.
    Q. Is it easier to maintain ACID principles with pure RAM?

    A. Yes. This makes ACID almost trivial.

    ...

    Q. Does writing the data to disk add some of the same problems of synchronization and ordering that led to the development of the ACID principles?

    Q. If you use the disk only for backups, then things are much easier than before. It's when you store data on disk that you are still manipulating on disk that you need the ACID principles.

    I'm confused. I actually haven't used MySQL much, and someone else can clarify its current ACID compliance. My application involves multiuser financial transactions. When making my DB selection a couple of years ago, at that time it was claimed that MySQL had some ACID deficiencies that made me nervous. I settled on PostgreSQL, which I'm very happy with.

    But there's a lot more to ACID than just keeping RAM and disk in sync, and I don't see how RAM would make ACID that much easier, and certainly not "almost trivial". You still have all the transactional semaphores, record locking, potential deadlocks, rollbacks, etc. to worry about. In fact I don't see why you wouldn't just have the RAM pretend to be a disk and be done with it, since the disk version already has stable software. Then, if it is important to increase performance further, RAM-specific code optimization could be done over time, but slowly and carefully.

    I'm sorry - I really don't want to get into a religious war here, but the interview didn't do much to bolster my confidence in MySQL for mission-critical financial stuff. Educate me.

    1. Re:ACID? by platypus · · Score: 1

      But there's a lot more to ACID than just keeping RAM and disk in sync, and I don't see how RAM would make ACID that much easier, and certainly not "almost trivial". You still have all the transactional semaphores, record locking, potential deadlocks, rollbacks, etc. to worry about.

      IMO there's one important argument which shows that this is complete bullshit, that is ....

      SWAP

      Yes, it shows that modern OSs do _not_ allow to second guess about the properties of an interface from what you think might be the implementation. I could add NUMA, transparent memory access throught the network etc..

      It feels like people using open() without checking the return value because "the file is always there, and writeable, and the disk is plenty enough".

    2. Re:ACID? by fupeg · · Score: 1

      If you use InnoDB tables in MySQL, you get full ACID transactions.

      We have an interesting database architecture. We had a database that would be read from all the time at a pretty heavy rate, and would be written to sporadically, but pretty heavily during those times. We decided to split things up. All the writes go to a MySQL db using InnoDB tables. All the reads are done from a cluster of machines (behind a load balancer) where each machine has a copy of the database but running in-memory using Heap tables. The only difficult part was the "update" mechanism for getting new data to the read-only machines. Luckily most of the data can be stale for several hours. The performance is outstanding and cheap!

    3. Re:ACID? by wilhelm9 · · Score: 1

      But if you allow stale data you don't have an ACID system. You will have little use of your "fine" InnoDB tables.

    4. Re:ACID? by dardem · · Score: 2, Informative

      Not sure why no one mentioned this yet, but the principals of ACIDity have nothing to do with how the database is stored (disk or ram). It governs the use of multiple transactions to ensure database consistency before and after committing transactions. Having the database in ram just means you also need separate space to record the transaction prior to commital. Without ACIDity, each operation in a transaction is committed before ensuring the entire transaction is correct/complete, which may cause locking, etc.

      Therefore, weather in ram or on a disk, the DBMS should work the same.

      --

      "Ceilean Súil an ní ná feiceann..."
    5. Re:ACID? by fupeg · · Score: 1

      You misunderstand the system. The db using InnoDB tables is the one being updated directly, so its data is never stale. This is the only place where we need ACID transactions and need up-to-date data, and we have both of those things. We use copies of this db, loaded into RAM for our webservers. That's a read-only environment that can be up to 24 hours out of date, but must be able very scalable and very fast.

  39. Can't believe there are so many nay sayers. by wezelboy · · Score: 1

    We have a highly specialized database (custom code) of the entire human genomic sequence (DNA and translated protein) resident in RAM and it totally works. It works better than anything else out there. The nay sayers can whine all they want about power failures and cosmic radiation, but from my perspective it WORKS. It works really well. Ask any genomics researcher out there where they do their human genome searches :-)

  40. Its called a flat file and mmap... by thogard · · Score: 2, Interesting

    If you've got enough ram for your database to fit in, why not mmap it and do a simple search? It tends to take up much less memory than a database and you can search a whole lot of records in the time it takes to do a context switch (which is what you get when you use a socket to talk to the database program).

    1. Re:Its called a flat file and mmap... by Pseudonym · · Score: 1

      Context switches are very cheap if you're using any processor but an x86. Even on an x86, if you need this kind of speed you'd be crazy to use a machine with only one processor.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    2. Re:Its called a flat file and mmap... by thogard · · Score: 1

      After a context switch, you don't run again till the scheduler gives you a new timeslot. Thats whats expensive.

  41. Yet more proof of MySQL's irrelevance by Anonymous Coward · · Score: 2, Funny
    "Gosh, I don't know why anyone would need a database bigger than ram"

    Here's a tip kids, when you stop playing around with the toy databases, give us a call and we'll show you why you still need hard drives.

  42. DIV by Spiked_Three · · Score: 3, Interesting

    Back in the early 90's IBM added a machine instruction to their mainframes called DIV. It treated data in a file system as if it where in virtual mememory - ie addressRecord[12345] appeared to the program as an in memory array, but was backed by disk storage - the same format that was used for paging virtual memory - brilliant. It's a shame it never caught on - it would make advances like this transparent in implementation. Well I guess you can't really say it never caught on - it was a big reason IBMs mainframe databases outperformed everyone else for so long.

    Is there a similiar kind of instruction on Intel? It's probably too late though - indexed arrays have become less useful since associative array patterns have become better defined. A hardware implementation (RAM) of JDO would be interesting.

    --
    slashdot troll = you make a compelling argument I do not like the implications of.
    1. Re:DIV by lokedhs · · Score: 2, Interesting

      We have this already. And have had for quite some time. It was invented with Multics, and Linux makes it available using the system call mmap(). Look it up, you might like it. :-)

    2. Re:DIV by rasilon · · Score: 1

      I suspect you may want to take a look at mmap, most *NIX variants seem to implement it using the virtual memory system.

  43. Best of both worlds by randomErr · · Score: 1

    Why not a use a ram based hard drive? The drive would have a battery backup and the speed of ram.

    Plus with new standards like fiber channel and varies SCSI you wouldn't lose much if any speed.

    --
    You say things that offend me and I can deal with it. Can you?
    1. Re:Best of both worlds by Queuetue · · Score: 1

      This would (and does) result in a speedup, but not the kind being talked about here. Instead of doing the same thing faster, as your suggestion would result, Monty is discussing doing things differently because there aren't two active copies of the data at all times. (No delay from copying and checking between the two.) RAM-only is at least twice as fast as ram-to-disk, even if your disks are as fast as the ram.

  44. Re:MySQL embarasses themselves again by Anonymous Coward · · Score: 0
    It's refreshing to see a person saying something intelligent among all the drivel from mysql-worshipping 14-year-olds.

    Hey! If it's good enough for Slashdot, I _HAS_ to be good. Right?

  45. read-only! by Anonymous Coward · · Score: 1, Insightful

    Yeah, RAM is good for read-only databases, but since MySQL has never been writing to disk properly and been inherently unsafe I don't find his answer that surprising.

    Real databases requires concistency!

  46. What Monty probably meant by cartman · · Score: 4, Interesting

    There are components of ACIDity that would be implmented very differently for RAM-persistent databases than for disk-persistent ones. Maintaining ACIDity on disk-persistent databases requires complicated algorithms to mitigate the disatrous disk seek times. These complicated algorithms would be rendered unnecessary if disks were no longer used.

    For example, disks have incredibly slow seek times and much better bandwidth; therefore it's far cheaper to write things to disk in big chunks. The purpose of write-ahead logging (or "redo logging") is to mitigate the performance impact of slow seek times by blasting all the transactions to disk at once, in the redo log, thereby avoiding the slow seeks that would be required by putting each transaction in its proper place. Putting the transaction data in its proper place is deferred until after the load has died down somewhat. This could be seen as exchanging seek times for bandwidth.

    This redo log mechanism would be unnecessary for ram-persistent databases. It's a significant source of complexity that would be obviated by the removal of disks. And that's just one example of complexity required to get adequate performance from disk, a medium that has disastrously slow seek times.

    1. Re:What Monty probably meant by Anonymous Coward · · Score: 0

      That is being done already by someone else. Prolly don't get as much press, but writing to disk in large chunks is being done by a DB vendor. They call it "Turbo Write Accelerator" - to write to disk in large chunks. Mitigates the disk I/O. Believe they use other techniques as well.

      Google search on Turbo Write Accelerator - same idea.

  47. New Sparc? by ajs · · Score: 1

    The new Sparc chip was supposed to have some nifty way of massively boosting RAM access times. Without that sort of advance, RAM-resident databases aren't much of a win over RAM-cached DBs (what everyone does now), sicne the win for fully resident DBs (which Oracle can do if you force it) is that you can lock huge sections of RAM for just the database, but that leads to the problem that for very large amounts of RAM the latency is starting to get too large.

    Hopefully this will be a solved problem soon.

  48. Yer education here ... by A+nonymous+Coward · · Score: 2, Interesting

    the interview didn't do much to bolster my confidence in MySQL for mission-critical financial stuff. Educate me.

    Cancel that financial adjective. You're thinking too narrowly.

  49. Replication of a database by jhines · · Score: 1

    The ability to replicate a database, in real time, onto a slower system, would seem to be a key item.

    As long as the DB is replicated onto a slower HD based DB. This would have other advantages, IE duplicating a DB to a remote site for disaster recover purposes.

  50. Thjs is called "in-memory database"! by tungwaiyip · · Score: 1

    Search google for many products available. One product we looked at is from TimesTen. It was very expensive!

    The primary reason people use it is because of performance. They are situation where data update and access time is very important but the data is small enough to fit in memory and persistence is less important. One example is for keeping real time system status.

  51. What's at stake by cartman · · Score: 1

    At present, the principal performance bottleneck of a relational database is disk seek time. Since disks have disastrous seek times, database servers often have an incredible number of disks (hundreds or more), in order to have those disks seeking in parallel, thereby mitigating disastrous seek times of individual disks.

    These hundreds of disks often have very little on them. The purpose of having lots of disks isn't for more storage, but for more drive heads, because lots of heads can be seeking in parallel.
    Oftentimes, OLTP databases aren't even that large, and most of the space on the disks is unused.

    RAM has a seek time (latency) that is about 1/10,000th that of disk. Since latency is the primary bottleneck, this could vastly improve the speed of databases. And database servers could become cheaper, since all those unnecessary (and unfilled) disks, used just for parallel disk seeks, could be thrown away.

    The difficulty with RAM is that it loses its data after you turn off the power. This is the reason disks are still used for databases. Losing any data because of power loss would not be acceptable to any financial institution. Battery backups etc would never be deemed sufficient.

    The moment we have RAM that retains data despite power loss, disks will no longer be used in database servers. This will be true even if such RAM is vastly more expensive than the disks they replace, because the RAM would be 10,000x as fast and so would render unneccessary the huge number of "redundant" disks kept around simply so data can be read in parallel from multiple disks.

    "Flash RAM" and other current nonvolatile memory technologies will not suffice, for several reasons. First, they can only be written a limited number of times before failure. Second, their write speeds are very low, and OLTP databases are write-intensive.

    1. Re:What's at stake by Beliskner · · Score: 2, Interesting
      The difficulty with RAM is that it loses its data after you turn off the power.
      Why does everyone think this? If your Motherboard cracks in mid-transaction you will lose transactions. Five Lithium batteries (simple mechanics, every watch uses them, rarely fail) connected through diodes in parallel and going through a voltage regulator chip for RAM provides a much more reliable persistant storage than hard disk.
      --
      A caveman dreams of being us, the incalculable power and riches. We dream of being Q, then what?
    2. Re:What's at stake by Second_Derivative · · Score: 2, Informative

      Rarely? When you work in a bank, "Rarely" is a 100 billion dollar word. You don't want that sort of damocles hanging over you. When one disk fails, generally the other disks don't. If you've got 100 copies of your stock exchange, you're not going to cry if you've only got 99. The problem is that when power fails, every single copy of your data dies.

      Then again, bank dataservers are presumably distributed clusters, and taking out all of them at once is pretty damn hard. Guaranteeing power isn't all that hard -- like you said, have some batteries in a UPS type arrangement; enough to keep your entire cluster running for a minute or two while your diesel generator starts spinning. Have several UPSes, several diesel generators, and a very strict schedule for testing and replacing batteries and you should have a system that can survive anything a hard disk can.

      Just don't use the word "rarely" when you're telling the CEO about something that's going to handle more money than some nation states have.

    3. Re:What's at stake by lpontiac · · Score: 1
      If your Motherboard cracks in mid-transaction you will lose transactions.

      No you won't. There's a difference between a transaction not happening, and a transaction being lost - a lost transaction is one that happened, and application and the user think it happened, but in fact the data was never stored. That's the difference between depositing $100 and it never appears in your bank account, and turning up to the bank with $100 but walking away because the bank was closed.

      If a database does proper ACID transactions, then the application accessing the database will not receive confirmation of the transaction until it's fully done and committed to disk. And if the database dies midtransaction, it'll be as though the transaction never even started.

    4. Re:What's at stake by Beliskner · · Score: 1
      No you won't. There's a difference between a transaction not happening, and a transaction being lost
      I am aware of the difference of losing a COMMITed transaction. The RDBMS will return COMMITed when fsync() returns from the transaction log write and/or distributed propogation. I assume RAID-5 array dual HD failure because upon single HD failure it takes 5 minutes to get to the server room, 10 minutes to unpackage a replacement HD, 10 minutes for making sure NOT to pull out the wrong hard disk, 2 minutes for hot-swapping, and 1 hour for RAID-5 data reconstruction. During RAID-5 data reconstruction the strain on the remaining HDs is so massive with constant seeks that their temperature increases to 85 Celsius during data regeneration from RAID-ECC. My failure calculations assume immediate HD failure of all disks above 75 Celsius and therefore all our data will always be destroyed as no RAID array in any configuration can survive simultaneous failure of all hard disks.

      RAID controllers must be redesigned to minimise the load on the surviving RAID HDs during reconstruction.

      --
      A caveman dreams of being us, the incalculable power and riches. We dream of being Q, then what?
  52. Google does that already by semanticgap · · Score: 3, Interesting

    I believe it surfaced a while back on /. - can't find any links at the moment, but AFAIK the entire Google index is stored in RAM.

  53. Recoverable RAM disks on Amiga by Anonymous Coward · · Score: 1, Interesting

    I fondly remember learning to program in C with a recoverable RAM disk on the Amiga. I was able to copy most of my source, headers, libs and even the compiler into VD0: and do everything from RAM. Reset the computer due to a crash and most of the time the RAM disk was intact. I'm sure that quick cycle helped me to learn C faster.

  54. TimesTen cost? by Anonymous Coward · · Score: 0

    How much does TimesTen cost?
    The price is not listed.

  55. I'd much rather see replication and clustering by ikekrull · · Score: 2, Insightful

    Running the DB from RAM is nice, but as far as I can see this won;t require any changes to the software itself, you could just mount your DB on a RAMdisk and be done with it. Whats the big deal?

    What MySQL and PostgreSQL really lack is the ability to replicate on-the-fly and to support running on clusters for *real* failover and fault tolerance.

    For Postgres, this means multiple 'postmaster' processes being able to access the same database concurrently, and probably something similar for MySQL.

    Being able to run a database on an OpenMOSIX cluster, for example, would make it massively scalable, and being able to run multiple independent machines with an existing HA (High Availability) monitoring system would provide a truly fault-tolerant database.

    There are of course major technical difficulties involved in making databases work this way, but an Open Source DB that can compete with Oracle's 'Unbreakable' claims would be a huge shot in the arm for OSS in the business world.

    --
    I gots ta ding a ding dang my dang a long ling long
    1. Re:I'd much rather see replication and clustering by axxackall · · Score: 1
      What MySQL and PostgreSQL really lack is the ability to replicate on-the-fly and to support running on clusters for *real* failover and fault tolerance.

      You certainly don't know PostgreSQL, at least its enterprise level. Check with both PostgreSQL Inc and Lanux. They both will be happy to sell you (yes, the eneterprise level is not free, which is a Good Ting (TM) even for open source projects) ERserver, PostgreSQL replicated for enterprises, and High Availability Solution. Last time I've check with them they achieved 0.5 seconds of failover. Is it "real" for you?

      --

      Less is more !
    2. Re:I'd much rather see replication and clustering by Anonymous Coward · · Score: 0

      Hi. MySQL and PostgreSQL support replication and clustering. OpenMOSIX is NOT what you want, because it is not a single system image clustering solution. What you're looking for is the OpenSSI project (http://www.openssi.org), which does support cluster-wide semaphores, etc.

      Next time you may want to actually read the documentation before sounding like an ass. (and the /. moderators should look before modding an idiot up.)

  56. What a coincidence! by coopaq · · Score: 1
    I am contemplating a RAM only /. message board
    and it will become like the king of message boards.

    Bwahahah Bwahahah!

  57. why mysql it sucks! by trowlFAZ · · Score: 0, Troll

    So why would anyone use MySQL when there is Postgres? Postgres is such a far superior product. I am so confused by such actions.

  58. Power failures anyone? by rebelcool · · Score: 1
    I thought one of the key points of ACIDity was to maintain data integrity in the event of catastrophic system failure (ie, power goes out)?

    With a dynamic RAM system (DRAM also isn't all that reliable...SRAM is better, and SRAM is very expensive) you are highly vulnerable to this.

    I suppose you could implement a kind of write-back system to the disk where you pile up things in some kind of buffer, but under heavy load, you're going to overwhelm it. Or at the very least cause the thrashing that this supposedly helps avoid.

    Really though, at that point, you're just using the RAM as a cache. While this sounds all nice and fanciful, it doesn't sound to me like he's thought it all the way through. Perhaps some people who know more about database design can point out any simple mistakes ive made...

    --

    -

  59. write-back scheme. but what about heavy load? by rebelcool · · Score: 1

    I posted something else along the lines of this, but how would you do it under heavy load? The disk is so enormously slow compared to RAM, you'd overwhelm whatever buffer you're using to do the write-back. You'd have to throttle back requests on the RAM, thus negating the performance increases.

    --

    -

    1. Re:write-back scheme. but what about heavy load? by gilesjuk · · Score: 1

      RAID? clustering? I'm no expert unfortunately. I guess you would schedule such operations to occur in the early hours.

  60. read the article! by Anonymous Coward · · Score: 0

    depends on the application and the definition of reasonable. if you're trying to store your 37,000 images of p0rn, well ya, RAM based won't work. But if you're dealing with primarily text information in a well designed database you would be suprised how small it can be.

    1. Re:read the article! by Anonymous Coward · · Score: 0

      Mabye for your crappy php bulliten board system. Try working with a real database, kid.

  61. MYSQL R00LZ!!1!�!11!!1!! by Anonymous Coward · · Score: 0

    If you disagree, you can suck my 14 year old MySQL powered cock!

  62. DBD::RAM by suntse · · Score: 3, Informative

    Any Perl programmers in the audience may wish to check out DBD::RAM. From the CPAN documentation: "DBD::RAM allows you to import almost any type of Perl data structure into an in-memory table and then use DBI and SQL to access and modify it. It also allows direct access to almost any kind of file, supporting SQL manipulation of the file without converting the file out of its native format." More information here

  63. Non volatility and so forth by panurge · · Score: 4, Insightful
    To a certain extent this is a dupe of any previous article about emulating hard disk drives in RAM. Perhaps it is worth making a few points.

    First, as other have said, a properly designed RAM subsystem can be battery backed up. In terms of getting the data out, loss of power to the RAM is no more catastrophic than loss of power to the CPU, the router, the computer running the middleware, or whatever. Because RAM is a purely semiconductor approach, any battery backup system can be simple and reliable.

    In fact, it should not be too difficult to design a system which, in the event of power fail, dumps data to backup disk drives. To get to that state, the main system has already failed to do a clean shutdown, so this is a last resort issue.

    The next thing is error detection and correction. It's true that single bit ECC is limited, but it also takes only limited resources (7 additional bits for a 32-bit subsystem, 8 for 64). Memory subsystems could have extra columns so that if bit errors start to multiply in one column, it can be switched out for a new one. Just as with any error detection and correction strategy, single bit detection in columns can be combined with further error correction down rows, using dedicated hardware to encode and decode on the fly. Just good old basic electronics.

    In the worst case, it should be possible to build an extremely reliable memory system for a bit penalty of 50% - no worse than mirroring two hard drives. It won't be quite as fast as writing direct to motherboard RAM, but we don't want to do that anyway (we want to be able to break the link on power fail, save to disk, then later on restore from disk. And we want the subsystem in its own cabinet along with the batteries. No one in their right minds is suggesting having a couple of C cells taped to this thing and held on with croc clips.)

    I'd even venture to suggest that most MySQL databases are not in the terabyte range, and that most databases aren't in the gigabyte range even if they are mission critical in SMEs.

    Conclusion? As usual we have the people trying to boast "My database is far too big and complicated for MySQL! So MySQL sucks! My database is too (etc.) to run in RAM! So running DBs from RAM sucks!" and ignoring the fact that there are many web databases where transactional integrity is not an issue, and the market for a RAM store for databases in the low Gbyte range might actually be rather substantial.

    --
    Panurge has posted for the last time. Thanks for the positive moderations.
  64. Needed: much more reliable disks by Animats · · Score: 5, Interesting
    We may be moving to an era where disks are primarily an archival medium. Unfortunately, disk manufacturers are moving to an era where disks are less reliable and have shorter warranties. There's a problem here.

    We need archival storage devices that won't lose data unless physically destroyed. We don't have them. Tapes don't hold enough data any more. Disk drives don't have enough shelf life.

    DVD-sized optical media in caddies for protection, maybe.

    (It's annoying that CDs and DVDs went caddyless. Early CDs drives use caddies to protect the CDs, but for some idiotic reason, the caddies cost about $12 each. We should have had CDs and DVDs in caddies, with the caddy also being the storage box and the retail packaging for prerecorded media. There's no reason caddies have to be expensive. 3.5" floppies, after all, are in caddies.)

    1. Re:Needed: much more reliable disks by Anonymous Coward · · Score: 0

      Like MiniDisc?

  65. Re:MySQL embarasses themselves again by B3ryllium · · Score: 4, Interesting

    Valid points, of course :) But you have to admit that for simple home pages (and not corporate databases) MySQL is simple, to-the-point, and easy to use. And free, although many other ones are free as well. (I wouldn't want to run Oracle@Home ... of course, postgreSQL is also free, and I hear it's more mainstream as far as true database functionality.) "Careful" people can enforce their own data integrity - obviously, it gets harder as the size (number and complexity of tables, I mean) of the database expands. Can you tell I use it myself? :) You sound like you have experience with other database systems, how difficult do you think it would be to port an existing MySQL+PHP system to PostGreSQL or something similar?

  66. Funny stuff by Anonymous Coward · · Score: 0

    keep up the good work!

  67. TimesTen by Anonymous Coward · · Score: 1, Interesting

    Lucent had an in-memory database that they used a couple of years ago--it was called DataBlitz.
    They offered me a job (I was also talking with the folks at TimesTen).

    Main memory databases are great for a couple of tasks

    1) Native hardware
    2) Serving up static data accessed through a relational model
    3) Being a front end for a (standard) relational databse
    4) Being a nice programmatic way of defining data structures in your own application. (Wouldn't it be nice to be able to have tables and joins as 'regular' data structures in a C++ program?)

    The internal technology is quite different--the bottleneck usually is CPU rather than disk related, even though most of the CPU instructions that deal with minimizing disk usage have been removed.

    The field is really exciting, and I can't wait until the prices of the products come down enough so that I can just go otu and buy it.

  68. He just doesn't realize that... by Insurgent2 · · Score: 2, Informative

    ...But such a condition (DB in RAM) will make his product pretty much obsolete.
    The Prevayler Project is a RAM-only Java persistence project that works and is so simple not a single bug has been found in the production release.
    3000 times faster that MySQL (9000 times faster than Oracle) even with the database in caches entirely in RAM simply because of the JDBC overhead that is eliminated .
    The only sticking points I've seen are:
    1. Normal PC's boards generally will only take 1GB of RAM. Sure there are thos expensive Sun machines...
    2. Querying objects in an efficient manner.
    3. Others, but I've gotta take a dump real bad...

  69. Prevayler already does this by Anonymous Coward · · Score: 1, Informative

    Prevayler already does this. It's written in Java.

    1. Re:Prevayler already does this by thorrbjorn · · Score: 1

      Yup, and with some of the most elegantly simple code I've ever seen.

  70. Yes, but... by Tokerat · · Score: 1

    From experience, I'd wager that RAM failure rates are less than hard drive failure rates, so it might also mean more stability from that perspective.
    Yes, but power failure rates are still up there, let's hope even being RAM based it's going to save periodic snapshots to disk. And no, I didn't RTFA because i need to take a huge dump too
    --
    CAn'T CompreHend SARcaSm?
  71. "Sounds like"? by boer · · Score: 1

    Pardon me, but I have lived under assumption that hard drives are indeed a hack to solve the problem of high RAM memory prices and their volatility. If RAM would have been cheap and non volatile from the beginning, it's not like hard drives would have been so widely spread by default. It's the same with main memory and cache memory. Why would anyone use slow main memory if fast cache-type memory would be as cheap?

    --
    (This sig intentionally left blank)
  72. The Thing, Mister Fantastic... by adharma · · Score: 1

    Cosmic Radiation? Isn't that how the Fantastic Four got started? I've just named my four Dimm modules Ben, Susan, Reed and Johnny. I can't wait to see my RAM's new super powers.... What DB wouldn't benefit from setting itself on fire at will? Yeah, baby...

    --
    What word rhymes with buried alive?
  73. RAM Reliability by Detritus · · Score: 1

    High-end systems, from IBM and other vendors, are capable of transparently dealing with RAM failures. They can detect and correct errors, even if caused by the total failure of a DRAM chip. They include built-in spare DRAM chips that can be electronically swapped for bad chips. The memory boards can be swapped out when it is convenient for the customer.

    --
    Mea navis aericumbens anguillis abundat
  74. Ten Times Faster by Sir_Dill · · Score: 2, Informative

    Several companies are already doing this. As one poster stated before, Lucent is doing this, however the leader in this type of RDBMS is a company called TimesTen. http://www.timesten.com/ It was originally part of HP and it was spun off into its own company. Its a rather brilliant product. It only uses the disks for logging and disaster recovery. The unfortunate thing about the whole deal is the volatility of the ram and the fact that it is still cheaper to have 1TB of disk space for a huge database then it is to have half as much ram.

    1. Re:Ten Times Faster by Anonymous Coward · · Score: 1, Interesting

      TimesTen is incredibly expensive for what you get when you consider their SQL support is very weak in many areas (for example, nested queries).
      Also, it's notable that TimesTen no longer advertises themselves as an in-memory database. They now claim to be a "Real Time Event Processing" system. Perhaps this is a hint that RAM databases are not as appealing in a marketplace flooded with cheap disk drives.

  75. well that won't work. by rebelcool · · Score: 1

    and if your power outage or other complete system failure occurs before the disk operations are complete?

    --

    -

    1. Re:well that won't work. by gilesjuk · · Score: 1

      Most organisations have something in place for power failures, the disk write would occur immediately when this occurs. As for other system failure, you're likely to lose or corrupt data in these instances anyway. Like I said, i'm no expert :)

    2. Re:well that won't work. by Anonymous Coward · · Score: 0

      I think the problem he's trying to get at is that if you have 50,000 transactions backed up in a buffer when the power goes it could take quite some time to run them all out to disk. Thus your UPS would need to be able to keep power going for a fair lenght of time. Not impossible but certainly something to consider.

  76. inaccuracies... by Kunta+Kinte · · Score: 1, Troll
    Well, a professional database like Oracle manages its own cache, but MySQL really only relies only on the OS-level cache.

    That is plain not true. MySQL does have it's own query caching. Even the most entry level databases have that.

    The problem with that approach is that the database knows a lot more about what you're doing, so it can make much smarter decisions about what to cache, what to age out, what to prefetch, etc.

    You're right. Accept MySQL does have query caching.

    Further, if he is thinking in terms of a few Gb of data, then he is a little out of touch with modern database usage.

    I like to call this number "software snobbery". Many people compare software applications feature for feature, paying no attention to what their requirements are. The fact is, a very large percent of the database market not need more than a single GB database for their current task. Why have a bunch of databases around our organization that are all a few megabytes large. For the large databases ( ERP ) we use Oracle. The fact is our MySQL deploys outnumber the Oracle deployments, and over time as MySQL and Postressql get better I'm expecting that MySQL will creep into Oracle space as well.

    --
    Based on upvotes, Ageism is the only "-ism" Slashdotters care about and think isn't SJW
    1. Re:inaccuracies... by sql*kitten · · Score: 2, Insightful

      I like to call this number "software snobbery". Many people compare software applications feature for feature, paying no attention to what their requirements are. The fact is, a very large percent of the database market not need more than a single GB database for their current task.

      Well, Monty started it by talking about SouthWest's booking system. Airlines are among the heaviest IT users in the world. If you want to drop names, be prepared to be called on your assertions by someone who does know. Someone asked me what a typical DB was in finance; I posted links to case studies on a couple of multi-terabyte databases. Also, SouthWest are an Oracle site, so they aren't even using MySQL for their seat reservations, so I don't know what Monty was talking about.

      The fact is our MySQL deploys outnumber the Oracle deployments, and over time as MySQL and Postressql get better I'm expecting that MySQL will creep into Oracle space as well.

      You assume that Oracle is a static target. It is not. PostgreSQL is a perfectly adequate database for small tasks; its SQL parser and core transaction processing is infinitely superior to MySQL. But both of them are beaten hands down by open source databases like SAP/DB and Borland Interbase (or Firebird, whatever it's called these days). I'd happily use either of those with databases of a few hundred M or even a few G.

      Now, if open source advocates talked about those two when they talked database, I'd show some respect. But the constant worship of MySQL just shows that they don't know.

    2. Re:inaccuracies... by Anonymous Coward · · Score: 0

      Well, Monty started it by talking about SouthWest's booking system.

      If you knew how to read critically, you'd realize that the interviewer brought up SouthWest, not Monty.

      But both of them are beaten hands down by open source databases like SAP/DB and Borland Interbase

      You have benchmarks to back that up? Didn't think so.

      Dipshit.

    3. Re:inaccuracies... by Ars-Fartsica · · Score: 1
      You assume that Oracle is a static target. It is not.

      No, they will just keep adding crap that fewer customers get a tangible benefit from just to stay ahead of free and commercial competitors on the feature list.

      The world is full of throw-away databases run by people with no budget to speak of. Many of the businesses you speak of wouldn't consider running MySQL now, but then again, many of them probably would have said the same thing about Windows ten years ago. Check their server rooms now - probably full of Windows boxes. Wait ten years to see what MySQL does. Oracle will end up like Sun - catering to a tiny and rapidly shrinking sliver of a high end.

  77. Couple of data points by Anonymous Coward · · Score: 0

    Due to contractual obligations, I can't name names. So, keep that in mind.

    One client, an NYC financial house, has a distributed database with ~40TB in it at any given time, and certain activities temporarily (couple of days) occupy another 2-5TB. (Oracle)

    A former full-time employer of mine, a dot.com that still exists in a much smaller (10% of peak number of employees) form, has about 1.5TB under database management. (Oracle + mysql + Redbrick + other proprietary)

    A tiny, 3 person firm of consultants (me and my partners) have about 80GB of data. (Postgres)

    Take that for what you will.

  78. Not the first time, to be sure. by Bakaneko · · Score: 1

    A place I worked at a few years (about 5-6 I guess) ago kept their databases on VMS systems completely in RAM... It was a couple terabytes at the time I think, and took up a good section of the data center floor...

    And when you talk about RAM failure rates, though, you have to take into account power failure, power supply failure, and wiring glitches, which of course, they did there. Redundant UPSes of redundant UPSses, and the largest generator I'd ever seen, and ever did see afterwards, (even at much larger installations)...

  79. Prevalence by linear_chaos · · Score: 2, Insightful

    With everything in RAM, why not create true object servers, rather than distorting and maiming our object models by breaking encapsulation & imposing database layout restrictions?

    http://www.prevayler.org

  80. Re:Database Prgorammers?? by ElectronF · · Score: 1

    He says that database programmers are forced to be very careful about the consistency of their data

    I think you will find that by 'database programmers', he means the developers that are responsible for actually coding the database engine, not developers responsible for writing applicaitons using the engine..at least that was my take on it. I must admit I read that sentence a couple of times as well.

  81. Re:Database Prgorammers?? by Anonymous Coward · · Score: 0

    I read it and read it again, and I still feel you are drawing the conclusion that you want to not based on what the sentence is saying. In particular, "consistency of their data." What is "their data" in the context of someone who programs a database management system?

  82. Why a Database even? by Xtro · · Score: 1

    Prevayler is a system where your java objects persist as objects in RAM. No need for a database at all, retains the goodness of OO design.

    Their bold claim: "Queries with Prevayler are more than 3000 times faster than querying MySQL through JDBC."

    You manipulate them via serialised commands which are logged and you take a snapshot every day or so. If there's an accident, you reload the last snapshot and replay the command log until you catch up and then you're off again.

    --
    Cheers
  83. This is old news ... by Anonymous Coward · · Score: 0

    Large financial houses have had these type databases for many years already. Most were developed in-house and the public never saw them. Now-a-days there are a few companies in the buissness and by far the best is TimesTen. I've had extensive experience with them and there product is fantastic for many application. These are by far the future of databases and I do belive that sybase, oracle etc will turn into backup systems for most applications that need any form of speed.

  84. Ram DBs can be faster by godofredo · · Score: 3, Informative

    Modern storage solutions (like EMC) use redundant battery backed ram to buffer writes, greatly reducing perceived write latency. This gives you a lot of the performance gain of a ram only database, and also scales very well to large loads. (in fact, when choosing RAID stripe size you take into account whether writes are buffered; if not, keep stripes small for log files)

    If you know that your data will always fit into available ram then there are a number of performance optimizations that can be done. I'm not sure about ACID becoming "trivial"; You still need most of the same db components: indexes, lock managers, operation journaling, etc. But many of these could be greatly simplified:

    1. Page/Buffer Manager Eliminated. Since no disk IO will be required for the normal running of the db, there will be no need for a page manager. This eliminates complexity such as block prefetch and marking and replacement strategies. In fact, the data will probably not be stored on pages at all. Details such as block checksum, flip flop, log position, page latches etc can all be removed. The values in the rows would be sitting in memory in native language formats rather than packed making retrieval much faster. There would be no need for block chaining.

    2. More flexible indexing. Since it is not necessary to store data in pages, traditional B-Trees are not absolutely required. Other index structures like AVL trees would be faster and might allow better concurrency. These trees would also be easier to keep balanced ...most databases don't cleanup indexes after deletes, forcing periodic rebuilding. Other index schemes not generally considered because of poor locality prinicles could be considered. Note that Hash Indexes would probably still use Linear Hashing.

    3. Lock Manager Simplified. Row level locking (and MVC) are still desired features, but keeping the locks all in memory simplifies implementation. Oracle and InnoDB store lock information in the blocks (associated with transaction) to allow update transactions larger than memory.

    4. Log manager simplified. You will still need journaling capability for rollback, replication, recovery from backup etc. But the implementation of the log need not be traditional. Any structure that maintains information about transactions and contains causal ordering will do. Techniques such as keeping old versions of rows adjacted to current versions that are unacceptable for disk based databases (ahem, Postgres) could be used.

    Although these may seem like small things, they can add up: less code to run is faster code. A company called TimesTen offered a product that they claimed was 10x faster than Oracle using an all memory DB. Generally the corporate world doesn't care to split hairs. They want something that works, and they are willing to throw some money and iron at it. Thats why battery backed ram in the disk controller to buffer writes is probably going to be fine for now.

    A last note: modern databases already know to not bother with indexes when a table is sufficiently small.

    JJ

  85. "before long"? Already there. by devphil · · Score: 1


    Speaking of Lucent/Bell Labs...

    it sounds like hard drives may be nothing but backups before long.

    This is one of the integral design choices in Plan 9. RAM is considered nothing more than a cache for the hard drives, and the hard drives are considered nothing more than a cache for the gigantic WORM drive backups (which happen nightly, and are made available as part of the normal "filesystem".

    --
    You cannot apply a technological solution to a sociological problem. (Edwards' Law)
  86. Dumb and dumber by Anonymous Coward · · Score: 0

    Gee... Gee... Nome? Nay? Sayers? Sooth?

  87. kinda like saying scripts are for kids by Anonymous Coward · · Score: 0

    Not everyone needs Ora$le to do his, and especially her, database needs. I don't need it, and don't want it. I have what I need and it's a LOT faster and cleaner than any query language from the 70s designed for mid-level managers to use -- sysr that.

  88. Welcome to Blinn's Law... by Pseudonym · · Score: 1

    Blinn's Law is what those in the graphics industry know as the counterpoint to Moore's Law. It states, in its original form: The amount of time it takes to render a frame is constant over time.

    The point is that computers are getting faster, but we're also asking them to do a lot more, and these effects cancel each other out. Consider, for example, how long it takes your word processor to load. It's probably the same amount of time that it took 15 years ago.

    So how long until RAM-only databases are practical? For some databases, right now. The database which sits behind your typical weblog, for example, could probably work today. For your typical enterprise application, it will never happen, because what is "typical" is a constantly moving target.

    --
    sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
  89. google: "in memory database toolkit" by Anonymous Coward · · Score: 0

    Google "in memory database toolkit"

  90. MySQL Creator Contemplates by Vaughn+Anderson · · Score: 1
    MySQL Creator Contemplates RAM-only Databases

    Hmmmmm,

    Ahhh,

    Yes, indeed, certainly a pleasent thought.

    *sigh*

  91. Re:MySQL/PHP porting by bobbozzo · · Score: 1
    how difficult do you think it would be to port an existing MySQL+PHP system to PostGreSQL or something similar?

    Not too bad, probably.

    Unfortunately, AFAIK PHP doesn't have something like Perl's DBI, so you have to re-write all your db function calls, etc, instead of just changing the connection string and type like you would in Perl/DBI.

    Of course, it may be (slightly) more efficient without the DBI type interface, but it'd still be nice if PHP gave you the choice.

    --
    Nothing to see here; Move along.
  92. Re:MySQL/PHP porting by B3ryllium · · Score: 1

    Well, in theory, all of my DB function calls are passed through a single function, anyway. (I like to write easy-to-modify code ;-)

    Would the SQL be identical? I don't do anything too stressful, not too many cross-table selects or anything.

  93. OK for embedded by Anonymous Coward · · Score: 0

    all the above comments, youse guyse are arguing about whether this would be suitable for large enterprise DB systems...

    wrong! there is a definite need for RAM resident DB in embedded systems. from handhelds to core routers with 200k-entry BGP tables...

    berkeley DB and a few others are already there, mr MySQL is on the right track. but for the wrong reason; he doesn't understand this market yet. not surprising, no one else does either.

  94. Re:MySQL/PHP porting by bobbozzo · · Score: 1
    Would the SQL be identical?

    Should be (as long as you stick to standard SQL); it's just all the functions are quite different (e.g. pg_connect vs mysql_connect, etc.), and the parameters may be different.

    --
    Nothing to see here; Move along.
  95. Makes the new AMD Opteron comp look like a bargain by Anonymous Coward · · Score: 0

    A 16GB superssd drive plus fibre channel switch and card costs a great deal of money.

    This is definately NOT for a small company...on the other hand, an 8GB database would fit very nicely in RAM on a 64Bit computer, and the Opterons will be a decent price when compared to Sun and IBM.

  96. Re:MySQL/PHP porting by B3ryllium · · Score: 1

    Do you know if there is an equivalent to the mysql_fetch_object function? It rocks. :)

    Oh, wait, php.net rocks - pg_fetch_object. Kickass. I might have to try it one day :)

  97. Re:Makes the new AMD Opteron comp look like a barg by Beliskner · · Score: 1
    on the other hand, an 8GB database would fit very nicely in RAM on a 64Bit computer
    Are you out of your mind? All the professionals deal with huge databases on Oracle, and Solid State Disk offers fast storage. People dealing with 8GB databases will be Windowze users and will look at their automatic gear-shift in their car puppy-eyed when you tell them that they lost data in their RAM database because they didn't BACK IT UP!

    The very idea of click-click-doubleclick MCSEs giving every Mom and Pop shop a RAM database is scary as hell, lots of businesses will go bankrupt when slack-jawed yokel says, "Why y'all I can here ye speed up all ye databases y'all YEE HA, lookey here it's a called a RAYME-data-er-base YEEEEHA!"

    --
    A caveman dreams of being us, the incalculable power and riches. We dream of being Q, then what?
  98. Ram and platters in a harddisk by DeBaas · · Score: 1

    If Ram cost are going down so quickly, I think it might be a good idea to get special harddrives: half Ram, half old fashioned platters. Let the harddisk use the RAM for all the read and write actions, and implement that all write actions are replicated to the old fashion platters.

    For someone using these, it works just like harddisk (no changes, settings etc. in software neccesary). But you do get the extra speed.

    For very reliable disks, it might be interesting to add some build in some kind of battery to make sure that at a powerfailure the last write actions can be sent to disk as well.

    --
    ---
  99. YOU FAIL IT! by YOU+FAIL+IT! · · Score: 0
    How now brown cow? Failure?

    YOU FAIL IT!

  100. RAM Reliability by Tech · · Score: 1

    I'd wager that RAM failure rates are less than hard drive failure rates

    While this may be true now, I'm concerned about the reliability of RAM in years to come. Noting how reliability is on the decline in almost every other category of hardware, what makes RAM so special that it should defy the trend? I refer for example to hard disks, now warrantied to only a year; 3.5" disks, where the term "certified 100% error free" seems only to refer to the spelling on the box; monitors that are outlived by those twice their age.

  101. Re:MySQL/PHP porting by Bernie+Fsckinner · · Score: 0

    ADODB is a library which lets you avoid rewriting db function calls to switch databases.