Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

The church saves sinners, but science seeks to stop their manufacture. -- Elbert Hubbard


computers / comp.sys.raspberry-pi / Re: A bit more on SD and SSD...wear characteristics.

Re: A bit more on SD and SSD...wear characteristics.

<ub67um$vuqt$5@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=7905&group=comp.sys.raspberry-pi#7905

  copy link   Newsgroups: comp.os.linux.misc comp.sys.raspberry-pi
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tnp...@invalid.invalid (The Natural Philosopher)
Newsgroups: comp.os.linux.misc,comp.sys.raspberry-pi
Subject: Re: A bit more on SD and SSD...wear characteristics.
Date: Fri, 11 Aug 2023 22:07:34 +0100
Organization: A little, after lunch
Lines: 95
Message-ID: <ub67um$vuqt$5@dont-email.me>
References: <ub50gn$q4ed$1@dont-email.me> <ub59ad$d4ul$1@solani.org>
<ub5jl6$spt4$9@dont-email.me> <ub5l8n$db98$1@solani.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 11 Aug 2023 21:07:34 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4b1db7bf65b1cd290f39824b5421946c";
logging-data="1047389"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18tI2WLGLrNuTbE2Yqa01nGiBw+YIC4kyA="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:y9Jsru9ZWTaeUxqDpCKmqOkKBVQ=
Content-Language: en-GB
In-Reply-To: <ub5l8n$db98$1@solani.org>
 by: The Natural Philosop - Fri, 11 Aug 2023 21:07 UTC

On 11/08/2023 16:48, Jörg Lorenz wrote:
> Am 11.08.23 um 17:21 schrieb The Natural Philosopher:
>> On 11/08/2023 13:24, Jörg Lorenz wrote:
>>> Am 11.08.23 um 11:54 schrieb The Natural Philosopher:
>>>> Doing the research reveals the true case about wear on flash memory
>>>> style devices and that is that substantially reads do *not* damage the
>>>> cells at all, at least no more than reading, say, DRAM. It is block
>>>> erases and writes that do and so, paradoxically, when used as a PROM,
>>>> probably wear levelling is entirely unnecessary. And if done
>>>> gratuitously may actually reduce lifetime. By 'gratuitously;, I mean
>>>> that it is done when there is no write operation in progress.
>>>> I cannot see any reason why one would shuffle blocks around *except* as
>>>> a result of a write operation, however.
>>>>
>>>> There appears to be one aspect of read operations that *does* disturb
>>>> the data (read distrurbance), and that is that read operations can
>>>> minutely affect the state of physically adjacent but unread cells.
>>>> However this is generally at least an order of magnitude below write
>>>> damage, and is normally dealt with by error correction.
>>>>
>>>> So smart SSDS with good wear levelling will *occasionally* rewrite read
>>>> only blocks, but this is in terms of hundreds of thousands of reads.
>>>>
>>>> In my particular application the reads to reasonably static
>>>> configuration files will exceed 32 million per annum, or rather they
>>>> would *without disk caching*...
>>>>
>>>> Now I am unaware as to how long Linux will regard a read only file that
>>>> is fully cached (my files are less than 1kBytes) as valid. I cannot
>>>> see *any* reason why re-reading file data that the operating systems
>>>> *knows* has not changed, would result in any actual 'physical' reads to
>>>> the SD card *at all*.
>>>>
>>>> And in fact in my particular application one code and data is loaded,
>>>> even changing the configurations files should not result in a physical
>>>> read, as the disk cache itself used to do the writing will retain the
>>>> information.
>>>>
>>>> I think the summary of all of this research is significant for PI users
>>>> running Linux in what may be generally classed as 'read often, write
>>>> seldom' accesses to an SD card, and that is that by far and away the
>>>> greatest protection the card has is the Linux disk buffering algorithm
>>>> itself, provided that constant reads do not exceed its capacity. In a
>>>> typical 24x7 applications there is no reason why, post boot, any SD
>>>> reads should happen *at all*, once the disk cache is full. It also shows
>>>> the absolutely vital role that '-noatime' plays in protecting read only
>>>> files that are read continuously from producing unwanted writes.
>>>>
>>>> As far as writes go there will (nearly) always be a 1:1 correlation
>>>> eventually between writes to the linux file system and writes to the SD
>>>> card: The exception being data that us rewritten to the same disk file
>>>> cache before it gets flushed to physical storage.
>>>>
>>>> So the general rule in utilising the SD card in the most effective
>>>> manner, is to reduce writes to a minimum by firstly mounting the card
>>>> -noatime, and secondly using RAM disks to do any logging that you can't
>>>> turn off, and for all operations where ephemeral data are being recorded
>>>> and read, but which do not need to survive a reboot. Then, having a
>>>> superfluity of RAM available for disk caching will reduce SD *reads* to
>>>> essentially zero. No matter how often the file system is accessed by the
>>>> application.
>>>>
>>>> And in fact using iostat on my running application shows no (physical)
>>>> reads or writes *AT ALL*. As evinced by the rock steady light on the Pi
>>>> Zero.
>>>
>>> What exactly is your question?
>>>
>> My question is "Why did you think that a post has to be a question?"
>
> Because the posting otherwise is unsoliceted spam?
>
Oh? You think that unsolicited information about Linux and rasberry Pis
is spam, in linux and raspberry Pi newsgroups?
What on earth do you think that spam acrually IS?

