1

I have a server with 30 Gb ram and i have a script that put a (.ts) file (10mb) in /var/www/html/tv and script replace (.ts) file every 2 mintues.

so my question is: can i mount this folder /var/www/html/tv in RAM so all files in this folder /var/www/html/tv will be located in ram and not in hdd

i read somewhere that i need to use a command like this but dont know if this is what i need

mount -t tmpfs none /var/www/html/tv/ -o size=2g

2 Answers 2

3

You probably don't need to do this for such small files.

But if you want, you can use the vmtouch utility to lock a directory into RAM.

2
  • so that was just example, actually i have 100 .ts files which are replaced every 10 seconds and the total size is 1 gb Mar 22, 2016 at 18:24
  • @Gloytoshtyqo Okay.
    – ewwhite
    Mar 25, 2016 at 14:19
1

this command

mount -t tmpfs -o size=4g tmpfs /var/www/html/tv/

will store /var/www/html/tv in ram

u can check it via

df -m

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .