Impact of tempdir: /tmp

How does the tmp directory affect things—does it constantly fill up with data? alternatively, rotate the data?
Could someone kindly explain to me about the tempdir? Why, as there is only 30GB of space available on the root directory for production, which includes tempdir. In this situation, would using the default tmp path have any consequences?

[root@test401 ~]# cat /usr/local/percona/pmm2/config/pmm-agent.yaml

Updated by pmm-agent setup.

id: /agent_id/aaa3467c-32e4-49ae-91eb-397c51d981b7
listen-port: 7777
username: admin
insecure-tls: true
paths_base: /usr/local/percona/pmm2
exporters_base: /usr/local/percona/pmm2/exporters
node_exporter: /usr/local/percona/pmm2/exporters/node_exporter
mysqld_exporter: /usr/local/percona/pmm2/exporters/mysqld_exporter
mongodb_exporter: /usr/local/percona/pmm2/exporters/mongodb_exporter
postgres_exporter: /usr/local/percona/pmm2/exporters/postgres_exporter
proxysql_exporter: /usr/local/percona/pmm2/exporters/proxysql_exporter
rds_exporter: /usr/local/percona/pmm2/exporters/rds_exporter
azure_exporter: /usr/local/percona/pmm2/exporters/azure_exporter
vmagent: /usr/local/percona/pmm2/exporters/vmagent
tempdir: /tmp
pt_summary: /usr/local/percona/pmm2/tools/pt-summary
pt_pg_summary: /usr/local/percona/pmm2/tools/pt-pg-summary
pt_mysql_summary: /usr/local/percona/pmm2/tools/pt-mysql-summary
pt_mongodb_summary: /usr/local/percona/pmm2/tools/pt-mongodb-summary
min: 42000
max: 51999
debug: false
trace: false
[root@test401 ~]#

I don’t know all the things that use tempdir but the one I do know is pmm-agent (technically vmagent) caches metrics there should the pmm-server be unreachable (i.e. offline mode). By default it will store 1GB of “offline” metrics and then start dropping the oldest metrics in favor of new ones once the file hits max size. Once the pmm server is back online the metrics will drain and the space freed up.

1 Like

@steve.hoffman , thank you very much.

I now have clarity, so we can move on with the production servers.