>> This is information for Pi people using SD cards. Condensing a mornings
>> research into some general practical conclusions.
>>
>> If you are not interested in it, just skip it.
>
> I'll ask when I am interested.
>
Well, next time why not shut the fuck up when you are not.

You don't get to decide policy.

All you have is a keyboard and a killfile. It's very democratic. You can
only create your own safe space, you cant dictate it for anyone else

--
A lie can travel halfway around the world while the truth is putting on
its shoes.

.
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: The Natural Philosopher <tnp@invalid.invalid>
Newsgroups: comp.os.linux.misc,comp.sys.raspberry-pi
Subject: Re: Weird code crash
Date: Thu, 14 Sep 2023 07:57:45 +0100
Organization: A little, after lunch
Lines: 31
Message-ID: <uduat9$2hjig$1@dont-email.me>
References: <udu5c4$2gutd$1@dont-email.me>
<20230914070915.1bc7e3baf4ebac163267355c@eircom.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 14 Sep 2023 06:57:45 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="48cceb4bb543b24a506921b0f00095ab";
logging-data="2674256"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX184csyN+Mko+IrcuqEKVaRTgFIvHzDllTM="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.0
Cancel-Lock: sha1:IpXRKnxpnUUbrKw0XHuQQ4VHpSA=
In-Reply-To: <20230914070915.1bc7e3baf4ebac163267355c@eircom.net>
Content-Language: en-GB
Xref: rslight2 comp.os.linux.misc:12283 comp.sys.raspberry-pi:7905

On 14/09/2023 07:09, Ahem A Rivet's Shot wrote:
> On Thu, 14 Sep 2023 06:23:15 +0100
> The Natural Philosopher <tnp@invalid.invalid> wrote:
>
>> One possibility is that it is opening and reading a file at the precise
>> time another process is writing it...in both cases the read and write
>> operations are atomic and done with C code.
>>
>> READ
>> ====
>> fp=fopen(fullname, "r");
>
> Anything opened with fopen is a buffered stream operations on it
> are not atomic so yes it is very possible for the read to see a partially
> written file. To avoid the race you need to use some kind of locking.
>
Hmm.

