Thread: swapping?

swapping?

From
Wei Weng
Date:
The term had been mentioned often enough on this mailing list. Can
someone enlighten me with some description or a URL where I can read on?
And why is it important to postgresql database performace?

Thanks

--
Wei Weng
Network Software Engineer
KenCast Inc.



Re: swapping?

From
"Shridhar Daithankar"
Date:
On 14 Nov 2002 at 10:30, Wei Weng wrote:

> The term had been mentioned often enough on this mailing list. Can
> someone enlighten me with some description or a URL where I can read on?
> And why is it important to postgresql database performace?

When programs request more memory than available, OS 'swaps' some memory to
special area on disk and make the memory available. To programs, it gives
appearance that nearly infinite memory is available.

Unfortunately disk are hell slower than RAM and hence swapping slows things
down as it takes much to swap in to disk and swap out of disk. Since OS does
not care which programs get swapped, it is possible that postgresql instance
can get swapped. That slows down effective memory access to knees..

That's why for good performance, a serve should never swap..

Bye
 Shridhar

--
Peterson's Admonition:    When you think you're going down for the third time --
just remember that you may have counted wrong.


Re: swapping?

From
Wei Weng
Date:
How do you notice that if a system started swapping or not?

Thanks

On Thu, 2002-11-14 at 09:37, Shridhar Daithankar wrote:
> On 14 Nov 2002 at 10:30, Wei Weng wrote:
>
> > The term had been mentioned often enough on this mailing list. Can
> > someone enlighten me with some description or a URL where I can read on?
> > And why is it important to postgresql database performace?
>
> When programs request more memory than available, OS 'swaps' some memory to
> special area on disk and make the memory available. To programs, it gives
> appearance that nearly infinite memory is available.
>
> Unfortunately disk are hell slower than RAM and hence swapping slows things
> down as it takes much to swap in to disk and swap out of disk. Since OS does
> not care which programs get swapped, it is possible that postgresql instance
> can get swapped. That slows down effective memory access to knees..
>
> That's why for good performance, a serve should never swap..
>
> Bye
>  Shridhar
>
> --
> Peterson's Admonition:    When you think you're going down for the third time --
> just remember that you may have counted wrong.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
--
Wei Weng
Network Software Engineer
KenCast Inc.



Re: swapping?

From
Bruce Momjian
Date:
Usually vmstat shows page ins.  I also write a paper on this:

    http://techdocs.postgresql.org/redir.php?link=http://www.ca.postgresql.org/docs/momjian/hw_performance/

The techdocs site has other stuff, see "Optimzation" section:

    http://techdocs.postgresql.org/

---------------------------------------------------------------------------

Wei Weng wrote:
> How do you notice that if a system started swapping or not?
>
> Thanks
>
> On Thu, 2002-11-14 at 09:37, Shridhar Daithankar wrote:
> > On 14 Nov 2002 at 10:30, Wei Weng wrote:
> >
> > > The term had been mentioned often enough on this mailing list. Can
> > > someone enlighten me with some description or a URL where I can read on?
> > > And why is it important to postgresql database performace?
> >
> > When programs request more memory than available, OS 'swaps' some memory to
> > special area on disk and make the memory available. To programs, it gives
> > appearance that nearly infinite memory is available.
> >
> > Unfortunately disk are hell slower than RAM and hence swapping slows things
> > down as it takes much to swap in to disk and swap out of disk. Since OS does
> > not care which programs get swapped, it is possible that postgresql instance
> > can get swapped. That slows down effective memory access to knees..
> >
> > That's why for good performance, a serve should never swap..
> >
> > Bye
> >  Shridhar
> >
> > --
> > Peterson's Admonition:    When you think you're going down for the third time --
> > just remember that you may have counted wrong.
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 2: you can get off all lists at once with the unregister command
> >     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
> --
> Wei Weng
> Network Software Engineer
> KenCast Inc.
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: swapping?

From
Wei Weng
Date:
I hope this doesn't sound too stupid. :)

1: I see sort_mem setting in my postgresql.conf, what is the "buffer
size" people often talk about?

2: What is the unit of sort_mem in postgresql.conf? In my basic(default)
installation, I have sort_mem=512. Is that 512MBs or 512KBs?

Thanks

