move /var/log to a RAMDISK

Jul 29, 2023 Last reply: 2 years ago 176 Replies

And they had to work quite hard to make it go pop. They disconnected the computers and all the safety interlocks.

If you take that battery that Musk (IIRC) installed in South Australia on their grid, and scale it up so it can power the grid for a week (for the periods in winter of 5 to 10 days when wind and solar produce nothing), it will set you back about £1,000,000,000,000 and no pence. And require a chunk of land. Also, I'd hate to be anywhere near it if it caught fire.

You appear to be unaware that although you are not interested in war, war is very interested in you.

It takes two sides to make peace, and only one side is needed to make war. As Europe saw in 1938-1939-1940. And is now seeing again in the shape of Putin. Chamberlain tried to make peace with Adolf and all he got was dismemberment of Czechoslovakia and invasion of Poland.

Then there were the naive kiddies in the US who said that there wouldn't be another war because they wouldn't turn up. They didn't realise that you don't have to turn up, as Europe discovered in those years, and the Jews even more so.

And we need to include India and China in that, too. About 100 million is the max size a country should be.

And apart from there not being enough lithium in te world to make it, the consequences of it shorting out are simply inconceivable.

It boils down to a simple homily: ArtStudents™ want to make the world out of things that ought to exist... Engineers actually build it out of things that do exist.

People who try to change the world to how (they think) it ought to be, cause immense damage - far more than the people who actually change it as it is.

So fifty thousand tonnes of battery to store 50 MWh? . So Britain for one winter HOUR, fifty million tonnes of battery?

You can say that again. I found exactly that whatever technology I looked all technically feasible in a lab, not one with a cats chance of working at grid scale. Not at any sane cost or energy-to-build anyway.

You HAVE to take EROEI on board, which like intermittency is a concept οἱ πολλοί have had trouble absorbing. If your 'renewable' grid overall uses more energy to construct and maintain *in its entirety* than it will ever produce in ist lifetime it is - to use today's parlance - 'not sustainable'.

There is an optimum size of power plant, not to big, not too small. You want to avoid long transmission lines but you want economies of scale too. And there is safety. Currently the optimum size of a reactor lies in the 50-500MW range. IT carries enough 'storage' for at least two years, possibly ten. It generates loads of low grade waste heat (probably ~40°C) that could heat greenhouses, blocks of flats or cannabis farms. Or be used to distil seawater. It doesn't need storage. It can be build on a 10 acre plot of ex industrial land by a river, in a town without disrupting the skyline. In use it would be effectively noiseless and non polluting. It could be landscaped into an urban park

Seriously, what's not to like?

- that's where we stand today.

Up s*it creek without a paddle?

Sadly I agree with you.

Chamberlain knew what was coming. His job was to play for time. Britain in 1938 had no chance against Germany, so the Czechs had to suffer., By

1939, and Poland, we couldn't let it go on. As it was without the Empire we would have been f***ed. Chamberlain resigned because it was the right thing to do. Not because he believed or ever had believed in 'peace in our time'. He was, after all, a politician.

Yup. Americas is virtually uninvadeable as long as it has a decent Navy, just like the UK. That isn't the same for Eurasia/Africa which is pretty well one huge land mass with massive borders *everywhere*. You could in theory walk from Calais to Kamchatka, with no more than the odd river to cross.

The most independent countries are the ones with the smallest and most easily defendable borders. Switzerland, surrounded by mountains. Italy, cut off by the Alps, Finland, with only a short Russian border. The massive west European conglomerate of Germany and Benelux, France and Denmark is simply one huge country that anyone can waltz across with tanks, and so are the ex sovbloc nations.

What us happening in Ukraine is tantamount to the USA invading Quebec, on the grounds they 'really want to be Americans' and shooting anyone who doesn't, to prove the point...after turning Montreal to rubble.

Doesn't matter how peace loving the Quebeçois are, they will get f***ed, just the same. Russia is trying to teach Ukraine a lesson in what happens when Russia doesn't get its own way, I absolutely think that must become a lesson on what happens to Russia if it tries to.

Because it wont stop with Ukraine.

Indeed. India and China have a massive population problem to overcome as does the whole of that part of Asia. A couple of Great Patriotic Wars with inspirational Glorious Leaders that decimated the young male population would probably be appropriate....

