Data not writing to Ramdrive using symlink junction


  1. Posts : 37
    Win7 Ultimate x64 SP1 Dual Boot
       #1

    Data not writing to Ramdrive using symlink junction


    Hello,

    I am trying to move my thumbnails cache from my SSD to a ramdrive, to stop excessive writes and also speed up the cache.
    I am using Dataram Ramdisk, and have moved FF cache, IE cache and temp files, and user TEMP and TMP files (but not system TEMP and TMP, which I moved to a HDD) so far.
    Moving the thumbnails cache is a bit more tricky, but should be doable using junction.
    I have created a 1GB NTFS ramdrive, created a folder TEMP for all the aforementioned stuff, and a folder called Explorer to mimic where the thumbs cache will go. I then saved an image of this drive and get it to load at startup.
    To delete the original folder, I created another admin account, logged in and deleted the Explorer folder at C:\Users\[main account]\AppData\Local\Microsoft\Windows\Explorer.
    I originally used mklink command line to create the junction, then subsequently used Link Shell Extension, which makes life simpler. The problem is, the 6 .db files contained in this folder are created in the ramdrive Explorer folder upon logging back into the main account, but windows doesn't appear able to write to it (which seems odd, as it's just created them!). When opening a folder with pics in, no thumbnails appear, just icons.
    Presuming this to be a permissions issue, I allowed all users, system & admin full control of the ramdrive and the Explorer folder, and re-saved an image. It still won't write.
    I found if I copied the explorer folder into the ramdrive with data already in it, then created the junction, it would cache thumbnails, but would not go above the size of each .db file.
    I'm now pulling my hair out, as I must be missing something simple! Any help would be greatly appreciated. Please don't suggest moving the cache to a HDD, or simply turning the caching off, as I really want to get this to work.
      My Computer


  2. Posts : 1,781
    Windows 7 Professional SP1 32-bit
       #2

    I don't really have a solution for your issue, but to be honest...I do recommend moving your caches to HD. Caching files becomes kinda pointless when you lose all the cache contents everytime you shut down or reboot your PC (that is, unless you save an image of the RAM disk to HD).

    It simply isn't worth it, as there won't ever be so many cache reads/writes that they would be noticeably slower using the HD than they would in RAM.

    As for thumbnails, definitely keep them on, since otherwise all the image files will be read and read over and over again to create the thumbnails. But the thumbs.db files themselves are pretty small and not worth obsessing over - why not just leave them on the SSD?

    Truth is, you'll never completely stop Windows from writing all kinds of temp files and logs to the system partition, even in folders you wouldn't suspect of holding such files. I haven't even mentioned things like spyware/antivirus software and their signature databases yet, or Windows updates which are downloaded to C:\Windows\SoftwareDistribution\Download and then installed to other locations...

    Again, thumbs.db files are relatively tiny (a few 100s of KB at most) so I just wouldn't worry about them.
      My Computer


  3. Posts : 37
    Win7 Ultimate x64 SP1 Dual Boot
    Thread Starter
       #3

    Hi Corazon, thanks for your answer.

    I understand that in the great scheme of things, leaving the cache on the SSD will probably make not a jot of difference to wear levels, all things considered.

    However...I'm a bit OCD when it comes to getting something to work, and this is now really bugging me, so just forgetting about it isn't an option.

    What I really don't understand is why all the other caches and temp files that I have moved can write data to the ramdrive, but the thumbs cache either can't or won't. I have to presume that something in junction is causing a problem, but is this because the ramdrive is seen differently to a normal HDD/SSD. Does windows consider it a removable drive, for instance.

    If anyone using a ramdrive could replicate what I'm trying to do and see if they can solve the problem, I would be very happy, or at least tell me why it's not possible. As I have said, for me this is a learning process as much as the usefulness of getting it to work.

    For what it's worth, the .db files contained in this cache file actually get pretty big. After cleaning the cache I can, within a minute or so, get it up to around 100MB (yes that is meg!) simply by clicking into folders containing jpegs. Have a look at your own cache size, you may be surprised!
      My Computer


  4. Posts : 37
    Win7 Ultimate x64 SP1 Dual Boot
    Thread Starter
       #4

    As an update, I experimented putting the explorer folder on my backup HD, and this works fine, which leads me to think it's how the os sees the ramdrive. I have formatted the ramdrive in NTFS as already stated, and have made it active.

    Any thoughts anyone?
      My Computer


  5. Posts : 1,781
    Windows 7 Professional SP1 32-bit
       #5

    I just re-read your original post and realized I misunderstood you. I thought you wanted to get the thumbs.db files that Windows saves in each folder containing images or videos to save to the RAM disk, but the thumbnail cache is something different of course.

    It could well be because of your RAM disk being a removable disk, but the filesystem won't have any bearing on that. Nor does making it active really make much sense, unless you plan to boot from it somehow.

    Do you have an option in the RAM disk software itself to make it a fixed disk?

    Another option might be to simply turn thumbnail caching off altogether. This is done in Control Panel -> System -> Advanced tab under Visual effects, processor scheduling, memory usage and virtual memory.

      My Computer


  6. Posts : 37
    Win7 Ultimate x64 SP1 Dual Boot
    Thread Starter
       #6

    Yes, making the drive active made no sense, I was getting desperate!

    I have experimented with turning the cache off (using gpedit.msc in CMD), but found it a pain if you have large amounts of pics in a single folder, as each time the folder is opened the icons turn to thumbnails quite slowly, especially when the jpegs are in raw format, or large 4+mb size. With cache enabled, once it's initially loaded the data, it's quick (and would be even better reading data from ram).

    The Ramdisk software has virtually no settings, but I think you're right, it does need the os to think it's a fixed drive. How would I go about fooling the system into thinking it is a fixed drive? More to the point, how does it know it's not a fixed drive (media type?)?
      My Computer


  7. Posts : 761
    Windows 2000 5.0 Build 2195
       #7

    What mklink command did you use? Was it /j? Did you try /d instead?
      My Computer


  8. Posts : 37
    Win7 Ultimate x64 SP1 Dual Boot
    Thread Starter
       #8

    I used the /j and the /d, but if I remember correctly, the /d cannot span drives, or even partitions on the same drive, whereas /j can (or something like that). Whatever, I tried every combination conceivable. Using LSE takes the guesswork out, as it will create the appropriate link itself, all you have to do is select a folder (or file) and a link destination in explorer. It's all mouse right click context menu based.

    I'm now convinced the problem is down to the ramdrive being seen as removable media. What I need is a way to make it "fixed". There must be an answer, as you can make a thumbdrive fixed.

    I'm going to contact Dataram directly to see if they have a solution, as I can't believe I'm the first person who has come across this issue. When I get some sort of answer I'll post it here so it might help someone else in the future.
      My Computer


  9. Posts : 37
    Win7 Ultimate x64 SP1 Dual Boot
    Thread Starter
       #9

    To test the fixed disk theory, I tried using a pendrive. This works sucessfully, which blows that theory out of the water.

    I then got to thinking it must be because the ramdrive isn't active during bootup, so I switched the system off (cache working on pendrive at this time), removed the pendrive, re-started and then after boot and logon, reinserted the pendrive. The os will still write to the pendrive at this stage.

    I'm kinda running out of options now, but the only thing left really is that the ramdrive is a virtual drive, everything else is hardware based.

    Are there any settings/registry hacks/scripts etc to allow the cache to be written to a virtual disk. Of course, I may be wrong about this also, I really am groping in the dark, and would really appreciate some advice if anyone has some.
      My Computer


  10. Posts : 37
    Win7 Ultimate x64 SP1 Dual Boot
    Thread Starter
       #10

    No, sorry, I didn't make myself clear. It see's the pendrive as a removable drive, which makes my whole "fixed" drive hypothesis wrong.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 11:51.
Find Us