Howver I think that for small operations one would have to posit a time
between fopen() and fread() in which the file 'disappears' in some
sense. Burt I 8thought* that a file handle once issued would not point
to empty data, and that in fact fopen('w") would in fact create a new
file and the old would not get unlinked until it was 'fclosed'
--
"Corbyn talks about equality, justice, opportunity, health care, peace,
community, compassion, investment, security, housing...."
"What kind of person is not interested in those things?"

"Jeremy Corbyn?"

.
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: The Natural Philosopher <tnp@invalid.invalid>
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Limiting the capacity of SD cards for the pi
Date: Wed, 20 Sep 2023 14:41:35 +0100
Organization: A little, after lunch
Lines: 19
Message-ID: <ueesqf$2v1m1$2@dont-email.me>
References: <5ae53c469cbob@sick-of-spam.invalid> <650786bd@news.ausics.net>
<5ae5bad225bob@sick-of-spam.invalid> <6508d35c@news.ausics.net>
<uecvs7$2gotn$1@dont-email.me> <5ae6d95530bob@sick-of-spam.invalid>
<kn0892Fsjp7U1@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 20 Sep 2023 13:41:35 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="054f6db54423c821ae90fded8316334d";
logging-data="3114689"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+bJSD79Jf+wC1dLaAipxE7MwEgmx/Y1n0="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:TcSHOZzrxeeQdQLfc2k9h5pfrYw=
Content-Language: en-GB
In-Reply-To: <kn0892Fsjp7U1@mid.individual.net>
Xref: rslight2 comp.sys.raspberry-pi:7905

On 20/09/2023 13:52, Andy Burns wrote:
> Bob Latham wrote:
>
>> Not got a linux machine only PIs doing little jobs.
>
> What is an rPi, other than a Linux machine?
>
A pi PICO?

--
“I know that most men, including those at ease with problems of the
greatest complexity, can seldom accept even the simplest and most
obvious truth if it be such as would oblige them to admit the falsity of
conclusions which they have delighted in explaining to colleagues, which
they have proudly taught to others, and which they have woven, thread by
thread, into the fabric of their lives.”

― Leo Tolstoy

.
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: The Natural Philosopher <tnp@invalid.invalid>
Newsgroups: comp.sys.raspberry-pi
Subject: Re: PCBs available
Date: Fri, 13 Oct 2023 12:21:32 +0100
Organization: A little, after lunch
Lines: 44
Message-ID: <ugb97s$34vit$6@dont-email.me>
References: <ug8lq4$2fkip$1@dont-email.me>
<yqC*NXHsz@news.chiark.greenend.org.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 13 Oct 2023 11:21:32 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b16245e9d333a2f8f6579c6dad0fba74";
logging-data="3309149"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19RONX7yudQo55EqGeGU9ERB4aGvnBPGkQ="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:UFTKDmcrHM9KatxP4Y54tWMzuvw=
Content-Language: en-GB
In-Reply-To: <yqC*NXHsz@news.chiark.greenend.org.uk>
Xref: rslight2 comp.sys.raspberry-pi:7905

On 12/10/2023 23:22, Theo wrote:
> The Natural Philosopher <tnp@invalid.invalid> wrote:
>> The dear chinese sent me 10 PCBs instead of one, so if anyone UK want a
>> PCB to build a mains powered power supply with 4 x 250VAC capable relays
>> buffered to suit raspberry PI GPIO current levels....
>
> That's a nice board - clear markings, easy to access components, neat power
> supply. What tool did you use to design it, out of interest?
Since when I did this professionally it was black tape on clear film, I
ended up using Corel Draw! I started with a 3D modelling program to make
sure the physical bits fitted, then exported the copper to Corel,
because I am very fluent in it

I found a CDR to Gerber conversion utility online. That made all the
difference and it even worked for the legend. The drill file was harder
but again I found a utility to create that.

3D printed case is on its way from a good friend. STL files available
for that as well
>
>> Let me know. Correct power supply choice would make it OK for 110V
>
> I made my own similar board last year - 7 relays, in a much tighter space,
> mains coils and contacts (but still trying to keep the best isolation I
> could).
>
> I now need to trigger one mains coil from a Pi without exporting mains or
> putting any DC wiring in the all-mains enclosure (where I can't get good
> isolation). Current plan is to make a photo-triac triggered by light from
> an LED on the Pi carried on some optical fibre...

If a discrete optical coupler is a nono that might work.

>
> Theo

--
“A leader is best When people barely know he exists. Of a good leader,
who talks little,When his work is done, his aim fulfilled,They will say,
“We did this ourselves.”

― Lao Tzu, Tao Te Ching

.
Path: i2pn2.org!i2pn.org!nntp.comgw.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: Bob Latham <bob@sick-of-spam.invalid>
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Raspberry PI OS Bookworm. Does it support multiple desktops/workspaces?
Date: Sat, 04 Nov 2023 11:04:43 +0000 (GMT)
Organization: None
Lines: 48
Message-ID: <5afdfffb94bob@sick-of-spam.invalid>
References: <uhg6to$2875m$1@dont-email.me>
<WIy*5qZtz@news.chiark.greenend.org.uk> <uhiolq$2r6du$2@dont-email.me> <NbednWsKQtdaXNj4nZ2dnZfqnPqdnZ2d@earthlink.com>
X-Trace: individual.net d3kFNK8TNF1iBRQuQPJ7jAF6kkKwAk6VHaX3UriRYZVQClgmpu
X-Orig-Path: sick-of-spam.invalid!bob
Cancel-Lock: sha1:PQCGfvXsOdG3N3ZhRK8kV2GdbwE= sha256:C6I5Tts17F+nquqg/ngUGOzRB6GTsv2lWxWRs4qO24Y=
X-No-Archive: Yes
User-Agent: NewsHound/v1.54
Xref: rslight2 comp.sys.raspberry-pi:7905

In article <NbednWsKQtdaXNj4nZ2dnZfqnPqdnZ2d@earthlink.com>,
56d.1152 <56d.1152@ztq9.net> wrote:

> I've installed Raspian/Bookworm on FOUR boards in the
> past couple weeks. Yep, it does all the usual. ONE
> very annoying aspect with Bookworm though is the
> pointless demise of dhcpcd.conf and WPA_Supplicant.conf
> in favor of "network manager'. If you use the 'lite'
> version, no GUI, this becomes a PROBLEM if you want
> to do static IPs. For the GUI versions just install
> the Gnome network manager GUI thingie and use that
> to set everything.

I didn't know there was a problem until I read this but you're right
there is. I have managed a static IP on an ethernet connection by
creating a file
/etc/network/interfaces.d/eth0 which contains:

allow-hotplug eth0
iface eth0 inet static
address 192.168.1.3
network 192.168.1.0
netmask 255.255.255.0
gateway 192.168.1.1

I *presume* it would be similar for a Wi-Fi connection but that the
file name would not be eth0 but whatever the Wi-fi interface is
called. I don't know what that is at the moment.

So I tried to get a Wi-Fi dongle to work using the usual the old
method, copying a file wpa_supplicant.conf to the boot partition of
the sd card before it is transferred to the pi. This worked great
with bullseye but fails with bookworm.

I've done some googling and found something I thought was the answer,
I had to create a file at /etc/wpa_supplicant.conf and then run it
with: wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -d

With only two steps I half expected it to work but of course it gave
me miles of text and failed to work.

Has anyone discovered how to make a Wi-Fi dongle work with bookworm
lite? If so, could you enlighten me please.

Thanks.

Bob.

SubjectRepliesAuthor
o A bit more on SD and SSD...wear characteristics.

By: The Natural Philosop on Fri, 11 Aug 2023

42The Natural Philosopher
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor