ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > Living Room

Anyone else using Ramdisk in Windows 7?

<< < (12/14) > >>

f0dder:
Don't see the point of those fixed size partitions these day, really - for the same reasons as my arguments against the fixed-size windows paging file. There were technical reasons for it back in the olden days, but Linux has supported file-based swap for a while now.
--- End quote ---
It supported file based swap when I was using it. It's just that partition based is more efficient. Read how it works with partition based swap before making assumptions.-MilesAhead (September 01, 2011, 05:52 PM)
--- End quote ---
Care to back that up with facts, for recent kernel versions? :). Same as with Windows: allocate a intelligently sized swap file, and it won't fragment. As for access, here's from LKML:> 3. Does creating the swapfile on a journaled filesystem (e.g. ext3 or
> reiser) incur a significant performance hit?

None at all.  The kernel generates a map of swap offset -> disk blocks at
swapon time and from then on uses that map to perform swap I/O directly
against the underlying disk queue, bypassing all caching, metadata and
filesystem code.
--- End quote ---
(The question is a bit different, but the implications are the same).


I notice your post is filled with implications such as "blindly follow" etc.

So your remedy is to blindly follow you instead of my 16 years of experiences using and watching my systems? Tsk tsk.  Debate tactics rather than argument.-MilesAhead (September 01, 2011, 05:52 PM)
--- End quote ---
It's a piece of opinion - take it for what you like. IMHO it's got good arguments going for it, and it's worked fine on my laptop (which doesn't have endless amount of memory) for years. The fixed-size argument is something I've seen regurgitated for years, and I don't agree with it - so obviously I'm going to object when I see it given as as a suggestion to others.

"What's best" shouldn't even be asked until you ask "how to you use your system?"  Otherwise it's just tail chasing.-MilesAhead (September 01, 2011, 05:52 PM)
--- End quote ---
Indeed. And while YOU might not run out of memory, you can't really know about other people's usage patterns... and thus suggesting that setting a maxsize isn't really a good idea.

PS: the one argument for swap partitions I can think of, is if you want to control the physical location on disk for access time reasons... but if you're about to do that, then you have a server with severe memory problems, and should be investing in more RAM, seriously. And just as a preemptive snarky comment safeguard: system pagefile != database scratch areas.

Edvard:
Linux has supported file-based swap for a while now.
--- End quote ---
Hold the phone!
What's that?... File based swap?
(startpage-google-yippy-duckduckgo)

You mean like this?
http://blog.mypapit.net/2007/07/how-to-add-linux-swap-file-if-you-dont-have-swap-partition.html

That's awesome!  :Thmbsup:

vlastimil:
For record, I have swap turned off on 8GB system and I guess I'll be fine for a couple of years.

Fixed size swap: good if you are like me and constantly have all hard drives 99.9% full (I cannot help myself  :-\ ).
Unlimited swap size: if it happens that Windows needs a swap size of more than 2x your physical memory, it will be extremely sluggish, practically unusable. In my opinion, it is better when an app crashes due to unavailable memory than waiting 5 minutes until Windows swaps-in the task manager so you can kill it yourself.

MilesAhead:
@f0dder, I think it's pretty much a distinction without a difference. Again we are back to usage. If some dude loads up his 10 GB spread sheet once every six months and thereby forgets to account for it in settings due to the infrequency, it could conceivably crap out on him. Your settings may safeguard in that case.  But I never use 10 GB spread sheets. So I don't see the advantage of guarding against what's never going to happen. I don't loan my PC out for others to use.

For me, min=max when using swap at all is more than sufficient.

I'm not about to load Linux to gather stats. If they improved swap file that's fine but by the very nature of file systems I would tend to guess the partition swap is a lot closer to the low level calculations that file systems use to manage the files. Therefore it's awfully likely there's another layer on top of that for the file system that's not there for the partition management. t's pretty much who owns how many blocks on the partition where. Can't get much simpler. One virtue of running a slow 486 with 12 Mhz bus was that any optimizations could be felt viscerally. I didn't have to run a benchmark.  The machine was so slow I could see and feel the difference in responsiveness.  Also watching the disk LED. Partition was noticeably faster. I ran comparisons when setting up my swap scheme(and yes I ran them forward then back to disallow any file system caching).

Swap Partition placement does make a difference.  Since my 2 physical drives had such a speed and size disparity I was prevented from doing all swap on the non Linux drive.  But I put the swap partition on the fast disk hosting Linux between the 2 partitions I used for Linux file system.  Tended to swap back to center rather than making wide swings to fetch. Not much thrashing at all esp. with supplemental swap on the other physical drive.  Also I did have settings if the universe changed and I had some giga-unimaginable memory requirement, a swap file was created on the fast disk.



But either method would work. Right now I'm back to running no swap since I tend to use light weight processes. Resource meter tends to show this machine running with almost a GB of memory on Stand-by. I don't think it's going to crash loading Firefox if I already have Chromium open.

But, if someone used either method I don't think they'd notice the difference. All I can tell you is in all these years of running swap min=max whenever I check it with PageDefrag it shows one big chunk. Like years after I set it up that way. Once I got a PC with 2 GB then I got away from swap altogether. My 8 GB machine sure doesn't need it for my use.

40hz:
If they improved swap file that's fine but by the very nature of file systems I would tend to guess the partition swap is a lot closer to the low level calculations that file systems use to manage the files. Therefore it's awfully likely there's another layer on top of that for the file system that's not there for the partition management.
-MilesAhead (September 02, 2011, 01:45 PM)
--- End quote ---

Actually, swap in Linux is a lot more accessible and tweakable than it is in Windows. And better documented. If you have multiple swap spaces you can prioritize which gets used first. You can  temporarily or permanently tweak what set of conditions triggers a swap ("swappiness"). You can also very easily enable or completely disable swap from the command line. I tend to do that on machines with a lot of RAM. I'll enable swap only if I'm doing something that needs it. Then I'll disable it afterwards.

Good two part article on it here. Part-1 gives the main details. Part-2 gets into tweaking.

You can also temporarily or permanently swap to either a swap partition - or a swap file on a regular partition. That comes in handy if you ever discover you didn't create a big enough swap partition for your requirements. A swap file fixes the problem very nicely until you  around to resizing some partitions (also easy to do in Linux) to give you a bigger space if you prefer to keep swap on its own partition.

Yessir! Swap is a whole 'nother beast on Linux.  :Thmbsup:

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version