<html><body><div style="color:#000; background-color:#fff; font-family:bookman old style, new york, times, serif;font-size:10pt"><div style="font-family: 'bookman old style', 'new york', times, serif; font-size: 10pt;"><span><br></span></div><div style="font-family: 'bookman old style', 'new york', times, serif; font-size: 10pt;"></div><div style="font-family: 'bookman old style', 'new york', times, serif; font-size: 10pt;">Hi all,</div><div style="font-family: 'bookman old style', 'new york', times, serif; font-size: 10pt;"><br></div><div style="font-family: 'bookman old style', 'new york', times, serif; font-size: 10pt;">I have been looking at lowering the time spent in I/O while using fread on a csv file. Following a suggestion on the mailing list, I attempted to use fread on a csv file stored on a ramdisk. It took 5 times longer to read from the Ram Disk than it did to read from the SSD.</div><div style="font-family: 'bookman old style', 'new york',
 times, serif; font-size: 10pt;"><br></div><div style="font-family: 'bookman old style', 'new york', times, serif; font-size: 10pt;">I presume this has to do with the fact that the data is being copied from RAM to RAM rather than from Disk to RAM.</div><div style="font-family: 'bookman old style', 'new york', times, serif; font-size: 10pt;"><br></div><div style="font-family: 'bookman old style', 'new york', times, serif; font-size: 10pt;">Any suggestions on if there are alternative methods to read files in faster using a RAM Disk would be very helpful.</div><div style="font-family: 'bookman old style', 'new york', times, serif; font-size: 10pt;"><br></div><div style="font-family: 'bookman old style', 'new york', times, serif; font-size: 10pt;">Benchmarks on time taken for reading from SSD vs Ramdisk on the same 416MB file is given below</div><div style="font-family: 'bookman old style', 'new york', times, serif; font-size: 10pt;"><br></div><div
 style="font-family: 'bookman old style', 'new york', times, serif; font-size: 10pt;">####</div><div style="font-family: 'bookman old style', 'new york', times, serif; font-size: 10pt;"><br></div><div><div><font size="2">> timer = proc.time(); z <- fread("testInRAM.csv"); proc.time() - timer</font></div><div><font size="2">   user  system elapsed </font></div><div><font size="2"> 25.067   0.433  25.485  ##### Read from RAMDisk</font></div><div><font size="2"><br></font></div><div><font size="2">> setwd("/Users/xbsd/")</font></div><div><font size="2">> timer = proc.time(); z <- fread("test.csv"); proc.time() - timer</font></div><div><font size="2">   user  system elapsed </font></div><div><font size="2">  5.507   0.177   5.680   ###### Read from SSD</font></div><div><font size="2"><br></font></div><div><font size="2">> system("ls -alh
 test.csv")</font></div><div><font size="2">-rw-r--r--  1 xbsd  staff   416M Jul 12 19:30 test.csv</font></div><div><font size="2"><br></font></div><div><font size="2">> system("ls -alh /Volumes/ramdisk/testInRAM.csv")</font></div><div><font size="2">-rw-r--r--  1 xbsd  staff   416M Jul 12 19:32 /Volumes/ramdisk/testInRAM.csv</font></div><div><font size="2"><br></font></div><div><font size="2">Thanks in advance,</font></div><div><font size="2"><br></font></div><div><font size="2">- Raj.</font></div><div><font size="2"><br></font></div></div><div style="font-family: 'bookman old style', 'new york', times, serif; font-size: 10pt;"><span class="Apple-style-span" style="font-family: Verdana; font-size: 12px; line-height: 14px;"><div><br></div></span></div></div></body></html>