I am working in NodeJS and started to implement a queue system. I have the que system writing to files on the tmpfs directory. Is the tmpfs directory memory resident so I dont wear out the flash?
Yes, tmpfs is in RAM, so no problem with writing a lot there.
It seems that reading from the que is slower than writing, maybe 3-4 files a second vs writing files at about 50 a second.
That is strange - I see no reason why there should be any noticeable difference between reading and writing to tmpfs.
Of course it depends on the exact access pattern - if you write in large blocks at a time but read in tiny chunks, then there will be a performance difference due to system call overhead etc.