Operating System - Tru64 Unix
1748227 Members
4491 Online
108759 Solutions
New Discussion юеВ

Add swap space in Tru64

 
Mikel_9
Occasional Contributor

Add swap space in Tru64

Hi all,
I have Alpha DS25 running Tru64. There is only one disk, in witch are created 3 partitions:
dsk0a, witch contain root domain,
dsk0b witch is swap partition
dsk0g witch contain other file domains.

I want to add more memory, so I have to change the size of swap partition, according to the size of the memory.
How can i perform it? Can I reduce the size of partiotion dsk0g and this free space add to partition dsk0b? Is this data destructive?

Thank you.
7 REPLIES 7
Venkatesh BL
Honored Contributor

Re: Add swap space in Tru64

You cannot shrink dsk0g and use that for dsk0b (in this case). Do you have spare disk or atleast a free partition in this disk?
Mikel_9
Occasional Contributor

Re: Add swap space in Tru64

No, there is not any more free space on the disk. So you think that the only way is to destroy dsk0g and recreate smaller from the beginning in order to let some free space to add to swap?
thank you.
Venkatesh BL
Honored Contributor

Re: Add swap space in Tru64

Yes...if you just have _one_ disk.

Otherwise, you could always add the spare disk as a swap device.
Mikel_9
Occasional Contributor

Re: Add swap space in Tru64

If I delete dsk0g, can I shrink dsk0b, that is the swap partition? Or the only possibility is to add another device as swap?

Anyway, I have 3 GB of memory and swap partition is 2 GB. Allocation mode is "Deferred". Do you think that 2 GB of swap space is enough?
Thank you.
Mark Poeschl_2
Honored Contributor

Re: Add swap space in Tru64

Repartitioning of a disk is always destructive to data on any of the partitions which get changed - no way around that one.

As to how much swap space you 'need' - that's totally dependent on your application(s). When the system is under load are you paging? What does 'swapon -s' look like when the system is loaded?
Hein van den Heuvel
Honored Contributor

Re: Add swap space in Tru64


>> I want to add more memory, so I have to change the size of swap partition,

This does not compute. You are in deferred/lazy mode already. So if you just add memory, and do not change the load, then you would effectively really need LESS swap space.

Yes, I am fully aware of the 'guidelines' by SAP and ORACLE and the likes, suggesting a swap space 3 times physical memory. But those really are silly ancient suggestions (not rules) notably based on eager swap mode.

Of course is it 'safe' and predictable to have lots of swap... in case your application gets out of control. But if you know your application then you should not need more than a few hunderd MB of swap space, ok call it 2GB. Why? Well in lazy swap mode, the swap space is only needed when swapping is happening. Let me assure you that if you are swapping multiple Gigabytes of data you are not running a happy system. It will be 'thrashing', it will be burning CPU in system mode like crazy, it will be slow as molasses... you might as well crash depending on the function of the box. A few hundered MP of 'slow' memory, once touched but never since, is acceptable. It will get you over memory leaks by the applications and the likes. But much higher needs really spells trouble.

So,just check with swapon -s how much swap space is really used right now, speculate the increased load after memory is added and that will give you an indication of swap space really needed. You may find that 2GB is already a nice safety margin and that you can just leave well enough alone.

I would recommend finding extra disk though!
It is rare to see a single disk support the needs and feeds for 2 Alpha CPUs processing 4GB worth of data & code. It will soon be a bottleneck, if it is not already a bottleneck.
If you do get that extra disk, then why not start out with a 4GB additional swap partition 'just in case'. Maybe even go 'eager' at that point. Or even add 2 more swap partitions o 4Gb each on a new disk. Then you can release one if/when it is proven not to be needed and if/when dataspace becomes more valuable.

Hope this helps,
Hein.
Mohamed  K Ahmed
Trusted Contributor

Re: Add swap space in Tru64

I think the easiest way is to add a new disk, partition and configure as swap