Page 1 of 1

Run MySQL on Pi

Posted: Tue Apr 11, 2017 6:44 am
by HightronicDesign
Hi Guys,

just a general question, is there a real bottleneck when I run a MySQL Server on a Pi3 ?

I want to start a project and would need a small Webserver including a Database but don't want to pay for a official one until first release.

Would a Pi3 be capable for this ?

It is no Big Data in this game, so nothing to be calculated with too much resources.


BR

Re: Run MySQL on Pi

Posted: Tue Apr 11, 2017 6:50 am
by peterlite
The microSD card is the first bottleneck. The speeds quoted are usually for continuous writes of video files. Cheap cards are very slow at writing the small blocks of data updated in a database. A faster card is a good investment for a database style application.

After that, the 20 ~ 30 MB/s USB 2 throughput will be a limit. The Pi 3's four cores and the fast graphics unit in every model Pi are unlikely to limit you.

Re: Run MySQL on Pi

Posted: Tue Apr 11, 2017 6:56 am
by HightronicDesign
Thanks mate.

A Class 10 SD Card shouldnt be that bad I think for the project.

And a small delay would also not be a problem for me, because I want to use it only for some beta tests as long the Pi is not completely overloaded with that read/write access on it.

After first success i want to migrate it in an official paid provider.

So if the Pi can handle this I would like to start developing on it to keep the costs as minimal as possible.

Re: Run MySQL on Pi

Posted: Tue Apr 11, 2017 9:17 am
by DougieLawson
There's also a RAM bottleneck, because the default settings in /etc/mysql/my.cnf assume your machine has about 4GB of RAM.

You need to tune the RAM buffer pools down to about a quarter of their default sizes. If you over-commit RAM your RPi will use the SDCard for paging. That is very bad as it a) wears out the SDCard quicker and b) is as slow as wading through treacle.

Re: Run MySQL on Pi

Posted: Tue Apr 11, 2017 2:42 pm
by unixcommando
Disk issues can be resolved by using an external drive like a WD Pi drive. The 314 drive is inexpensive at about $40. I ran a plex server on a 1T pi drive until I ran out of space. Blazingly fast compared to running on an SD card.

-Bob