[ / / / / / / / / / / / / / ] [ dir / animu / asmr / ausneets / f / hypno / kc / profags / sonyeon ][Options][ watchlist ]

/tech/ - Technology

You can now write text to your AI-generated image at https://aiproto.com It is currently free to use for Proto members.
Name
Email
Subject
Comment *
File
Select/drop/paste files here
Password (Randomized for file and post deletion; you may also set your own.)
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Expand all images

[–]

 No.926114>>926475 >>926487 [Watch Thread][Show All Posts]

I have a Raspberry Pi 3. To ease the wearing of the sd card I mount the /var directory on a usb key. I plug another usb key to share some files on the lan. I wonder how much read/write are saving from the poor sd card and start collecting statistics daily. After some months I decided to plot the data and the result is in the linked image (because tor users can't upload images...)

https://i.imgur.com/fLIsENq.png

WTF? Tens of millions of read/write? Is this possible or I have done something wrong collecting data? I read from /sys/block/mmcblk0/stat (the sd card), /sys/block/sdb/stat (usb for /var) and /sys/block/sda/stat ("lxr" usb for samba sharing).

PS: Where you see the graph falling near zero is because I must restart this little bitch. This means that for the total I/O you must ADD the peak values!

 No.926115

why do you not just use a flash drive instead of the sd card?


 No.926139>>926463

I'm not sure SD wear is too much of an issue. I used a random sd i found in my desk to run my rpi B as a NAS, then a rpi-3 B. Took over 4 years for it to burn out, and i'm not sure how much use it had before it was used on the pi. If the files the NAS serves are a usb device, then just set up a chron job to back up the root fs as often as you feel apropriate. I only backed up once every 3 months since other than software updates a NAS's root fs will be pretty static.


 No.926160>>926463

Why would you be worried about SD card wear and not USB flash wear as well?


 No.926217

You can boot off of NFS or hard drives if you're too worried about destroying SD cards.


 No.926463

>>926160

On raspi forums they say usb flash are most robust than sd. I am not a wizard so I take their word for sure.

>>926139

>a NAS's root fs will be pretty static

That's my reasoning too. I leave the root fs without much work and put the load on a (supposedly) more robust media. I only backup /var and /etc. Is this a good strategy?

I never imagine there are so many millions accesses.


 No.926475>>927059

>>926114 (OP)

There are 11 fields /sys/block/<dev>/stat

https://www.kernel.org/doc/Documentation/block/stat.txt

Which fields are you reading to gather your statistics?


 No.926487>>927059

>>926114 (OP)

You should mount /tmp and /var/tmp on a tmpfs, and put your swap on a fast USB stick in addition to the rest of /var. In this way, the most frequently written locations will be using RAM, which doesn't wear out.

>Tens of millions of read/write?

Probably the 'M' represents megabytes, not "number of times read or written".

also

>using imgur

There are 10000 better alternatives than that shitty website. Like catbox.moe, 0x0.st, etc..


 No.927059

>>926475

I use the 7th field:

awk '{print $7}' /sys/block/mmcblk0/stat

I really don't remember why I choose to extract only this field, probably I read in some forum. Now you make me reconsider my method because this is only the "write sectors" count. To have a good monitoring I must add the 3rd field "read sectors". So, the total count is even more.

>>926487

Yes, putting tmp files in ram is generally a good move, but I am not convinced to use a tmpfs on a device with so small ram.

>imgur

Lol, you are right. But I used http://freeimagehosting.net to upload my image and I didn't know my image would end up on imgur. I was looking for a image hosting that doesn't require javascript to upload and freeimagehosting was the first I found with this feature. I'm open to suggestions.




[Return][Go to top][Catalog][Screencap][Nerve Center][Cancer][Update] ( Scroll to new posts) ( Auto) 5
8 replies | 0 images | Page ???
[Post a Reply]
[ / / / / / / / / / / / / / ] [ dir / animu / asmr / ausneets / f / hypno / kc / profags / sonyeon ][ watchlist ]