I think people do not realise that the 78 years since WWII officially ended have been peaceful and prosperous for the West but that is in fact not the normal state of affairs. And the lesson of the British Empire was that civilised behaviour and genteel affluence back home came on the back of some hardened professional soldiers and sailors, putting their lives on the line in far flung places for a relative pittance....

"I went into a public 'ouse to get a pint o' beer, The publican 'e up an' sez, " We serve no red-coats here." The girls be'ind the bar they laughed an' giggled fit to die, I outs into the street again an' to myself sez I: O it's Tommy this, an' Tommy that, an' " Tommy, go away " ; But it's " Thank you, Mister Atkins," when the band begins to play The band begins to play, my boys, the band begins to play, O it's " Thank you, Mister Atkins," when the band begins to play.

I went into a theatre as sober as could be, They gave a drunk civilian room, but 'adn't none for me; They sent me to the gallery or round the music-'alls, But when it comes to fightin', Lord! they'll shove me in the stalls! For it's Tommy this, an' Tommy that, an' " Tommy, wait outside "; But it's " Special train for Atkins " when the trooper's on the tide The troopship's on the tide, my boys, the troopship's on the tide, O it's " Special train for Atkins " when the trooper's on the tide.

Yes, makin' mock o' uniforms that guard you while you sleep Is cheaper than them uniforms, an' they're starvation cheap. An' hustlin' drunken soldiers when they're goin' large a bit Is five times better business than paradin' in full kit. Then it's Tommy this, an' Tommy that, an` Tommy, 'ow's yer soul? " But it's " Thin red line of 'eroes " when the drums begin to roll The drums begin to roll, my boys, the drums begin to roll, O it's " Thin red line of 'eroes, " when the drums begin to roll.

We aren't no thin red 'eroes, nor we aren't no blackguards too, But single men in barricks, most remarkable like you; An' if sometimes our conduck isn't all your fancy paints, Why, single men in barricks don't grow into plaster saints; While it's Tommy this, an' Tommy that, an` Tommy, fall be'ind," But it's " Please to walk in front, sir," when there's trouble in the wind There's trouble in the wind, my boys, there's trouble in the wind, O it's " Please to walk in front, sir," when there's trouble in the wind.

You talk o' better food for us, an' schools, an' fires, an' all: We'll wait for extry rations if you treat us rational. Don't mess about the cook-room slops, but prove it to our face The Widow's Uniform is not the soldier-man's disgrace. For it's Tommy this, an' Tommy that, an` Chuck him out, the brute! " But it's " Saviour of 'is country " when the guns begin to shoot; An' it's Tommy this, an' Tommy that, an' anything you please; An 'Tommy ain't a bloomin' fool - you bet that Tommy sees!

I do that on the weather station code running on a couple of Pis. It is performing running averages of the data which is incoming over serial at

1Hz (temperature, humidity, pressure, illumination, wind speed, wind direction, rain fall), and posting 15m / 1h / 24h reports. It regularly writes out the sample buffers, so if has to restart for any reason it can read back the buffers, account for any lost samples, then pick up where it off, and not lose the entire last 24 hours of data.

---druck

Yes, NASA does some amazing things.

Another use for fault tolerance might be in an aircraft that is (by design) inherently so aerodynamically unstable that it cannot be flown directly by a human, so it has to be flown by the on-board computers. You don't want a fault in a CPU to cause the aircraft to fall out of the sky. One of however many of the CPUs in the F22's avionics package was designed for QMR. I don't know for a fact that the F22 uses that CPU in QMR mode, but if it is you could a bullet through one of the CPUs or push a screwdriver blade across bus lines, and the system would continue to function without losing a single cycle. I designed the instruction fetch unit of that chip:

formatting link
formatting link

If so, then you ought to be good.

Umm ... Apache is NOT a trival app. Does all KINDS of things. Are those "things" also on the RAMdisk ???

A Pi running strictly in terminal mode, no GUIs/Xorg, running just a few 'system' thingies is (relatively) easy to deal with.

In a sense you're correct ... maybe 95% of the OS stuff might NEVER be used.

But you STILL have to make sure the stuff that IS used winds up on a RAMdisk or in some RAM-based buffer. It's not a given, you have to look/deal.

