You are not logged in.

#1 2012-01-11 21:48:16

bpont
Banned
Registered: 2010-03-24
Posts: 161

Need Guidance re: Striped Swap Partitions

I have two swap partitions on two separate hard drives of differing manufacturers, ages and speed.  Using the most current source of information I could find (2003), it says that swap spaces
with equal priorities will be striped.  My question is whether this is actually a wise strategy considering the differing speeds of my two hard drives.  I thought I'd seek some advice regarding possible problems or issues before making such fundamental changes to my system.

Offline

#2 2012-01-12 00:29:24

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Re: Need Guidance re: Striped Swap Partitions

How much RAM do you have? Swap isn't necessary with about 4GB+ of RAM.

Offline

#3 2012-01-12 05:00:20

bpont
Banned
Registered: 2010-03-24
Posts: 161

Re: Need Guidance re: Striped Swap Partitions

brando56894 wrote:

How much RAM do you have? Swap isn't necessary with about 4GB+ of RAM.

I have 1GB of RAM

Offline

#4 2012-01-12 06:20:18

Jristz
Member
From: America/Santiago
Registered: 2011-06-11
Posts: 1,022

Re: Need Guidance re: Striped Swap Partitions

In may experienmce
Swap in same hdd that / (root) or /tmp or /var = only i you have 1 HDD
Swap in seccond HDD diferent from avove directoryes good idea

other thing is set te swappiness (or someting like this) to about 20-10 for maximize RAM usage


Well, I suppose that this is somekind of signature, no?

Offline

#5 2012-01-12 19:05:40

bpont
Banned
Registered: 2010-03-24
Posts: 161

Re: Need Guidance re: Striped Swap Partitions

Jristz wrote:

In may experienmce
Swap in same hdd that / (root) or /tmp or /var = only i you have 1 HDD
Swap in seccond HDD diferent from avove directoryes good idea

other thing is set te swappiness (or someting like this) to about 20-10 for maximize RAM usage

Good advice, but what I really needed was an answer to my specific question.

Offline

#6 2012-01-12 19:35:48

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: Need Guidance re: Striped Swap Partitions

Interesting thought. You expect problems, because the read/write speed of the two disks is different, that's why you are worried, that something time critical could break, because probably two chunks of the same file might be loaded from both disks at the same time. I have no experience with this exact scenario, but swap is expected to be slow and unreliable to begin with. If swapped data has to be read, the kernel can expect other, random, reads and writes to the disk until it can access the swap space (and if it's just logfiles being written to the disk or you downloading cat pictures via torrent). Swapping generally is not that time critical. I'd say, as a rule of thumb, if you can live without a real time kernel, you don't have to worry about any probable syncing problems between two swap disks. You might run into such problems, if you have two swap partitions on the same disk, then your HDD head had to travel back and forth, in order to distribute and fetch the swapped data.

It should behave analogue to LVM/Raid0, they don't make notable trouble when dealing with differently performing disks. I don't know of any problems with your setup.

Last edited by Awebb (2012-01-12 19:38:20)

Offline

#7 2012-01-12 22:10:51

bpont
Banned
Registered: 2010-03-24
Posts: 161

Re: Need Guidance re: Striped Swap Partitions

Awebb wrote:

Interesting thought. You expect problems, because the read/write speed of the two disks is different, that's why you are worried, that something time critical could break, because probably two chunks of the same file might be loaded from both disks at the same time. I have no experience with this exact scenario, but swap is expected to be slow and unreliable to begin with. If swapped data has to be read, the kernel can expect other, random, reads and writes to the disk until it can access the swap space (and if it's just logfiles being written to the disk or you downloading cat pictures via torrent). Swapping generally is not that time critical. I'd say, as a rule of thumb, if you can live without a real time kernel, you don't have to worry about any probable syncing problems between two swap disks. You might run into such problems, if you have two swap partitions on the same disk, then your HDD head had to travel back and forth, in order to distribute and fetch the swapped data.

It should behave analogue to LVM/Raid0, they don't make notable trouble when dealing with differently performing disks. I don't know of any problems with your setup.

So if I'm interpreting your comments correctly, I really don't have much to worry about since each partition is on a separate hd.

Offline

#8 2012-01-12 22:53:58

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: Need Guidance re: Striped Swap Partitions

Yes. This guy here (http://kerneltrap.org/node/5247) even claims, that I'm wrong and multiple swap spaces on a single disk can speed things up.

Offline

#9 2012-01-12 23:30:28

bpont
Banned
Registered: 2010-03-24
Posts: 161

Re: Need Guidance re: Striped Swap Partitions

Awebb wrote:

Yes. This guy here (http://kerneltrap.org/node/5247) even claims, that I'm wrong and multiple swap spaces on a single disk can speed things up.

Great...I'll test things out and see if there's a noticeable performance boost.  Thanks again for your help.

Offline

Board footer

Powered by FluxBB