Re: Creating Swap Areas

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks, Tim. All of this makes sense, of course. But, it seems that with
today's faster disks, greater memory and CPU speed, it may not be as
vital for most users. It's reasonable, it seems to me, that using files
might yield results undistinguishable in performance.

Similar arguments, for example, might be made that telnet will be nmore
efficient than ssh, but clearly the security overhead of ssh would
generally be judged a cost worth paying.

Given the difficulty of creating new partitions, the value of creating
(or recreating) a file might constitute a worthwhile cost. E.g. Swap
file too small? Create a bigger one. .OR. Not using that giant swap
file? Resize it down and gain a little more room on your disk.

Tim Chase writes:
> >Interesting. Can you say more about why a partition is
> >superior to a file for swap?
> 
> All calls to manipulate a swap-file have to go through the
> file-system stack of system calls...this means that you've got
> the overhead of whichever filesystem you're using.  Things such
> as access-control checks, disk-space quotas, and the possiblity
> of having it scattered across the surface of the disk.  With a
> raw partition, you remove one layer (or possibly more, depending
> on how convoluted your file system is) which helps speed things
> up.  A raw partition also keeps everything contiguous so that
> accesses are faster.  Some of the more modern FS's should help
> cut back on this a bit...I think ReiserFS (among others) works
> hard to keep things quite contiguous, so you may not see the same
> gains there, as perhaps with something a little older (like FAT
> or ext2).
> 
> Oracle (and perhaps other RDBMS's) makes use of this same
> aspect--using a raw partition for faster disk access--to obviate
> the need the overhead of the file system.
> 
> In theory, you could exacerbate the matter by mounting a 
> compressed partition, and then, inside of that, creating your 
> swap file.  This would then have the overhead of not only two 
> file-systems, but the added overhead of decompressing.
> 
> Hopefully that makes a bit of sense?  It's 5:00 here at the end 
> of a long day, and time for me to head home.  (grins)
> 
> -tim
> 
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> 
> Blinux-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/blinux-list

-- 
	
				Janina Sajka, Chair
				Accessibility Workgroup
				Free Standards Group (FSG)

janina@xxxxxxxxxxxxxxxxx	Phone: +1 202.494.7040

_______________________________________________

Blinux-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/blinux-list

[Index of Archives]     [Linux Speakup]     [Fedora]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]