
Mi Raspberry Pi tiene una tarjeta SD de 128 GB con Arch ARM y
- apache
- SiguienteNube
instalado en él y aparentemente interactúa continuamente con la tarjeta SD. Descubrí iotop
que mysqld
aparentemente es el proceso que escribe la mayoría de los datos en el disco. En el shell de MySQL encontré lo siguiente:
show processlist;
+------+--------------+-----------+-----------+---------+------+--------------------------+------------------+----------+
| Id | User | Host | db | Command | Time | State | Info | Progress |
+------+--------------+-----------+-----------+---------+------+--------------------------+------------------+----------+
| 1 | system user | | NULL | Daemon | NULL | InnoDB purge coordinator | NULL | 0.000 |
| 2 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 |
| 3 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 |
| 4 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 |
| 5 | system user | | NULL | Daemon | NULL | InnoDB shutdown handler | NULL | 0.000 |
| 1846 | root | localhost | NULL | Query | 0 | Init | show processlist | 0.000 |
| 1852 | oc_stdcerr13 | localhost | nextcloud | Sleep | 0 | | NULL | 0.000 |
| 1853 | oc_stdcerr13 | localhost | nextcloud | Sleep | 0 | | NULL | 0.000 |
+------+--------------+-----------+-----------+---------+------+--------------------------+------------------+----------+
8 rows in set (0.001 sec)
¿Cómo puedo darle un descanso a mi tarjeta SD? /var/log
y /tmp
ya están en el disco ram ( tmpfs
)
Luego, cuando ejecuté continuamente el show processlist
comando, también vi lo siguiente:
show processlist;
+------+--------------+-----------+-----------+---------+------+--------------------------+------------------------------------------------------------------------------------------------------+----------+
| Id | User | Host | db | Command | Time | State | Info | Progress |
+------+--------------+-----------+-----------+---------+------+--------------------------+------------------------------------------------------------------------------------------------------+----------+
| 1 | system user | | NULL | Daemon | NULL | InnoDB purge coordinator | NULL | 0.000 |
| 2 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 |
| 3 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 |
| 4 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 |
| 5 | system user | | NULL | Daemon | NULL | InnoDB shutdown handler | NULL | 0.000 |
| 2061 | oc_stdcerr13 | localhost | nextcloud | Query | 0 | Init | SELECT `filecache`.`fileid`, `storage`, `path`, `path_hash`, `filecache`.`parent`, `name`, `mimetype | 0.000 |
| 2062 | root | localhost | NULL | Query | 0 | Init | show processlist | 0.000 |
| 2063 | oc_stdcerr13 | localhost | nextcloud | Sleep | 0 | | NULL | 0.000 |
+------+--------------+-----------+-----------+---------+------+--------------------------+------------------------------------------------------------------------------------------------------+----------+
8 rows in set (0.001 sec)
MariaDB [(none)]> show processlist;
+------+--------------+-----------+-----------+---------+------+--------------------------+------------------------------------------------------------------------------------------------------+----------+
| Id | User | Host | db | Command | Time | State | Info | Progress |
+------+--------------+-----------+-----------+---------+------+--------------------------+------------------------------------------------------------------------------------------------------+----------+
| 1 | system user | | NULL | Daemon | NULL | InnoDB purge coordinator | NULL | 0.000 |
| 2 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 |
| 3 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 |
| 4 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 |
| 5 | system user | | NULL | Daemon | NULL | InnoDB shutdown handler | NULL | 0.000 |
| 2061 | oc_stdcerr13 | localhost | nextcloud | Query | 0 | Init | UPDATE `oc_filecache` SET `size` = '-1' WHERE (`fileid` = 15955) AND ((`size` <> '-1') OR (`size` IS | 0.000 |
| 2062 | root | localhost | NULL | Query | 0 | Init | show processlist | 0.000 |
| 2063 | oc_stdcerr13 | localhost | nextcloud | Sleep | 0 | | NULL | 0.000 |
+------+--------------+-----------+-----------+---------+------+--------------------------+------------------------------------------------------------------------------------------------------+----------+
8 rows in set (0.001 sec)