MariaDB tmpdir & table copy operations
I think it is a bad idea to rob space in RAM for things other than innodb_buffer_pool_size.

Furthermore, your example is flawed.  An ALTER that needs to copy works this way:


Create tmp table and populate it;
"Move" the table into where the original table is.


Step 2 is the issue:


If the tmp and the original are in the same filesystem, these are fast operations involving the directory.
If they are in different filesystems (and tmpfs is definitely different), the "move" is really a more-costly "copy".