# mkdir /mnt/tmpfs /mnt/ramfs
# mount -t tmpfs -o size=100m tmpfs /mnt/tmpfs
# mount -t ramfs -o size=100m ramfs /mnt/ramfs

For instance, you can Using that for mysql tmp tables if you need it:

tmpdir = /mnt/tmpfs

(Necessary it or not you can know like that:)

SHOW GLOBAL STATUS LIKE 'Slow_queries';
show global status like ‘%Created_tmp%’;

first number – Tables which created in HDD, second – in RAM
You can increase also:

max_heap_table_size tmp_table_size

Dramatically way of course it using RAMFS partition for tmp tables.