Optimum swap file size with 2gb ram




















This article was written in , and he told me later that he now recommends zero swap space. I'm a bit old fashion, as I still support the idea of twice the physical RAM. That normally works as I aim for 8 GB for a two core system, which most of mine are. That keeps it simple and easy to remember. The only time I run into trouble is when I try to use pan2 for Usenet. Even with that much swap space, it can't handle the retention on NewsDemon.

It once ran for 84 hours and used up all of the swap space downloading headers before it crashed with a segmentation fault. Unless I plan to over commit on the number of apps I run, I don't use swap space. As for hibernation, I never turn my systems off. You have to aim for 4GB total. In the latter, that leaves about MB of shared Vram.

But Swap files are extremely bad for SSDs. They wear out the SSD quickly. So it's better to not have swap nor hibernation files, as most low end hardware usually has pretty good sleep states.

If you have enough RAM, in my opinion you don't need any swap at all. And in the latter, lower texture quality performs a lot better than running into swap.

Another thing is that when you must have swap, at least make sure it is encrypted, as otherwise it defeats the purpose of any encryption you may use. Getting this to work with hibernation is left as an exercise to the reader. Usually you give a little more, for lack of a precise estimate of space requirements — which actually should be present in somebody's mind, and a great thing to learn about I think that it depends on your environment.

In my case, I have a lot of VMs. The majority of the VMs are either web servers or app servers. Given that we know exactly what's running inside JVM with limited heap size, httpd, monitoring tools, And I think that in a virtual environment, you already have the overhead of the hypervisor.

And as a result swap in such an environment does not speed up things much. So, if you can, it is better to rely on RAM. On a physical server, swap space may have more sense.

This is not something worth spending much thought about. When I have looked at what my system is actually using with a monitoring tool, swap only rarely comes into play. Given the slow speed of hard drives, that much swapping, regardless of RAM size, would cripple performance. I maintain a similar philosophy today, but with larger numbers due to much much larger RAM sizes and much much faster storage.

I will typically allocate GB of RAM to swap, primarily because I'd rather suffer a performance hit from swapping than have the kernel start terminating processes when memory runs out. But I still believe that if you encounter any significant amount of swapping, then you really need more RAM.

When creating virtual machines, that's a little different. I often create them with limited RAM GB because they're not running a GUI generally accessed via ssh sessions , run minimal daemons in the background and I don't want to take more than necessary from the host environment. I will create a large 8GB swap partition in order to handle a worst-case scenario where I've woefully underestimated my RAM requirements and monitor the amount of swapping that takes place.

I'll increase the RAM allocation as necessary to keep swapping to a minimum under expected loads and leave the swapfile to be available when loads are higher than expected. Either equal to the amount of installed RAM or none. There are two factors to consider, when making this decision.

I also prefer to fully shut down instead of ever hibernating. I suppose it could be useful on a system with a less or slower RAM, but realistically, I just don't think it's necessary for the majority of use cases.

Otherwise sistem will not hibernate or suspend correctly. I still almost double the ram: even with 32Gb of ram I often run out of memory while loading heavy 3d scenes. The only situation where I see swap space a must is editing large photos, like big panorama, with gimp: a lot of ram is needed, and if you don't have enough swap space, your system freezes and you are going to loose all your work. At university, at the computer laboratory where we spent our time analysing DNA sequences, there was a big DNA sequence alignment experiment I was trying to perform for phylogeny production.

The lab server computer had about 19GB of SWAP and probably 12GB of RAM I had helped set up months before and could not increase it further for a series of reasons at the time namely, I was not able to increase swap space with my then-Linux-knowledge and could not reinstall everything because the server had Windows on it, with lots of data from other people But I remember that the experiment algorithm I was using to process that data needed just a little more than 20 GB If we had , my experiment could have turned out to work out eventually I use a swapfile instead, which can grow dynamically.

My swapfile is mounted on my root partition, which I have given 64GB to. Of course, I never go that high, probably the most resource-intensive thing I ever run on my computer it's not even a computer, it's just a crappy tablet with a keyboard from my school with 4GB RAM is Android Studio.

Suspend to RAM is sufficient and works really well. Interesting article. I now know that I have 2G of Swap on Ubuntu Different people have a different opinion on ideal swap size. CentOS has a different recommendation for the swap partition size. It suggests swap size to be:. Ubuntu has an entirely different perspective on the swap size as it takes hibernation into consideration.

If you need hibernation, a swap of the size of RAM becomes necessary for Ubuntu. I know it is confusing. This is why I have created this table that will give you the Ubuntu recommended swap size based on your RAM size and hibernation need. The answer is never simple. As I stated earlier, for a long time, swap has been recommended to be of double the size of RAM. Also a movie buff with a soft corner for film noir.

Great Article but You should have mentioned the table more adding maxiumuim section to it in this shape it will look like. I had 32g swap as a match to my 32g ram but it would freeze a lot when I changed it to 7. Maybe some programs are intended to use swap.

Maybe you could change the swapiness value to experiment if you want. The comments by "Jeh" seem to be the most informative. I have followed been following such discussions since Windows XP was released. I tested it myself years ago, but I leave open the possibility that I didn't use the best possible custom settings or I didn't use the most relevant benchmark.

My personal conclusion that if you leave these settings alone XP will do the best possible job on its own. The only think I personally interested in reading at this point is hard evidence , by which I mean properly done benchmarks showing how custom settings have a clear performance advantage over XP's default.

Without the benchmarks everyone is more or less just guessing and speculating. Feb 23, 0 18, 0. I've had a gig for a long time and have never used it all, but I don't play the latest games. I've heard of a lot of people using ramdrives allocating memory as a seperate disk and using it as your page file.

Your setup sounds just fine though my own speculation. Shinobi Distinguished. May 24, 11 0 18, 0. Leave it off, there's no point in using one. Makes for a way speedier computer not messing with that crap. I have Never filled all two gigs with any game or application. Photoshop uses its own little swap system. Synergy6 Distinguished. Dec 8, 0 18, 0. I upgraded from 1 to 2GB exactly so the paging file would be unnecessary, so turning it on seems rather self-defeating. The most memory I've ever used at one point was in GRAW, with all the textures preloaded into memory, at 1.

If you claim never to go over your physical memory then why bother turning off the page file? So there is no harm having virtual memory just in case. If the need is real the memory can imediately be made available because there is a copy on the HD.

If not then zero harm because there is still a copy in memory and the anticipatory transfer was done when the CPU is idle. Either that or show me technical info on Windows Virtual Memory Manager that shows that MS chose to implement it in some retarded fashion.

But given how crucial memory management is to the performance of an OS I wouldn't bet on Microsoft getting this one wrong. I think Microsoft would rather you left it on "let windows manage swap file" because this would ensure that people aren't messing with the settings.

Let's face it, alot of people make changes, and will change several things at once, then when trouble happens, they aren't sure what the offending change is. If people are led to believe that windows managing swap file is the best setting, they won't experiment I find that, if you want to know how much RAM you'll need, after a reboot, load up your machine with as much running as you can I've had 20 some browsers open, every program i have, games.

Then open the Task Manager and , under the performance tab, look at "commit charge k ". It will show you how much RAM is available, how much is in use presently and what your highest peak usage was. May 29, 5 0 18, 0. Optimal setting would be 1. However, the upper limit is then restricted by the amount of storage on the hard drive. Hence, it is not advisable to set the maximum value of the Pagefile to something that would significantly affect your storage.

There is still to decide what one should set the Pagefile size to, even after Microsoft has designated the upper and lower limits. For that, we suggest that you adapt the technique below to know what the actual size of the Pagefile ought to be. You can now figure out what the size of your Pagefile should be, which needs to be just over the amount that is being used.

Now that we know what the size needs to be so that the system has optimal performance and the storage space is not compromised, let us dig into how you can change the Pagefile size. You can set your Windows 10 to stop managing the Pagefile size and define the upper and lower limits yourself. Use the guide below to customize the Pagefile size. You can now check that the Pagefile size has been set to the minimum value you have allotted, increasing to the maximum value over time.



0コメント

  • 1000 / 1000