On Thu, 2002-11-14 at 09:56, Bruce Momjian wrote:
> Usually vmstat shows page ins.  I also write a paper on this:
>
>     http://techdocs.postgresql.org/redir.php?link=http://www.ca.postgresql.org/docs/momjian/hw_performance/
>
> The techdocs site has other stuff, see "Optimzation" section:
>
>     http://techdocs.postgresql.org/
>
> ---------------------------------------------------------------------------
>
> Wei Weng wrote:
> > How do you notice that if a system started swapping or not?
> >
> > Thanks
> >
> > On Thu, 2002-11-14 at 09:37, Shridhar Daithankar wrote:
> > > On 14 Nov 2002 at 10:30, Wei Weng wrote:
> > >
> > > > The term had been mentioned often enough on this mailing list. Can
> > > > someone enlighten me with some description or a URL where I can read on?
> > > > And why is it important to postgresql database performace?
> > >
> > > When programs request more memory than available, OS 'swaps' some memory to
> > > special area on disk and make the memory available. To programs, it gives
> > > appearance that nearly infinite memory is available.
> > >
> > > Unfortunately disk are hell slower than RAM and hence swapping slows things
> > > down as it takes much to swap in to disk and swap out of disk. Since OS does
> > > not care which programs get swapped, it is possible that postgresql instance
> > > can get swapped. That slows down effective memory access to knees..
> > >
> > > That's why for good performance, a serve should never swap..
> > >
> > > Bye
> > >  Shridhar
> > >
> > > --
> > > Peterson's Admonition:    When you think you're going down for the third time --
> > > just remember that you may have counted wrong.
> > >
> > >
> > > ---------------------------(end of broadcast)---------------------------
> > > TIP 2: you can get off all lists at once with the unregister command
> > >     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
> > --
> > Wei Weng
> > Network Software Engineer
> > KenCast Inc.
> >
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> >
--
Wei Weng
Network Software Engineer
KenCast Inc.



Re: swapping?

From
Andrew Sullivan
Date:
On Thu, Nov 14, 2002 at 11:07:00AM -0500, Wei Weng wrote:

> 1: I see sort_mem setting in my postgresql.conf, what is the "buffer
> size" people often talk about?

It's the shared buffer configuration option in your config file.

> 2: What is the unit of sort_mem in postgresql.conf? In my basic(default)
> installation, I have sort_mem=512. Is that 512MBs or 512KBs?

It's in kilobytes.

It appears that it might profit you to read the administrator's
guide.  There's lots in the Fine Manuals.  The section on runtime
configuration is at

http://www.ca.postgresql.org/users-lounge/docs/7.2/postgres/runtime-config.html

A

--
----
Andrew Sullivan                         204-4141 Yonge Street
Liberty RMS                           Toronto, Ontario Canada
<andrew@libertyrms.info>                              M2P 2A8
                                         +1 416 646 3304 x110


Re: swapping?

From
Robert Treat
Date:
you can use vmstat to measure swap activity. check the man page for your
system.

Robert Treat

On Thu, 2002-11-14 at 10:53, Wei Weng wrote:
> How do you notice that if a system started swapping or not?
>
> Thanks
>
> On Thu, 2002-11-14 at 09:37, Shridhar Daithankar wrote:
> > On 14 Nov 2002 at 10:30, Wei Weng wrote:
> >
> > > The term had been mentioned often enough on this mailing list. Can
> > > someone enlighten me with some description or a URL where I can read on?
> > > And why is it important to postgresql database performace?
> >
> > When programs request more memory than available, OS 'swaps' some memory to
> > special area on disk and make the memory available. To programs, it gives
> > appearance that nearly infinite memory is available.
> >
> > Unfortunately disk are hell slower than RAM and hence swapping slows things
> > down as it takes much to swap in to disk and swap out of disk. Since OS does
> > not care which programs get swapped, it is possible that postgresql instance
> > can get swapped. That slows down effective memory access to knees..
> >
> > That's why for good performance, a serve should never swap..
> >
> > Bye
> >  Shridhar
> >
> > --
> > Peterson's Admonition:    When you think you're going down for the third time --
> > just remember that you may have counted wrong.
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 2: you can get off all lists at once with the unregister command
> >     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
> --
> Wei Weng
> Network Software Engineer
> KenCast Inc.
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org




Re: swapping?

From
Adam Witney
Date:
Sorry, a little OT, but anybody know the equivalent command for Mac OSX?
There doesn't seem to be a vmstat on my system

Thanks

adam



> you can use vmstat to measure swap activity. check the man page for your
> system.
>
> Robert Treat
>
> On Thu, 2002-11-14 at 10:53, Wei Weng wrote:
>> How do you notice that if a system started swapping or not?
>>
>> Thanks
>>
>> On Thu, 2002-11-14 at 09:37, Shridhar Daithankar wrote:
>>> On 14 Nov 2002 at 10:30, Wei Weng wrote:
>>>
>>>> The term had been mentioned often enough on this mailing list. Can
>>>> someone enlighten me with some description or a URL where I can read on?
>>>> And why is it important to postgresql database performace?
>>>
>>> When programs request more memory than available, OS 'swaps' some memory to
>>> special area on disk and make the memory available. To programs, it gives
>>> appearance that nearly infinite memory is available.
>>>
>>> Unfortunately disk are hell slower than RAM and hence swapping slows things
>>> down as it takes much to swap in to disk and swap out of disk. Since OS does
>>> not care which programs get swapped, it is possible that postgresql instance
>>> can get swapped. That slows down effective memory access to knees..
>>>
>>> That's why for good performance, a serve should never swap..
>>>
>>> Bye
>>>  Shridhar
>>>
>>> --
>>> Peterson's Admonition:    When you think you're going down for the third
time
>>> --
>>> just remember that you may have counted wrong.
>>>
>>>
>>> ---------------------------(end of broadcast)---------------------------
>>> TIP 2: you can get off all lists at once with the unregister command
>>>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>> --
>> Wei Weng
>> Network Software Engineer
>> KenCast Inc.
>>
>>
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.