Solaris 10 swap device and filesystem


 
Thread Tools Search this Thread
Operating Systems Solaris Solaris 10 swap device and filesystem
# 1  
Old 07-20-2016
Solaris 10 swap device and filesystem

Hi all,

Q1) Due to application requirement, i am required to have more swap space.
Currently my swap is on a partition with 32GB.
I have another partition with 100GB, but it already has a UFS filesystem on it.

Can i just swap -d /dev/dsk/current32gb and swap -a /dev/dsk/ufs100gb ?
Will there be a problem if the 100gb already has a filesystem on it ?

p.s. Due to personal preference, I do not want to create a swapfile and add on to the existing swap space.

Q2) The swap size recommendation for the application is to have 75% * RAM (128gb) = 96GB swap.

Do i really have to create the swap in multiples of 32GB (e.g.. 32, 64, 96) ?

Is there any performance impact if i just use a 100GB swap instead of a 96GB one ?

Regards,
Noob
# 2  
Old 07-20-2016
Q1) Problem: the swap would trash the filesystem!

BTW my personal thumb formula is: swap-GB = 4 x SQRT(RAM-GB)

Q2) No, can be any size.

Q3) The larger the used swap, the lower is the paging to/from the swap. The unused swap does not matter for performance (but is wasted disk space).
This User Gave Thanks to MadeInGermany For This Post:
# 3  
Old 07-20-2016
Quote:
Originally Posted by MadeInGermany
Q1) Problem: the swap would trash the filesystem!

BTW my personal thumb formula is: swap-GB = 4 x SQRT(RAM-GB)

Q2) No, can be any size.

Q3) The larger the used swap, the lower is the paging to/from the swap. The unused swap does not matter for performance (but is wasted disk space).
Hi MadeInGermany

Thanks for your reply.
Quote:
Q1) Problem: the swap would trash the filesystem!
Q1) Do you mean that there will be a problem if i use a partition with an existing UFS filesystem as the swap device ? or do actually you mean "No problem" ?

Quote:
swap-GB = 4 x SQRT(RAM-GB)
Q2) That would be 4 x SQRT(128GB) = 4 x 11.31 = around 48GB ?

Quote:
Q3) The larger the used swap, the lower is the paging to/from the swap. The unused swap does not matter for performance (but is wasted disk space).
Q3) Can you elaborate abit further here ? - The "used" swap here means "allocated" swap or really "utilized" swap. I thought when memory is insufficient, paging to/from swap will occur. So how does having a big swap reduce paging ?

Last but not least, is it okay for me to use my 100GB partition with UFS filesystem as my new swap device ? - as I do not want to re-partition the harddisk and affect the rest of my partitions

p.s. initially i allocate 32GB of swap for my 128GB ram, but oracle's grid installation for database suggest 0.75(RAM) for swap, and hence i am trying to use an existing partition (100GB) as the actual swap device

Hope to hear from you soon.
# 4  
Old 07-20-2016
If you use the same disk partition for swap and for a UFS filesystem, the contents of the UFS filesystem will be destroyed if any data is swapped to that swap space.

If you were willing to create a swapfile in the UFS filesystem and add that to your swap space, that would be different. But since you have said that is not an option, you MUST NOT allocate the same partition to be used as swap space and as an active filesystem.
This User Gave Thanks to Don Cragun For This Post:
# 5  
Old 07-20-2016
Quote:
Originally Posted by Don Cragun
If you use the same disk partition for swap and for a UFS filesystem, the contents of the UFS filesystem will be destroyed if any data is swapped to that swap space.

If you were willing to create a swapfile in the UFS filesystem and add that to your swap space, that would be different. But since you have said that is not an option, you MUST NOT allocate the same partition to be used as swap space and as an active filesystem.
Hi Don,

Thanks for your reply. The current ufs partition is use as a standby and i am willing to lose its current content.

Does that means I can use it to as a swap device despite having created an ufs filesystem on it; (as it will be overwritten during page swap) right ?
# 6  
Old 07-21-2016
Ensure that the 100GB is not mounted. Then it can be trashed, you can add it to swap.
(If it's a partition on a physical disk on Sparc, it might give an error - in this case you must change the "wm" flag to "wu" in "format"s partition menu, in order to declare it unmountable. It's a good habit anyway.)
With used swap I mean the utilized swap, (blocks - free) in swap -l
This User Gave Thanks to MadeInGermany For This Post:
# 7  
Old 07-21-2016
Quote:
Originally Posted by javanoob
Due to personal preference, I do not want to create a swapfile and add on to the existing swap space.
Given the fact using a swapfile would be the most sensible solution, can you elaborate on this personal preference against it?

How much free space is available on the 100GB partition and on the root (/) one?

Will the application make actually use of the swap, i.e. is there a risk the application do more than reserving that extra memory and effectively write pages there?

If you are sure the answer is no for the last question, you might fake swap space by using a sparse file:

e.g.:
Code:
mkfile -n 64g /var/tmp/64g-sparse
swap -a `lofiadm -a /var/tmp/64g-sparse`

This User Gave Thanks to jlliagre For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. Solaris

Force unmount of a SWAP filesystem left over from bad Live Upgrade

Hello, Long story short, we built an alternate boot env. back in July and applied the latest CPU to about 15 servers. Of the 15 servers, 7 servers failed to start the zones after the luactivate / reboot. The zones failed to rename from <zone>-<boot_env> back to <zone>. This is fixed in patch... (16 Replies)
Discussion started by: mainegeek
16 Replies

2. HP-UX

Swap device file and swap sapce

Hi I have an integrity machine rx7620 and rx8640 running hp-ux 11.31. I'm planning to fine tune the system: - I would like to know when does the memory swap space spill over to the device swap space? - And how much % of memory swap utilization should be specified (swap space device... (6 Replies)
Discussion started by: lamoul
6 Replies

3. UNIX for Advanced & Expert Users

translating device to filesystem in solaris10

Greetings, I have a oracle database server and i keep getting grid control message Metric=Disk Device Busy (%) Metric Value=98.66 Disk Device=ssd430 Severity=Critical Message=Disk Device ssd430 is 98.66% busy. so I am trying to correlate the ssd430 to the filesystem. I understand this... (3 Replies)
Discussion started by: p4cldba
3 Replies

4. UNIX for Advanced & Expert Users

Swap Device & Unix Disk Buffer

Does anyone know if when the Swap Device / Page file in unix is carrying out Page / Swap In's and Page / Swap outs, does it go through the Unix Disk Cache ( I am presuming raw partitions are not being used ) ? Therefore if there is paging activity on a system ( measured by sar -p, sar -g and... (0 Replies)
Discussion started by: jimthompson
0 Replies

5. UNIX for Dummies Questions & Answers

device to filesystem?

On a HP-UX box, I can execute the sar command which will give me the device, %busy, etc. I would like to know how to take a given device name and determine on which filesystem it's located when I do a bdf. I've done some searching through the posts but so far have not had any luck in... (2 Replies)
Discussion started by: jimedwards
2 Replies
Login or Register to Ask a Question