Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Swap space and memory

8 views
Skip to first unread message

Quek Hong Cheang

unread,
Apr 10, 2002, 6:26:12 AM4/10/02
to
Hi

Newbie here has a question regarding swap space and virtual memory. I
have a 1GByte memory Sun ultra 60 running Solaris 7. When I ran a
large simulation using it, I notice that it reports that it is using
about 9% of swap space(521 Mbyte out of 5794 Mbyte). I checked with
"vmstat -S 5" and found that there is still some free memory (about
182M). So my question is, is it always necessary for the workstation
to use some swap space regardless of how much free memory that is
left? I thought that swap space is something that is used only when
it has run out of memory? Will the speed of my simulation increase if
I increase the memory size to 2G?


Thanks
Quek

B.Lombard 7419-0o05

unread,
Apr 10, 2002, 9:43:18 AM4/10/02
to
The swap is not necessary, if you have enought memory. the system use it
to store the dump of the memory on panic.

Andreas Almroth

unread,
Apr 10, 2002, 11:51:00 AM4/10/02
to
"B.Lombard 7419-0o05" <lom...@cli44qz.der.edf.fr> wrote in message
news:3CB44176...@cli44qz.der.edf.fr...

I'd say one should always add swap regardless if it is needed or not. With
todays
prices on disks, it is no longer an issue allocating swap space on the disk.

Apart from this, Solaris uses a fairly smart way of utilising virtual memory
together
with the backing swap space on disk. Have a look on how swapfs and tmpfs
works in the manual. And in the case the kernel needs to swap anonymous
pages, it can only do it to a swap on disk.
Interesting thought is what would happen if you need to do this, and you
haven't
got the backing swap space on disk...

As for performance, adding more memory tends to boost the servers
performance.
This is not always true, but as he is using the server for simulations, he
might gain
some from adding memory.
In his case, the 512MB or so that is used in swap is probably physical files
that
are cached in memory/swap.

My $0.25,
Andreas

Darren Dunham

unread,
Apr 10, 2002, 2:36:53 PM4/10/02
to
Quek Hong Cheang <quek...@yahoo.com> wrote:
> Hi

> Newbie here has a question regarding swap space and virtual memory. I
> have a 1GByte memory Sun ultra 60 running Solaris 7. When I ran a
> large simulation using it, I notice that it reports that it is using

What is 'it'? Does the simulation itself report swap usage, or are you
looking at the output of some system command? What does 'swap -l'
report?

> about 9% of swap space(521 Mbyte out of 5794 Mbyte). I checked with
> "vmstat -S 5" and found that there is still some free memory (about
> 182M). So my question is, is it always necessary for the workstation
> to use some swap space regardless of how much free memory that is
> left? I thought that swap space is something that is used only when
> it has run out of memory? Will the speed of my simulation increase if
> I increase the memory size to 2G?

1) 'swap' is not well defined. Sometimes the term is used to mean
'backing store for RAM found on disk'. That's the way most folks use
it. However some Solaris commands use it to mean 'all virtual
memory, including both RAM and configured disk'.

2) Even if some of your process were paged (not swapped) to disk, it
would not decrease the speed of the process significantly, unless it
were constantly going in and out of RAM. Normally some pages hit the
disk and then stay there for a long time.

3) Finally, until Solaris 8, the memory model on Solaris caused the free
list to be very misleading. All disk I/O uses RAM as a staging
buffer, but in the previous versions of Solaris that usage could
cause the page scanner to push portions of executable code to disk.
Increasing the RAM in such a situation would not help. Enabling
priority_paging could help slightly.

--
Darren Dunham ddu...@taos.com
Unix System Administrator Taos - The SysAdmin Company
Got some Dr Pepper? San Francisco, CA bay area
< How are you gentlemen!! Take off every '.SIG'!! >

0 new messages