smartgic / docker-mycroft

Mycroft AI Voice Assistant Docker images and docker-compose.yml files for x86_64, arm7vl and aarch64 CPU architectures.
https://hub.docker.com/u/smartgic
Apache License 2.0
41 stars 8 forks source link

Make /tmp/mycroft/ipc a bind mount #15

Closed goldyfruit closed 3 years ago

goldyfruit commented 3 years ago

The mycroft_voice container which runs the mycroft.client.speech Python process writes a "lot" on the disk because of the microphone level meter feature (thanks @JarbasAl for pointing this).

This is a sample of 11 minutes monitoring the IOPS:

Total DISK READ:         0.00 B/s | Total DISK WRITE:        40.46 K/s
Current DISK READ:       0.00 B/s | Current DISK WRITE:      44.13 K/s
    PID  PRIO  USER     DISK READ  DISK WRITE  SWAPIN     IO>    COMMAND                                                                                                                                                                    
 177310 ?sys pi            0.00 B     44.41 M  0.00 %  0.88 % python -m mycroft.client.speech

iostat -dmzx 1 sample:

iostat

On a normal drive this is not an issue but on an SD Card it could be pretty disruptive.

goldyfruit commented 3 years ago

Refact the idea with https://github.com/smartgic/docker-mycroft/commit/60c144b4f267f1ba288613660b4ea386d3c01486