• Virtual ram. Is there any benefit to using a RAM disk? Who needs it and why? ...

    21.01.2014 13881

    The performance of a computer can depend on many components, but the most important of them, of course, are the physical characteristics of the processor and the capacity RAM. Methods that allow you to increase the speed of a computer programmatically, as a rule, have significant limitations, but they should not be neglected. If RAM is much faster than hard drives, why not try storing and processing temporary files directly in RAM?


    This can be implemented using RAM programs Disk from the famous software company SoftPerfect. The program creates a virtual disk in the computer's RAM on which the user can store and process certain temporary files. In theory, accessing these files should be much faster. In addition, according to the developer, the use of RAM Disk will not only increase the performance of the computer, but also significantly reduce the load on the physical hard drive and reduce fragmentation file system.

    Installing SoftPerfect is not particularly difficult. Along with the program, a special driver is installed into the system. RAM Disk has a very simple and convenient user interface with Russian language support. Work in the program begins with the creation virtual disk. If you click the "Plus" button, a window will open in which you will need to set the size of the virtual disk, assign a letter and select the file system type, for example NTFS. You can also create the necessary folders - directory names must be entered on a new line.

    After clicking the “ok” button, the disk will be mounted.

    Size of created virtual disks limited. In this case, the program itself determines the maximum volume that can be allocated for such a disk. You can work with virtual disks in the same way as with regular partitions; you can copy files to them, install programs, etc. True, when you unmount the disks or restart the computer, all data stored on them will be destroyed.

    There are two options here - either copy the data to a physical disk before turning off the computer, or save it to a special SVI image, also located on physical disk. You can create an image in RAM Disk by selecting the “Image” option in the menu.

    In this case, you will need to specify the location of the image file, the size the disk being created and the type of its file system. After the image is created, all that remains is to mount it, not forgetting to check the “Save contents” checkbox. So if you are going to install programs on a virtual disk, choose this method.

    It's hard to say how useful RAM Disk really is. It’s no longer often necessary to perform one-time actions; on the other hand, does it even make sense to create a virtual disk for editing one or two files? However, it's up to you to decide. RAM Disk is distributed completely free of charge, so download, test and draw conclusions. The program is compatible with all popular versions of Windows, from XP to Windows 8 and 8.1.

    Tags: ,

    Skip best effort tasks is a new memory optimization feature in Google Chrome Optimizing RAM consumption is one of the highest priorities facing Google Chrome developers. In the fight for megabytes, any trick is good, even those that at first glance cannot be used...

    On Alex Axler's website, an interesting battle. One of the commentators wrote that he created a RAM Disk in the memory of a Windows computer and transferred “environment variables, the page file and the browser cache” to it. When another asked him why there was a swap file in the RAM disk, which is used (usually) in cases where Windows and applications do not have enough RAM, the third commentator pointed out that some programs require its unconditional presence, and noted that A RAM disk speeds things up a lot. Then the hacking started and the topic became tough. It will be interesting to remember one more thing: some commentators noted a logical point - a RAM disk allows you to save an infinite SSD resource. There is a certain reason for this.

    But what about the page file? And this is interesting. Exists file Windows swap , and transferring it to a RAM disk is somewhat illogical, here the critics are right. In order not to explain for a long time, I’ll say it in charade: “winrar.rar”. Think about it and you will understand why the idea of ​​such a design is absurd. But, there is not only a Windows paging file, but also swaps individual applications, and here... the absurd idea of ​​transferring the swap file to the RAM disk begins to become more logical and logical. In general, it is not entirely correct to call these resources swap files - rather, they are some kind of temporary files. Photoshop Feature and LR, for example, in the fact that they are created in any case - whether you like it or not. And the commentator on the Exler forum was right, he just called it incorrectly, which is why he received harsh, ironic criticism.

    I’ll move a little away from the topic of swapping and tell you what a RAM disk is. I actively tinkered with them back in DOS times, and then it was possible to get them using ramdrive.sys good acceleration for some programs. Then the topic somehow faded into the background; there was no time for ramdisks. But the concept has not changed today - RAM is orders of magnitude faster than disk memory. Even the fastest SSDs (such as OCZ RevoDrive 3 X2, with their read speeds of up to 1500 megabytes per second) cannot compete with the RAM disk located in the main RAM of the computer. What can we say about HDD - a modern 3-terabyte hard drive, for example, transfers data at speeds of up to 158 megabytes per second at the edge of the platter, and only up to 80 MB in its center (be curious - in our review of 3-terabyte HDDs there are specific numbers ). For comparison, when testing the RAM disk with Crystal Disk Mark, I got the following numbers:

    Writing 8 gigabytes (!) per second, reading - five. And this is also measured at DDR3 with a frequency of 1333 MHz, and if you return the settings to the standard 1600, I’m sure the numbers will be even higher. Obviously, the speed of the RAM disk is enormous, and the timings are minimal compared to anything else. Cons? Very serious. If the computer freezes or turns off unexpectedly, everything written on the RAM disk will not be saved. After restart Windows drive will be the purest. You cannot store any work on it - it is unsafe. Actually, that’s why a RAM disk is needed only for storing temporary files and something that you don’t mind erasing, but which will speed up significantly when transferred to a fast drive. Type of temporary files, folders with operational cache etc. Well, you can put the “swap file” there ;-) (see the beginning)

    So, I didn’t think much about it, but for some reason a lot of unrelated acquaintances started talking about RAM disks. Today we sat with podakuni , for example, at the Photoproject school in the evening, they tested a funny new Iomega hard drive (a model especially for Mac) on his MacBook, and he also said that he uses a RAM disk, and on a Mac, and that he transferred temporary Photoshop files and Lightroom. According to him, this greatly speeds up programs. Well, I couldn’t stand it anymore - I came home, found the software and downloaded it. And at the same time I checked something. So far only preliminary, because a more detailed study will take time. The first impression is that yes, a RAM disk in Windows is needed if you work with Photoshop and LR. Moreover, both speed up noticeably on a computer that one wouldn’t dare call weak. Someone manages to get acceleration for other programs, but I’ll ignore this topic for now. And now the nuances.

    By default, Lightroom keeps a gigabyte cache of pre-rendered files (its capacity can be varied), and Photoshop creates a TMP file on the specified drive. And turn off disk usage in such a role indeed it is forbidden. But they can actually be transferred to a RAM disk.

    In the screenshot good example- after opening 14 photos in Photoshop (and closing them), a 2-gigabyte temporary file was created. Let me emphasize once again - the Windows swap file is on my computer completely turned off and the system has 32 (thirty-two) gigabytes of RAM. As you can see, this does not prevent Photoshop from creating temporary files, and if you have a laptop, for example, with a slow HDD that writes at a speed of only 100 megabytes per second, then it needs 20 seconds to create such a file. And he will waste time, no matter how much RAM you feed him. And even fast SSD you will need to spend some resources on this file. As practice has shown, access to this file occurs in the process Photoshop work quite active, both when using plugins, and during operations with files, and during serial processing. With Lightroom the situation is somewhat similar - when you view photos, its built-in engine Camera RAW creates a preview that it places in special folder. You can see where this folder is located in the settings. The files there are small - 500 kilobytes each, but in the process of processing the wedding photography there will be a gigabyte of them, and LR will access them. Thus, there really is a lot of meaning in transference. And considering that these files are “temporary”, there is no need to regret that they will be erased if the computer suddenly freezes or turns off.

    Which RAM disk to choose? As an experiment, I installed Qsoft RAMDisk Enterprise under Windows 7 x64 Ultimate. Russian version of this driver free, and some reviews indicate that this is the best (and most productive) ramdisk for Windows. I can’t refute or confirm, I’ll just say that it started up under my OS, it works and doesn’t ask for money, and that’s already good. I note that the functions include such a thing as resetting and loading the contents of the RAM disk at startup and exit. It is understood that before turning off the PC, the contents are “hibernated” to the main media, and when Windows starts, they are loaded from there into the RAM disk. This allows you to keep the content of such a disk up-to-date and at least somehow combat energy dependence of this type"storage".

    I decided that I would experiment. Does anyone already have experience? It would be great to hear what you think.

    If you often switch between a large number applications and files, then a few seconds of difference at startup is far from a trifle. You probably know that the easiest way to get such a boost is to buy an SSD. But what if you don't have the opportunity to use it? Or maybe you already have solid state drive and you want to save another second or two while reducing disk wear? In this case, you should experiment with a RAM disk - launching applications directly from the image in RAM.

    While writing this article, it was difficult for me to shake off the feeling of déjà vu. I remember about seventeen years ago I created disks in memory to speed up the work of the old “Searchs”, which worked without hard drives. Loading took place from a floppy disk; when loading into memory, a RAM disk was used (an image with software DOS). After loading the image into memory, all DOS utilities were loaded from this RAM disk, and not from a floppy disk, thanks to which the old “Search” worked much faster and the floppy disks themselves wore out less.

    It turned out that the RAM disk is still relevant today. With its help (if you have a sufficiently large amount of RAM), you can speed up your computer (a memory disk works faster than an SSD) or Live USB(the idea is the same as with “Search”), extend the life of the hard drive/SSD.

    Why is this necessary?

    Goals can be absolutely anything. You can either install applications on the RAM disk or use it to store data. Those who like to play can install their favorite toy on the RAM disk, but then the system must have more than 8 GB of RAM.

    The most logical scenario for a RAM disk is computers with conventional hard drives- especially on laptops entry level, Where hard drives They don't shine with performance. True, it will not be possible to completely replace an SSD in this way, if only because of the price. Let's say a 60GB SSD can be purchased for about $60. Organizing a RAM disk of such capacity will be problematic. Firstly, not all computers support 64 GB of RAM. Secondly, finding a module with a capacity of 32 GB is still a problem. At the time of writing, offers on Yandex.Market were mainly for memory with a frequency of 1333–1600 MHz with a price starting from 22 thousand rubles per module.

    To summarize, then best option to use a RAM disk - this is a laptop with a regular hard drive and 8 GB of RAM. Of the 8 GB, 4 GB can be allocated for a RAM disk. The remaining 4 GB is enough for quite comfortable work. And on the RAM disk you can install either one “heavy” application or a set of frequently used applications.

    What do we need

    Firstly, at least 6 GB of RAM, the more the better. Secondly, we will need a 64-bit version of Windows to support large (more than 3.25 GB) amounts of RAM. Thirdly, you need a program to create a RAM disk and work with it. In this article we will look at the Lite version of Dataram RAMDisk. This version is free, but the maximum supported disk space in memory is only 4 GB. Paid version costs $18.99 and supports drives larger than 4GB.

    Setting up a RAM disk

    There is nothing complicated about setting up a RAM disk. First of all, download and install the Dataram RAMDisk program. There are no problems with installation, the program works in both 32- and 64-bit Windows versions(I personally tested its operation in 32/64-bit Windows 7 and 64-bit Windows 8), however, as already noted, the 64-bit version is recommended - this way you can support larger RAM disks.

    After installation, you need to run the configuration utility (Fig. 1) - either through the main menu or directly from the installer. I had a little confusion with the configuration program. At first I didn’t pay attention to the action being performed - by default, the program does not try to create a RAM disk, but to use an existing one (even when starting it for the first time), so when I pressed the Start RAMDisk button, naturally, nothing happened, and I also could not select the RAM size -disk.

    Therefore, the first thing you need to do is select the Create a new FAT disk action, after which you will have the opportunity to set the size of the RAM disk and additional parameters. You also need to select the Save them on shutdown action so that the data written to the RAM disk is saved when the system or disk is shut down. You can select the disk location by clicking the Browse button: do not try to enter it manually, otherwise, every time you press the key, the program will tell you that such a file does not exist and it will be created :).

    The minimum size of a RAM disk is 40 MB (who needs that - I don’t know). The maximum is calculated approximately like this: the maximum amount of RAM is approximately 30%.


    Theoretically, you can click the Start RAMDisk button and start working. But we’re not looking for easy ways, right? Therefore, select the menu command View, Advanced to install additional options. After this, tabs with advanced parameters will appear. So, on the Settings tab you can set the size of the RAM disk, determine the type of file system (you can even create an unformatted disk, and then format it as NTFS using Windows), select the boot sector format, set the disk label and create the TEMP directory.


    On the Load/Save tab, you can enable automatic loading of the disk image at startup, as well as enable/disable saving the image upon shutdown. The Options tab allows you to set various options such as Clear RAMDisk memory on exit - an option for the paranoid, prohibiting compression of the image file on NTFS (Do not compress image file on NTFS filesystems) and others. In my opinion, the only one useful option This is precisely the ban on disk compression (Do not compress image file on NTFS filesystems), since if compression is already enabled on an NTFS disk, I see no point in compressing the disk image again, however, just as I don’t see any point in using compression on NTFS. Why first forcefully reduce performance using compressed disks, and then heroically try to improve it using a RAM disk?

    Now you can press that treasured Start RAMDisk button. When you start the RAM disk for the first time, you will need to install its driver, so in the window that appears, click the “Install” button.

    Next, you need to wait until the RAM disk is created and formatted. Not very good on mine fast laptop This operation took a couple of seconds, which felt like the system was slowing down while the image file was being created. After this, you can work with the RAM disk as with a regular disk.

    If not selected in the program settings automatic download disk at startup, then next time (after the system reboot) you will need to select the Load a saved image action.

    Results

    Fans of numbers and diagrams can run a disk performance test and compare the results with usual hard disk and SSD. In this article, I will not specifically present such results, since in theory (in these diagrams) everything will be very colorful - reading performance will increase by 50 times, and when writing, a 20-fold acceleration will be felt.

    But what will we get in practice? In practice, everything will not be so beautiful, but the results will still be there. So, downloading the same Word 2010 from the usual hard drive takes about three seconds on the average computer. Loading Word 2010 from a RAM disk, the image of which is located on a regular hard drive, will happen twice as fast - in about 1.5 seconds. However, loading the same application from an SSD without any RAM disks takes less than a second. Launching an application from a RAM disk whose image is located on an SSD disk will take less than half a second.

    How to optimize Windows operation by using RAM -disk – created third party software a virtual disk that runs on excess RAM? Below we will talk about carrying out basic operations for the purpose of such optimization. Let's take a closer look at how to create RAM-disk and transfer the contents to it system folders "Temp" .

    1. Creating a RAM disk

    To create RAM-disk in our case the program will be used. It was chosen because of its ease of use, support for the Russian language, but most importantly - due to the ability to save data RAM-disk on hard drive. Let us remind you that RAM can work with data within one session of working with a computer. After the system is rebooted, stored on RAM-disk data disappears. To solve this problem, the developers of some programs to implement RAM-disk equip their products with mechanisms for storing data in special file on your hard drive. When the system is restarted, the saved data is accordingly retrieved and takes its place on RAM-disk. The ability to save data is an optional condition for a program that implements Windows system RAM-disk, if the latter will be used only for storing temporary files (contents of “Temp” folders, browser cache and temporary data of other programs) . But if on RAM- the disk will be stored portable programs, profiles and working directories of browsers, other programs and games, the presence of a function for saving data on the hard drive will be of fundamental importance.

    paid product, at the time of writing, the cost is $29 . But the developers of this program offer to test the fully functional trial version for free for a whole month. This period is more than enough to understand the effectiveness of such optimization and, accordingly, make a choice - RAM-disk or SSD .

    So, let's download and launch the program. Add a new one RAM -disk.

    Fill out the creation form RAM-disk. First of all, we indicate the disk size. Important: this size should not exceed the unused remainder of RAM at the time of maximum computer load . It is advisable not to leave the system with less than 6 GB . Next, select any of the free letters for the disk and set the file system format NTFS. Click "OK".

    Returning to the main window , click menu "Image" and choose "Create an image". Creating and connecting a format image IMG - this is the very mechanism for ensuring data safety RAM -disk mentioned above. It is in this image will periodically record data so that it is available after reboot Windows, and not just during the current session. What, as mentioned, will happen when implementing RAM-disk programs without support for a data saving mechanism.

    In the column you need to write the path to image file – specify the disk partition, folder and come up with a name for the file. If it is planned that RAM- the disk will be used to store some important data, respectively, image file must be created on a non-system disk partition. In the column "Size" indicate the same size that was set for the RAM -disk. For graph "Format", again, select the value "NTFS". Click "OK".

    We will receive a notification that the image has been created.

    If in the future RAM - the disk will be destroyed for some reason and will take away valuable information; it can be retrieved by mounting the newly created one IMG -image – either with the help of the , or through any other program that works with this format.

    So, RAM -disk is created, IMG -the image has been created, now they need to be tied to each other and configured. We return to the main program window. Here in context menu on RAM-disk select .

    A setup window will open. In the column we write, accordingly, the path to the newly created image IMG . Next important point– you must check the box "Save content" . Click the button below "Additional".

    Below in the column we set the time period through which the data RAM-disc must be written to IMG-image. In our case, the optimal option was chosen - every half hour. If on RAM- the disk is not supposed to store particularly important data; you can set a longer interval. In any case, before turning off or restarting the computer, all data will be saved in IMG-image. Click "OK".

    Next, let's go back to the window. previous settings. Click here below "OK", then in the window that appears, confirm the application of the parameters and launch the associated remount operation RAM-disk.

    That's all. will automatically boot with Windows and into background provide work RAM-disk. At any time, the program can be found in the system tray to change settings RAM-disk or not at all delete it. It can be removed very easily– using the option, respectively, in the context menu.

    Intentional deletion RAM-disk does not result in the destruction of the associated IMG-image. It will still be in its place until it is removed manually. From periodic automatic saving data in IMG-we can refuse the image and save data manually only if necessary. For these purposes in the window there is a special button.

    Created RAM -the disk will now appear in Windows Explorer How regular disk. The possibilities for its use, in principle, can be anything, as long as everything happens within the framework of the allocated volume. On RAM-disks with small volumes usually redirect storage cache (or entire profiles) browsers, save paths and other game data, working directories of bulky programs. But first of all RAM-disk send temporary storage folders Windows files"Temp". On the performance of the disk on which system folders are stored "Temp", performance partly depends on how third party programs, and Windows in general.

    2. Transferring the “Temp” system folders to the RAM disk

    Folders "Temp" located on system disk along the way:

    - C:\Windows\Temp,

    - C:\Users\User\AppData\Local\Temp.

    Their transfer to RAM-disk is carried out by editing the values variable environments Windows. For some system processes the company Microsoft provided a standard mechanism for changing values ​​- in particular, changing the storage location of folder contents "Temp".

    First, create a folder "Temp" on the destination disk - to RAM -disk. Next, press the keys Win + Pause. In the system settings window on the left, select additional parameters. In the window that opens, go down and press the button "Environment Variables...".

    The upper half of the window is responsible for the user profile environment variables. Editing values "TEMP" And "TMP" we will change the folder path "Temp" as part of the catalog "AppData". Select a value "TEMP" and press the button "Change".

    We carry out the same operation with the value "TMP", specify the same folder path "Temp" on RAM -disk.

    Next, we move to the lower half of the variable environment window - to system variables. Here we also select "TEMP" And "TMP", these are the values ​​corresponding to the folder "Temp" in the catalog "Windows". Select the values ​​one by one "TEMP" And "TMP" and for each of them press the button "Change". Instead of the current path, write a folder "Temp" on RAM -disk. In the end it should work 4 changed values.

    After editing the environment variable values reboot Windows.

    Moving folder contents "Temp" on RAM The disk also makes access to them convenient. Which will come in handy for cases of allocation under RAM-small volume disk RAM. Folders "Temp" It is necessary to periodically clean them, because they often grow to incredible volumes. You can also clear folders "Temp" according to their previous path on disk WITH to free up extra space on it.