Post ATFFiVdM2eED9pw5h2 by Kulturfolger@metalhead.club
(DIR) More posts by Kulturfolger@metalhead.club
(DIR) Post #ATFCHTIQKDWUE6YsL2 by john@sauropods.win
2023-03-03T16:31:49Z
0 likes, 0 repeats
Can anyone with experience running #RaspberryPi's tell me if making a thousand writes an hour to a SQLite database on the MicroSD card is likely to be a problem?I mean, it's just my silly little Mastodon counting bot, so it's not critical, but I don't want it to fall over in like a month (if so, I'd put it on a VPS).
(DIR) Post #ATFCVz68soSmudjm9A by ColmDonoghue@mastodon.ie
2023-03-03T16:34:13Z
0 likes, 0 repeats
@john usually SD card writes are limited, and the card will wear out after maybe 10 million That's about June,2024
(DIR) Post #ATFCmOUmDxS6JY5JEu by futurebird@sauropods.win
2023-03-03T16:37:14Z
0 likes, 0 repeats
@john why not just save it and write one an hour? or less
(DIR) Post #ATFCqfW0t0tqG7hXSS by john@sauropods.win
2023-03-03T16:37:59Z
0 likes, 0 repeats
@ColmDonoghue So they limit the number of writes of any sort, not the number per sector or whatever? Just a year or so it a bit disappointing I have to say.
(DIR) Post #ATFD8Gs3FjmV2PP2mG by john@sauropods.win
2023-03-03T16:41:23Z
0 likes, 0 repeats
@futurebird I didn't write it that way because I wasn't planning to run it on my Pi, so it just saves data as it collects it (which is obviously a better way of doing things generally!). I don't think I can be bothered to do a re-write now. I possibly should have considered using Redis or something. Oh well.
(DIR) Post #ATFEqhNOARGRwGoEee by dino@kishkush.net
2023-03-03T17:00:26Z
0 likes, 0 repeats
@johnDefinitely limited per sector, but I think it's in the tens of thousands of write-and-erase cycles. So it really depends on the size of the writes vs the size of the SD card.P.s. sqlite has caching/buffering capabilities that might help reduce write strain. Also you can always use an external drive to extend SD life even further @ColmDonoghue
(DIR) Post #ATFFiVdM2eED9pw5h2 by Kulturfolger@metalhead.club
2023-03-03T17:10:13Z
0 likes, 0 repeats
@john do the math. Number of writes multiplied by the size of a sector equals total writes. Use cards like SDCIT2 with high endurance. These cards offer 1920 TBW
(DIR) Post #ATFIMcL4jOPhRedfLU by ColmDonoghue@mastodon.ie
2023-03-03T17:39:59Z
0 likes, 0 repeats
@john maybe it's a bit pessimistic, and tech has moved on, but you'll be writing to the same "area" as opposed to a fully random write to anywhere on the disk
(DIR) Post #ATFL3oJOIAMUwFZgsi by Nlandersson@mastodonsweden.se
2023-03-03T18:10:11Z
0 likes, 0 repeats
@john a cheap alternative is to get an external drive for the pi.
(DIR) Post #ATFPIqwxAJw7HTVYfI by admin@2br02b.online
2023-03-03T18:57:43Z
0 likes, 0 repeats
@john Is it possible to move the writes to another drive? MicroSD aren't really meant to run that many writes consistently. You could get a decent usb that is built for write ops like that. It if isn't critical, then keep using it and see how long it lasts 😜
(DIR) Post #ATFTaef1zhjCCDrwjA by Twarda@sauropods.win
2023-03-03T19:45:00Z
0 likes, 0 repeats
@john @kurasiu maybe you can advice?
(DIR) Post #ATFVksswABdd7GNYmm by john@sauropods.win
2023-03-03T20:10:02Z
0 likes, 0 repeats
@admin Yeah, I'm thinking about getting a different drive for it if I decide to stick to the idea of having it on my Pi.
(DIR) Post #ATFW29T5lEKlTFWXh2 by admin@2br02b.online
2023-03-03T20:12:58Z
0 likes, 0 repeats
@john You should be able to test it out with a usb drive. keep your existing microSD and move the multiple write directory to the USB.I've got an older pi that I'm thinking about using to dabble in Ham Radio. It's on my ToDo list which keeps getting added to but rarely gets smaller.
(DIR) Post #ATFzAman4yT5ndaoDY by aplsms@mastodon.social
2023-03-04T01:39:35Z
0 likes, 0 repeats
@john depends of database size. In general: very slow. Tried on #homeassistant
(DIR) Post #ATG81cCvDiDYZY8EHg by dlakelan@mastodon.sdf.org
2023-03-04T03:18:50Z
0 likes, 0 repeats
@johnA thousand writes of how much data? If it's a gigabyte each write it's very different from if it's 12 bytes.I've been running RPi4 with 32GB cards, several gigs unpartitioned as reserve, and logging /var/log to an f2fs partition for about 3 yrs. No card failure.