Primo Cache's cache on a RAMdisk?

FAQ, getting help, user experience about PrimoCache
InquiringMind
Level SS
Level SS
Posts: 477
Joined: Wed Oct 06, 2010 11:10 pm

Re: Primo Cache's cache on a RAMdisk?

Post by InquiringMind »

I agree, some comments have been on the personal side but we're all generally of the same mind so hopefully we can chill out. :)

One factor that I didn't mention, which I probably should, is with Primo Cache being quite new, a good portion of the testers here will have working ramdisk setups. So there may be cases where people (correctly) attribute increased performance to their ramdisks, but haven't taken the time to check whether Primo Cache alone could do a similar job.
User avatar
Support
Support Team
Support Team
Posts: 3630
Joined: Sun Dec 21, 2008 2:42 am

Re: Primo Cache's cache on a RAMdisk?

Post by Support »

Actually you guys already point out the pros and cons of these two programs. For some more clarity, here are my comments on Primo Ramdisk and PrimoCache.

Primo Ramdisk and PrimoCache are different types of software applications, though they both use RAM to speed up computers. They are independent of each other, so you can install one of them, or both, depending on your demands and needs.
PrimoCache is a cache software application which creates an additional filter layer onto the disk storage layer to intercept Windows read- and write-requests to the disk. If requested data already exists in the cache, PrimoCache serves the request by simply reading its cache. Otherwise PrimoCache fetches data from the disk and store it into the cache, then completes the request.
Pros:
1. Easy to use and no need to do additional settings once you set up the cache. PrimoCache automatically caches interested data of specified partitions and improves disk performance.
2. No error when cache is full. PrimoCache automatically discards some old cache data and stores new one. Windows read and write requests won’t be affected.
3. No data loss or corruption will happen ( Defer-Write is not enabled) on abnormal scenarios such as system crash and power outage because data in the cache is only a copy of the source disk and it still can be obtained from the disk.
Cons:
1. Has additional RAM cost because PrimoCache has to maintain its cache data information.
2. Performance is not good as Primo Ramdisk because PrimoCache has additional cache schedule. Another reason is that data stored in the cache might be discarded when cache is full and PrimoCache has to read the physical disk again to fetch the data on next time this data is requested.
3. Cannot cache the explicit things you want as PrimoCache is implemented by a block-level mechanism.

Primo Ramdisk is a simulator software application to create virtual disks by using RAM. All Windows read and write requests to virtual disks are done in RAM without accessing physical disks.
Pros:
1. Speed is faster than PrimoCache because all requests are done in RAM and no additional schedule.
2. No additional RAM cost.
3. Can choose the explicit things you want to the virtual ramdisk.
Cons:
1. Need additional settings after you create a ramdisk to make it useful otherwise it is only an empty virtual disk. You need to set up something to tell Windows to access the ramdisk for interested data. For eg, changing some temporary paths of applications to the Ramdisk.
2. Windows pops up “disk full” error when ramdisk is full. So usually you need to create a large-enough ramdisk.
3. Data will be lost on system crash, power outage, and so on.

In general, PrimoCache has better usage than Primo Ramdisk. However, in some scenarios, users might prefer Primo Ramdisk. These scenarios include but not limited to:
1. Using ramdisks as download disks for p2p software to store internet downloaded files,
2. Using ramdisks as share disks to share files in a company,
3. Using ramdisks as video-editing scratch disks,
4. Using ramdisks for static web server,
5. Using ramdisks to store temporary files for many applications.

Another discussion is about the image file feature provided by Primo Ramdisk. Some users may install frequently used applications on a ramdisk with image file enabled. Obviously it will increase the boot time because Primo Ramdisk will load the image file to the ramdisk at the boot phase. However sometimes it is worth. Primo Ramdisk loads the image file by sequential large blocks read. This sequential read method is much faster than the random small-size read method. So the time of loading image file is much less than the total time to load all applications one by one.
User avatar
Support
Support Team
Support Team
Posts: 3630
Joined: Sun Dec 21, 2008 2:42 am

Re: Primo Cache's cache on a RAMdisk?

Post by Support »

PS1. PrimoCache and Primo Ramdisk can work togather on a computer at the same time, but this doesn't mean to set up a cache on a ramdisk or use ramdisk as a level-2 cache storage. It is totally a waste to do such things.

PS2. You can cache a partition and redirect some file paths in this partition to a ramdisk by junction-point or mklink. Paths/Files that are redirected to the ramdisk will never go to the cache layer and be cached by PrimoCache. So there's no waste on doing such setting.
4EverMaAT
Level 3
Level 3
Posts: 13
Joined: Thu Feb 20, 2014 12:39 am

Re: Primo Cache's cache on a RAMdisk?

Post by 4EverMaAT »

