Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted July 15, 201311 yr wondering if anyone has ever run cache from ram and if so are there any problems? thanks.
July 20, 201311 yr sorry for not being helpful with your answer, but why not a SSD?i think the issue here can be on generated files which you might loose on a reboot or power failure
July 20, 201311 yr Wondering how to do that.. well i have 32GB RAM server and could put 1GB for xcache... hack it would be a lot faster... But question is how to..
July 29, 201311 yr firt i would copy all file to some place, make a ram disk and copy files back, i would also copy/sync files to a disk periodicallyfor the ram disk in cache dir i would use a bind mount..however im still wondering how useful is this, SO fs cache should take care of this files
July 29, 201311 yr Author honestly have not had a free moment to even mess with this. as it stands I have 10-12gb ram thats not being used
July 30, 201311 yr well i dont think this can be a good idea, but here you go: $ sudo mount -t tmpfs -o size=123m none /mnt/boot-sav/ $ mount none on /mnt/boot-sav type tmpfs (rw,size=123m) $ dd bs=1M count=100 if=/dev/zero of=/mnt/boot-sav/test conv=fdatasync 100+0 records in 100+0 records out 104857600 bytes (105 MB) copied, 0.126435 s, 829 MB/s $ dd bs=1M count=100 if=/dev/zero of=/home/user/test conv=fdatasync 100+0 records in 100+0 records out 104857600 bytes (105 MB) copied, 2.07991 s, 50.4 MB/s then i would COPY this directory and bind mount it in ramdisk, after that, rsync files from cacheInDisk to cache (ramdisk)afterwards this should be done in the opposite way periodically to not loose anything and survive reboots without human intervention, and (not sure how) have the board survive with/without cache mounted in ramalso someone already took care of most of this, check: https://github.com/graysky2/anything-sync-daemon
July 30, 201311 yr Author I'll read up on that, thanks. not committing to any particular setup yet, want to really study the setups and how to recover if anything goes bad.
July 30, 201311 yr It would be better/more sane to just use APC and up the SHM size a bit. Also, when you have so much memory available, it's not all just sitting there unused. Your free memory is used for disk caching. Meaning, files that are frequently used are already likely loaded into RAM. So a ramdisk can actually give you no benefit while just introducing a risk of data loss.
Archived
This topic is now archived and is closed to further replies.