What about /proc and /sys ... they're very dynamic. Are they REALLY all in RAM or not ? Do they ever make use of a physical /swap partition ? Depends on the particular distro, sometimes down to the version/subversion levels.

In any case, there are SO many ways to implement a Linux disto that you can never ASSUME anything.

Careful, some of that "use" is SO transient that it does not show up using 'top' or other CL utilities. But it's still 'use' ... is it in RAM, or the SD ?

"Caches", esp if they need to be quick, are almost always in RAM.

Anyway, if you're REALLY looking to optimize, REALLY keen to save SD wear, it's not all cut-and-dried. A lot of this stuff is just NOT documented worth a damm, YOU have to check and deal appropriately. Such is The Art.

Perfectly done, an SD card might last a good decade or more. I had one that was still happy after 7 years, and it wasn't even top-of-the-line. But I made an effort to make sure everything happening was on a RAMdisk or RAM buffer. Limited needs are a big help - a "busy" system may just be too much to investigate or deal with.

ARM is really a CPU, not u-Controller. Different rules.

u-Controllers aren't as fast/versatile, but they DO have a huge number of ways to control power use and, if RISC, sneaky ways to make insanely tight code. Look up the (mostly obsolete) PIC (f)18x series. There are VERY weird ways to cut corners using unexpected flags and side-effects. Hey, there were the 'c' chips before them that I used ... the 'c' meant UV-Erasable ROM. You had to put 'em in a box with a deadly UV tube lamp for at least 15 minutes to start all over again. Ah that ozone smell :-)

IMHO, all in-training "programmers" should first do u-controllers ... teaches "disciple" and the correct mentality. Ain't gonna HAPPEN of course, to everyone's detriment ....

Correct.

However the "system" may be doing a LOT of almost-hidden things behind your back. SOME of that may involve a lot of read/rewrites to the SD. You have to CHECK.

Hmmm ... almost like an app I wrote back in the day to deal with a serial GPS receiver .......

But it was 18C chips, other makers called theirs "JW", for "jewel window" ...

Still have the UV box ...

'PIC' means "Peripheral Interface Controller" and the IDEA is much like how nervous systems work. Nerves pre-process their input and "encode" it efficiently so the brain doesn't have to do so much work. "Peripheral neuropathy" results when those nerves don't encode properly anymore. They're not 'dead', just 'corrupted'. Lots of quacks will promise that shining colored lights at you (now lasers) will cure all your ills. This bullshit can be seen even from the mid-1800s when it became possible to make bright light. Every color was suppose to be the cure-all for SOMETHING and rubes payed BIG :-)

Anyway, yer brain doesn't stop at your skull, it's all one integrated system right down to yer toes.

Did the same more recently using an Arduino. The SD just becomes a faux-RAMdisk, no file system at all, just bytes. OK so long as you don't change/rewrite too often.

Oh, absolutely ! u-Controllers offer all kinds of tricks the CPU/infinite-resources crowd never thinks of.

I use Pascal all the damned time - FPC/Lazarus. Lots of times I write protos in Python/TK and then re-write the GUIs in Lazarus a week later. I've got a bunch of stuff like that ... an older Python version and better FPC/Laz version.

Pascal is super-functional and "elegant" IMHO. Love it. 'C' is super-functional, but not so "elegant" or so obviously comprehensible.

But I can't find a Modula-3 compiler for Linux that actually works - dammit !!! :-)

But, just to torture my successors, I write the odd utility in FORTRAN or COBOL or ADA - yea, yea, there's a little devil in me :-)

BTW, ADA *sucks* ...

If you want a good functional versatile GUI like *today* you use Lazarus. WYSIWYG ! FPC is also very good for non-GUI apps. Wrote a large one just six months ago.

Oh, the Deb repos are DEFECTIVE of late ... get Laz from the makers. Three packages to install in order. It's all "object PASCAL" .....

In the Bad Old Days IBM/MS offered both 'C' and Pascal compilers (grey book for 'C', pink for Pas). That's when I got into Pas. NOW I have old DOS VMs *and* both compiler suites. Fun !!! "Turbo Pascal" was an absolute revolution on PCs (8088 and Z80 early on). You could blast out apps ! Still have my "Turbo v1.0" manual and a few others. 'Delphi' is basically Lazarus, but JUST for Winders. It was bought-out and became insanely expensive alas. Laz does all the same stuff for free AND for Linux too - x86 or ARM.

