Neil wrote:
On Sun, Apr 6, 2008 at 12:54 PM, Sam Clemens
wrote: Sudhir wrote:
Patrick Shanahan wrote:
* JB2
[04-05-08 22:21]: The new hdd is SATA. Will it mess anything up to have an SATA drive and an ide drive on my system like this?
I have five ide drives and three sata drives in this 10.1 system.
I am green with envy :).
It's not hard. Just never throw a drive away until it's dead. Personally, I always use my oldest drive or drives (depending on size and space requirements) for /tmp and swap space.
Yes, I know swap SHOULD be a fast device, not some old, device from 2 technology generations ago...but I'll put up with a bit of a speed reduction if it means that I'm NOT beating the hell out of my fastest (i.e. NEWEST) disk drives by putting swap on any of them....because the newer the drive, the more important the data on them.
Newest drives filesystem
Newest drive(s): /home, /www, and other content created by me or other users of the system
/local
/opt some things here require more then just an OS re-install to create again.
rest of operating system
Oldest drive(s): /tmp, swap space
How do I do this? Easy.
I never buy expensive, huge drives: Why buy a 500 GB drive if I only have 50 GB of data right now?? I can buy a 200 GB drive now for about $45...and by the time I fill that thing up, for another $50 or so, I'll probably get something even bigger than 300 GB.
Or, I could spend much more than $95 now to buy the 500GB drive all at once.
If I am correct and swap space is striped over the different drives it is placed upon then it should matter more how many drives you have with swap spaces on it.
Swap space is striped ONLY if you set it up to be so. If two swap spaces have different priority levels, one swap space will be exhausted before the system starts to use the 2nd one.
True: the access time of old harddisks is worse, but then again: the swap space will probably be used to store the bigger files anyways,
Swapping is not used to "store files"... it's used to page out memory pages so that the CPU can use a larger address space than the amount of physical memory installed (or more specifically: virtual address space = physical mem + swap space) [This ignores annoying things like memory-mapped I/O, etc.]
since Linux is smart in handeling swap space.
smart, yes. magic: no
The access time of a harddisk is always a order of magnitude longer than the acces time of RAM, even with the newest (non solid state) disks, so IF the designers of the daemons that handle the swap space of Linux are as smart as I believe they are then (when swapspace is needed) the largest files will have a larger chance of getting in the swapspace (although there most likely are strong arguments why some files shoudn't be swapped if possible).
But swapping isn't done by file, it's done on a page by page basis. You can have some of a file in memory, some of it swapped out, and some of it not even read yet. And pages to be swapped are evaluated on an individual basis (what's the current page size now...4k? 16k? 54k?) Google for "demand-paged-virtual-memory", and take a look at these: http://en.wikipedia.org/wiki/Paging http://en.wikipedia.org/wiki/Page_replacement_algorithm http://en.wikipedia.org/wiki/Demand_paging Note that Windows has historically NOT used "demand paging"...instead, what they call "aggressive paging" (anticipatory paging also known as prepaging) which in theory works great, but in practice, results in lots of paging activity which is never needed -- it seems to be one of the primary reasons why Windows is so pathatically non-responsive so often -- instead of just paging out what needs to be paged out, and then getting with running your program ... n ooooooooo, it decides to page out more memory, so that it can pre-load code within a branch that never gets executed. [Great plan you got there, Redmondites].
So: the resulting speed of your swap space is probably in lesser extend a result of the actual speed of the harddisk and to greater extend a result of the number of harddisks in swap.
I would have used my new drives for swap space, but you started a train of thougts causing me to reconsider that.Hmm, if I simply use the tower of 1 to 5 G 5400 rpm harddisks to create swap space that might save me from a crash in the future.
If your swap drive dies, you're still going to crash. But if there's nothing else on the disk, at least you're not losing filesystems, too. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org