NiclasG
Posts: 1
Joined: Thu Sep 13, 2012 7:23 am

SD cards max write and MySQL

Thu Sep 13, 2012 8:19 am

I have been thinking of using the Raspberry PI as a kind of message broker. I was thinking of installing MySQL to store and handle all messages. What I am afraid of that an even stream of messages (maybe 1 to 100 every minute) that is stored in MySQL DB, the SD card will reach the max amount of write operations pretty quick. What I have read the max write operations is about 100 000. So the life time of the SD card will then be pretty short. Have someone experience of similar situations or could give recommendations on how to avoid reaching max amount of writes on the SD card?

User avatar
hojnikb
Posts: 128
Joined: Mon Jun 04, 2012 3:59 pm
Location: @Home

Re: SD cards max write and MySQL

Thu Sep 13, 2012 9:45 am

First of all SD cards dont have 100k write life (maybe there are some very expensive SLC ones), but more like 10k or even less, when newer generation memory is used (for example 2xnm TLC flash is only good for like 750 rewrites).

But not all is bad though. Since most if not all of the sdcards use some kind of wear leveling, that means all cells will be used up evenly, no matter where you physically write stuff (for example on the begging of the partrition).

So to increase the life of sd card, buy as big card as you can (so more data can be writen on it before it dies) and possibly buy a fast card, since these tend to use better MLC flash.
Also use ext2 fs which also writes less to card.
+°´°+,¸¸,+°´°~ Everyone should have a taste of UK Raspberry Pie =D ~°´°+,¸¸,+°´°+
Rasberry Pi, SoC @ 1225Mhz :o, 256MB Ram @ 550Mhz, 16GB SD-Card, Raspbian

User avatar
jors
Posts: 39
Joined: Sun Sep 23, 2012 9:05 am
Location: Barcelona
Contact: Website

Re: SD cards max write and MySQL

Sun Sep 30, 2012 2:59 pm

This document was intended for SSD's but could also be useful for SD's:

http://wiki.debian.org/SSDoptimization

Cheers.
Blog @ http://enchufado.com/

Return to “Advanced users”