InquiringMind wrote:.........
Mradr wrote:With PrimoCache, a user doesn't have to care if the ramdisk becomes full as it'll either stop filling up or simply make room for it...With a ramdisk, if you come up too short, you run into disk space issues or a program crashing, if too much, it waste some ram space as that space will never be filled up if the program never uses it.
A hybrid ramdisk can get around that problem as noted above (it cannot hold a pagefile though - anyone using a ramdisk in this fashion should consider multiple ramdisks, fixed size for the pagefile and hybrid for everything else).
Are you suggesting that placing the system pagefile within a ramdisk is a good idea? I've read a lot of conflicting information, mostly against doing this. Can you explain why one would put the system pagefile in a ram disk, and what benefits/drawbacks would this have? Any specific requirement for the ramdisk?

I've observed windows paging stuff for many of my programs even though I have more than enough ram, and I always wondered wtf?
support wrote:Actually you guys already point out the pros and cons of these two programs. For some more clarity, here are my comments on Primo Ramdisk and PrimoCache.......
viewtopic.php?f=33&t=2302&start=30#p6125
This type of summary was exactly what I was looking for in the FAQs for both products, but I could not see it on the product pages. And google searches were somewhat limited. Most of the information was on ram DISKS; little was on ram CACHE except for the product pages of SuperCache and PrimoCache. I, too, went through this entire thread of passionate discussion, but needed a concise breakdown and comparison like this, preferably from the developers. That post should be a sticky, or put on a dedicated html page explaining the differences, with the ability to add comments.

I tried to get a better understanding of how each of the different caches worked together with PrimoCache. How does windows services like Superfetch, prefetch, bootfetch respond with PrimoCache working? What about hard drive speed enhancers like ReadyBoost?
support wrote:....
PS2. You can cache a partition and redirect some file paths in this partition to a ramdisk by junction-point or mklink. Paths/Files that are redirected to the ramdisk will never go to the cache layer and be cached by PrimoCache. So there's no waste on doing such setting.
So, unless you are loading entire programs and related working folders into a single ramCache drive, then the ramDrive can only offer some benefit to a specific program, and only to that program's use of the files/folders placed in the ramdisk?

For example, say you were to have PrimoCache on the same drive as your web browser, video editing software, [read/write intensive program]. Then you wanted to also implement ramdrive to redirect (junction-point/mklink) the temp/rendering/etc folders of those programs so that you do not to saturate the L1 cache or delay-write capacity of PrimoCache. Is this a good example of maximizing the positive use of both programs without unnecessarily duplicating their efforts?

In this scenario, do we have to use Primo RamDisk specifically, or any disk/ramdisk where files are redirected via junction / mklinks automatically bypass PrimoCache?

Is it possible to designate specific programs on a PrimoCache-monitored partition to be exempted from L1,L2 caching, and/or delay write?

Pardon my misunderstandings if I do have any. Feel free to reword my example or provide a better example. I actually became interested in this stuff because I am currently doing tick data backtesting for financial software (metatrader 4). Only uses 1 core per instance to process each backtest, and tick data files can easily be 0.4-1gb per year. I'm trying to test 3-4 years at a time, and I have the ability to run about 3 separate instances of the same backtest program (on the same data file). I have 12gb ram on i5 3rd gen acer laptop (ssd, sata II with win 7 64 bit + hdd in cd rom bay) and I noticed that 8-10gb were just idle many times. I was looking for a way to speed up the backtests. I'm already using SSD for the backtester and data file location (vertex II /sata2), but I can't stand not being able to max out the ram or GPU, although it seems that the CPUs can get maxed on longer tests, and it may be having an effect on running multiple tests concurrently.

I not really an overclock/tweak enthusiasts, but I will change a configuration for a specific short term benefit or an acceptable long term benefit. The ramdisk/ramdrive is a very intriguing concept, and I want to dive into it 'correctly'.
InquiringMind
Level SS
Level SS
Posts: 477
Joined: Wed Oct 06, 2010 11:10 pm

Re: Primo Cache's cache on a RAMdisk?

Post by InquiringMind »

4EverMaAT wrote:Are you suggesting that placing the system pagefile within a ramdisk is a good idea? I've read a lot of conflicting information, mostly against doing this. Can you explain why one would put the system pagefile in a ram disk, and what benefits/drawbacks would this have? Any specific requirement for the ramdisk?
Whether having a pagefile on a ramdisk is a good idea depends on your system setup - in many cases it won't be of noticeable benefit since the speedup you gain from faster pagefile access will be countered by having to access that pagefile more often, due to losing the RAM allocated to the ramdisk.

The situations where having a pagefile on ramdisk may be a benefit are:
  • "Invisible memory" - since Primo Ramdisk can access memory outside Windows' limits (3.25GB on 32-bit versions, 16GB on 64-bit Win7 Home Premium, etc), having a pagefile on a ramdisk using that memory is a win-win situation. You're using memory that cannot be accessed normally and the pagefile effectively turns that invisible memory into virtual memory.
  • Eliminating disk activity - as you note, even with plenty of RAM spare the pagefile still gets used. If you rarely/never get close to using all available RAM, then allocating some of that spare for use as a pagefile may give a small performance benefit with disk-intensive applications. Not using a pagefile is another option for this case (this article goes into some depth about the impact with Win7).
  • Privacy/security - If you have sensitive data on your system which is normally encrypted, a pagefile could end up containing unencrypted segments. Having that pagefile on a ramdisk will ensure any such data is lost when the system is turned off.
