So, I was thinking about this batshite solution I encountered a few years ago. An industrial fab facility had a SAP server, big honking beast of a machine, 256 GB of RAM, and this was 2019, so yeah, money was spent.

But the database (mysql) was ostensibly, too slow. Their SAP consultants solution?

On boot, the system would take 128 GB of RAM, and create a ramdisk mounted on /mysql. It would then copy /var/lib/mysql, or wherever MySQL was stored into /mysql, and start the mysqld with flags to use the ramdisk.

Yes, this was absolutely insane, and tremendously fragile. But I digress. Every night at 0300, the mysqld was shutdown, and /mysql was rsynced to permanent storage. So, if they lost power in the middle of the day they lost potentially hours of work that had to be manually re-entered.

The punchline to this joke is that backing up the ramdisk to disk took about 40-45 minutes. The UPS backing this server had about half that in runtime. So, it never did anything even remotely useful. In fact, it sometimes lead to some terrible corruptions that had to be painstakingly repaired. Yes, they did have a script that was triggered by the UPS going on battery. It never finished on time.

Anyways...... My brain was thinking about this, and decided..... CAN WE MAKE THIS WORK?!?!?!?!!111???/one?!//111

I think we can, but I would like to state that this is insane, and probably _really_ expensive for fairly little gain.

But hear me out. System boots from a single disk ZFS stripe, creates a RAMDISK and adds it to the zpool as a mirror. Obviously, this would only work for smaller disks or shitloads of RAM, and really only benefits read performance.

Would I do this? Probably only to see if I could make it work, I doubt it is actually a useful solution. But, it popped into my head just now, and I had to get it out, just so my brain would stop thinking about it.

Thoughts?

RAM disks are great! Amiga Workbench shipped with one by default in an era where floppy disks were still the norm. IMHO, that was the apogee of personal computing and if you didn't enjoy it when it was fresh, you missed out. It doesn't look the same through a retro lens.

Throwing a zpool into a RAM disk? I mean, I dunno, maybe it would work? You can try I guess.

Those consultants spending gobs of money on 256GB of RAM (though in 2019, I don't think it was that insanely expensive? I knew of folks operating with terabytes of RAM years earlier than that, and in 2020 someone was trying to get me to work at some SAP related gig where they had 40TB of RAM on some system, but their friggin job application couldn't handle UTF-8 and that just seemed like bad news.) not spending a comparatively small amount on a sufficient UPS though? What a nightmare.

Albeit, I'm spoiled, circa 2002-2006 my employer had an entire building-wide UPS, with a 600kw diesel generator on automatic (and it would do a self test once a week! Sure beat the sorts of situations I dealt with at earlier employers) oh yeah, and we were adjacent to a hospital (during a crisis, hospitals are the last to lose grid power and the first to have it restored). So, I have experienced good power designs, and they're a far cry from what you described.

@teajaygrey So, as for 256 GB of RAM being a lot in 2019: It was for a company that was comparatively small. Sub 500 employees. Also, openly hostile to IT expenses, You see this a LOT in smaller orgs. Everything is relative.

As for big ass UPS. Yes, I have spent the vast majority of the last 30 years of my professional career working for ISPs. When the network is your product, you tend to have sufficient power to keep said product running through the worst local Edison can toss at you. The kind of battery systems where, if you touch them, you will be thrown against the far wall, but will be dead before you hit them. Plus the gigantic geni out back.

But this was a gig for a local MSP that did work for smaller, local companies. It was during my brief stint where I tried to take an "easier" job.

It turns out, I absolutely hate doing such mediocre work. I couldn't even convince this client to spring for a generator, let alone a better UPS. I HATE MSP work. Solutions like the aforementioned nonsense are the best you can hope for.

I was NOT saying this was a good idea. I was wondering if their shit solution could be improved upon with minimal impact.