No, I'm not a salesman :-)

I'll check. HAVE done stuff like this, but there's always a "better way".

Effectvely yes, Ir they are read only

Sure, it loads a PHP file or ten, but they are read only and they will be cached, so they will have no impact on 'wearing' the SD card

The only thing apache *writes* is log files, and they are on ram disc and the only thing that my code *writes* beyond configuration files that are then only ever read, is also on ram disk

You seem to be under a misapprehension that reads wear out SD cards. They dont. Only writes do. Hence the -naoatime directive,

That's how I use em. They are not powerful enough for a desktop, for me, yet.

Well, a P4 is not far off from some of the laptops from four or five years ago ...

Use 'em right and they can offer surprising performance.

Alas you can barely GET P4's anymore ... no chips.

Tried Orange/Banana PI's ... Orange seems better - and they're still quasi-affordable. But they're both all Made In China.

Sounds like an 'environmental sensor' cluster I did about five years ago - solar, and had to be cheap. However I was using an Ard Mega which can be VERY conservative with power. First off, pry out those pretty LEDs :-)

I see what you're doing. For the server part, does it REALLY matter if wall-warts or such are involved ? They are cheap and there's always a ton of them around from old dead devices ...

Yep - "OFF".

I'd still look into the Ards. There are 3.3v variants to be had now if that's your thing. There's a convenient low-power library now that helps coordinate shutting off all the useless stuff while waiting for some signal.

Bummer. Be CAREFUL with batteries around flammable stuff like "oil" though - LiPo's have a BAD rep ...

No such thing as "read only" with SD/Flash tech. Even reading them means re-writing them. Really !

I'd suggest FRAM, but they never got the capacity up to scale (great for smaller stuff though).

DO check ... there's probably a lot of "sneak" reads/writes.

Wrong - look it up. Reads are DESTRUCTIVE and background re-write is necessary afterwards.

FRAM has two or three orders of magnitude more re-write life. Used 'em on one board where that was relevant. But ...

However, Raspbian/Deb writ for PI's IS heavily tweaked for running all in RAM. Large bits of the OS stuff just get moved-off into RAM rather than relying on SD.

Orange/Banana Pi's have EEMC, which is a bit difficult to get at sometimes but you CAN shift the OS image into there. Maybe two or three times the life of the best SD's at least and faster.

Many apps don't NEED that kind of speed - even on a desktop. The advantage of desktops/laptops is the CONNECTIVITY options when we're talking "industrial" applications. WiFi/BT/IR/x-Base-T ...

Even a low-end PIC can figure out a DS one-wire temperature sensor ... but CONVEYING that knowledge to the outside world is the trick.

No choice. Somehow I really doubt he's happy.

Eastern countries try to convince them that de-facto slavery is a Great Thing ....

At present, Samsung is The Best.

Somewhere, maybe deep, there'll be code to get the most out of their devices.

S*it, I bought a Epson scanner - one of those ones that just looks like a bar - took me like six hours of digging to find a minimal app for Linux. 99.99% of the site said no such thing existed, but we have Fellow Travelers embedded everywhere .....

As for cheapo cameras ... I once found a $7.95 cam on a drugstore shelf. Absolutely HORRIBLE - could barely manage 200-by. However, "artistically", the sheer crappiness DID produce some interesting results :-)

I believe that to be completely wrong.

And unless you can provide some sort of evidence to back up that assertion, I have to say I consider it utter bollocks

On Wed, 9 Aug 2023 02:44:46 -0400, "23k.304" snipped-for-privacy@bfxw9.net declaimed the following:

M-series chips fill the role of microcontroller meant to run without an OS (or something like FreeRTOS) direct from flash memory; the A-series (application) are meant to be OS-based computer systems with complicated boot sequences <G> (just look at most R-Pi systems -- where the /graphics processor/ is used to configure the ARM memory map before turning over control).

You're confusing Flash technology with magnetic core memory technology used about 50 years ago. A core must be reset to zero to see if there was an one, and the possible one has to be written back.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required