Bjameson
Level 6
Level 6
Posts: 62
Joined: Mon Nov 08, 2010 12:00 pm

Re: Primo Cache's cache on a RAMdisk?

Post by Bjameson »

I have also been thinking and trying numerous setups to find benefit in combining PrimoCache and Primo Ramdisk. I could find none. The "best" setup was as follows:

- A 2 TB spinning disk with a VM on it. VMware, Virtualbox or Hyper-V makes no difference. All three are perfectly cacheable.
- A 256 KB RAM L1 (R/W) and a 16 GB L2 on a Primo RAMdisk. The RAM disk was backed by an image file on SSD.

My assumption was that the most read VM blocks would be written onto L2. Writing was fast. Reading back the blocks from L2 would also be fast because L2 was reading from the RAMdisk. I only needed a small L2 because it would never overflow. The oldest blocks are deleted to make room for new blocks.

It worked, and it was indeed fast. Upon shutdown Primocache would flush L2 to the RAMdisk and after that the RAMdisk would be flushed to SSD. At least, that's what I thought because the RAMdisk driver loads before the cache driver. So I assumed that they would unload in reverse order. In reality L2 would always be blank upon reboot. I could not make its contents stick. L2 on a SSD does stick. Tried other RAMdisks too, with the same result. Manually flushing L2 and then manually saving the RAMdisk just before shutdown made no difference.

Even if it had worked, the pre-loading of the RAMdisk from SSD would take too much time. I decided it was better to allocate more RAM to L1 and put L2 directly on SSD. That's because L1 directly is (presumably) faster than L2 on a RAMdisk.

I could not find any benefits, nor could I find any major disadvantages of putting L2 onto a RAMdisk. One small disadvantage of L2 on a SSD is that heavy copying or writing to the cached volume (the spinner) results in equally heavy writes to the SSD which holds L2. Another minor disadvantage is that L2 on a RAMdisk wont stick (at least on my system).

So my conclusion (for what it's worth) is: Heavy database operations and video rendering are best done on RAMdisk. It's faster and won't cause useless writes to L2 on SSD. Running VMs from RAMdisk is superfast but few have the RAM for it. It's fine to run VMs from the L1 and L2 cache. Putting L2 onto a RAMdisk has no adverse effects. Since L2 won't stick anyway, you can save yourself the trouble of backing up the RAMdisk to an image file. It saves you useless pre-loading time. Even though it's rather useless, I find it an amusing idea to run my L2 from a RAMdisk. Not because it's faster, but because I CAN. LOL.
4EverMaAT
Level 3
Level 3
Posts: 13
Joined: Thu Feb 20, 2014 12:39 am

Re: Primo Cache's cache on a RAMdisk?

Post by 4EverMaAT »

InquiringMind wrote:
4EverMaAT wrote:Are you suggesting that placing the system pagefile within a ramdisk is a good idea? I've read a lot of conflicting information, mostly against doing this. Can you explain why one would put the system pagefile in a ram disk, and what benefits/drawbacks would this have? Any specific requirement for the ramdisk?
Whether having a pagefile on a ramdisk is a good idea depends on your system setup - in many cases it won't be of noticeable benefit since the speedup you gain from faster pagefile access will be countered by having to access that pagefile more often, due to losing the RAM allocated to the ramdisk.

The situations where having a pagefile on ramdisk may be a benefit are:
  • "Invisible memory" - since Primo Ramdisk can access memory outside Windows' limits (3.25GB on 32-bit versions, 16GB on 64-bit Win7 Home Premium, etc), having a pagefile on a ramdisk using that memory is a win-win situation. You're using memory that cannot be accessed normally and the pagefile effectively turns that invisible memory into virtual memory.
  • Eliminating disk activity - as you note, even with plenty of RAM spare the pagefile still gets used. If you rarely/never get close to using all available RAM, then allocating some of that spare for use as a pagefile may give a small performance benefit with disk-intensive applications. Not using a pagefile is another option for this case (this article goes into some depth about the impact with Win7).
  • Privacy/security - If you have sensitive data on your system which is normally encrypted, a pagefile could end up containing unencrypted segments. Having that pagefile on a ramdisk will ensure any such data is lost when the system is turned off.

All good points to keep in mind, especially the security aspect. On further inspection, I see that the pagefile does get used, but not nearly as much as I thought. I had a memory monitoring program that had a section labelled "pagefile", but it was including the ram in use as well . I see now the actual pagefile (virtual memory) was more like 100-150MB, which is very good news.
Post Reply