Re: swap space

2012-02-17 Thread Robert Bonomi
> From owner-freebsd-questi...@freebsd.org  Fri Feb 17 17:59:50 2012
> Date: Fri, 17 Feb 2012 15:54:18 -0800
> From: Jim Pazarena 
> To: FreeBSD Mailing List 
> Subject: swap space
>
> is there a command which can show the size of the hard drive swap?
>
> A "df" seems to avoid the swap area.

That *is* "expected" behavior.
  
'df' shows utilization of -filesystems-.  'swap' is not filesystem.

> This would be on a live production server.

The "traditional" means is 'pstat -s'.  On relatively modern systems,
'swapinfo' is an alias.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


RE: swap space

2012-02-17 Thread Devin Teske


> -Original Message-
> From: owner-freebsd-questi...@freebsd.org [mailto:owner-freebsd-
> questi...@freebsd.org] On Behalf Of Robison, Dave
> Sent: Friday, February 17, 2012 4:11 PM
> To: freebsd-questions@freebsd.org
> Subject: Re: swap space
> 
> On 02/17/2012 15:58, Chuck Swiger wrote:
> > On Feb 17, 2012, at 3:54 PM, Jim Pazarena wrote:
> >> is there a command which can show the size of the hard drive swap?
> >>
> >> A "df" seems to avoid the swap area.
> > You're looking for "swapinfo"
> >
> > Regards,
> 
> Chuck beat me to it.
> 
> "swapinfo" or top are the two ways I normally check.
> 

I'm digging the fact that it now accepts "-h" to produce human-readable sizes.

swapinfo didn't always support "-h"
-- 
Devin

_
The information contained in this message is proprietary and/or confidential. 
If you are not the intended recipient, please: (i) delete the message and all 
copies; (ii) do not disclose, distribute or use the message in any manner; and 
(iii) notify the sender immediately. In addition, please be aware that any 
message addressed to our domain is subject to archiving and review by persons 
other than the intended recipient. Thank you.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: swap space

2012-02-17 Thread Robison, Dave

On 02/17/2012 15:58, Chuck Swiger wrote:

On Feb 17, 2012, at 3:54 PM, Jim Pazarena wrote:

is there a command which can show the size of the hard drive swap?

A "df" seems to avoid the swap area.

You're looking for "swapinfo"

Regards,


Chuck beat me to it.

"swapinfo" or top are the two ways I normally check.



--
Dave Robison
Sales Solution Architect II
FIS Banking Solutions
510/621-2089 (w)
530/518-5194 (c)
510/621-2020 (f)
da...@vicor.com
david.robi...@fisglobal.com

_
The information contained in this message is proprietary and/or confidential. 
If you are not the intended recipient, please: (i) delete the message and all 
copies; (ii) do not disclose, distribute or use the message in any manner; and 
(iii) notify the sender immediately. In addition, please be aware that any 
message addressed to our domain is subject to archiving and review by persons 
other than the intended recipient. Thank you.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: swap space

2012-02-17 Thread Jonathan Vomacka
On Feb 17, 2012 6:55 PM, "Jim Pazarena"  wrote:
>
> is there a command which can show the size of the hard drive swap?
>
> A "df" seems to avoid the swap area.
>
> This would be on a live production server.
> Thanks.
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "
freebsd-questions-unsubscr...@freebsd.org"

Top or vmstat
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: swap space

2012-02-17 Thread Chuck Swiger
On Feb 17, 2012, at 3:54 PM, Jim Pazarena wrote:
> is there a command which can show the size of the hard drive swap?
> 
> A "df" seems to avoid the swap area.

You're looking for "swapinfo"

Regards,
-- 
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: swap space

2012-02-17 Thread Mike Tancsa
On 2/17/2012 6:54 PM, Jim Pazarena wrote:
> is there a command which can show the size of the hard drive swap?
> 

% pstat -T
438/12328 files
98M/10240M swap space

---Mike

-- 
---
Mike Tancsa, tel +1 519 651 3400
Sentex Communications, m...@sentex.net
Providing Internet services since 1994 www.sentex.net
Cambridge, Ontario Canada   http://www.tancsa.com/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


swap space

2012-02-17 Thread Jim Pazarena

is there a command which can show the size of the hard drive swap?

A "df" seems to avoid the swap area.

This would be on a live production server.
Thanks.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Recommended SWAP space for large amounts of ram (8GB)

2011-09-15 Thread Jonathan Vomacka

Thanks Matthew / Michael for your responses on this.

On 9/14/2011 2:51 PM, Matthew Seaman wrote:

On 14/09/2011 18:27, Michael Sierchio wrote:

On Wed, Sep 14, 2011 at 6:55 AM, Matthew Seaman
  wrote:


... In these days of plentiful RAM, the new rule of thumb is "if you're
swapping, then you're doing it wrong."



I think your response follows the excellent pedagogical principle: "a
little inaccuracy saves a lot of explanation."  But... disk is still
(by far) the cheapest commodity, and the opportunistic paging
algorithm manages VM very well.  VM is not by any means obsolete, and
seeing paging behavior is not a sign of a misconfigured system.


Well, yes.  I was certainly glossing over a lot of complexity -- but I
would maintain that I am fundamentally correct.

Having some pages swapped out is absolutely not a problem.  True.  In
fact, it's a positive benefit: swapping out memory pages that are
exceedingly rarely referenced makes more room in RAM for more actively
used pages.

On the other hand, having pages continually swapping in and out
definitely is a problem in terms of performance, given that disk IO
takes of the order of milliseconds, while reference to main RAM is of
the order of microseconds or less.  Orders of magnitude faster.

Now, while disk may well be the much the cheapest storage medium
available, that's only part of the expense.  In fact, up-front capital
expenditure on the kit (perhaps several thousand pounds/euros/dollars)
is outweighed by the operational expense (power, cooling, hardware
support etc.) over the life of the equipment, so spending a bit more
(capex) on components that run at lower power (opex) makes a lot of
sense.  Even more, if the server is being used for eg. e-Commerce, then
the volume of the transactions and the data processed by the server
makes all the difference to your margin: the more you can do with the
same hardware - viz, the more efficiently and faster you can make the
hardware run - then the more profit you make.  Buying more RAM is
peanuts on that scale.

Cheers,

Matthew


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Recommended SWAP space for large amounts of ram (8GB)

2011-09-14 Thread RW
On Wed, 14 Sep 2011 14:55:53 +0100
Matthew Seaman wrote:

> On 14/09/2011 13:34, Jonathan Vomacka wrote:

> > Either from the FreeBSD docs, or based on personal experiences,
> > what is the recommended swap space for a 8GB system? Your opinions
> > are greatly appreciated
> 
> The old rule of thumb of swap = 2 x RAM dates back to the days when
> 128MB RAM was a big deal.  Nowadays, you're likely to have that much
> in your phone, and systems with 128GB RAM are not unknown.
> 
> In these days of plentiful RAM, the new rule of thumb is "if you're
> swapping, then you're doing it wrong."  

There is a caveat that on desktop grade motherboards, expanding beyond
8GB can slow the system down, as populating 4 slots can cause the
memory to run at a slower speed.

> My recommendation: for systems with 1GB RAM or more, and that don't
> make heavy use of memory filesystems and the like, then 2GB swap is
> ample, and you can probably get away with as little as 1GB at need.

If you have 8GB of ram and you can get away with 1GB of swap, then you
presumably could get away with none.


This question recently came up on "hackers", and someone posted top
output from a 12GB system showing a 23GB openoffice process and 21GB of
swap in use after opening a large spreadsheet file. I think there's a
reasonable case for providing enough swap to cope with abnormal memory
use. 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Recommended SWAP space for large amounts of ram (8GB)

2011-09-14 Thread Matthew Seaman
On 14/09/2011 18:27, Michael Sierchio wrote:
> On Wed, Sep 14, 2011 at 6:55 AM, Matthew Seaman
>  wrote:
> 
>> > ... In these days of plentiful RAM, the new rule of thumb is "if you're
>> > swapping, then you're doing it wrong."

> I think your response follows the excellent pedagogical principle: "a
> little inaccuracy saves a lot of explanation."  But... disk is still
> (by far) the cheapest commodity, and the opportunistic paging
> algorithm manages VM very well.  VM is not by any means obsolete, and
> seeing paging behavior is not a sign of a misconfigured system.

Well, yes.  I was certainly glossing over a lot of complexity -- but I
would maintain that I am fundamentally correct.

Having some pages swapped out is absolutely not a problem.  True.  In
fact, it's a positive benefit: swapping out memory pages that are
exceedingly rarely referenced makes more room in RAM for more actively
used pages.

On the other hand, having pages continually swapping in and out
definitely is a problem in terms of performance, given that disk IO
takes of the order of milliseconds, while reference to main RAM is of
the order of microseconds or less.  Orders of magnitude faster.

Now, while disk may well be the much the cheapest storage medium
available, that's only part of the expense.  In fact, up-front capital
expenditure on the kit (perhaps several thousand pounds/euros/dollars)
is outweighed by the operational expense (power, cooling, hardware
support etc.) over the life of the equipment, so spending a bit more
(capex) on components that run at lower power (opex) makes a lot of
sense.  Even more, if the server is being used for eg. e-Commerce, then
the volume of the transactions and the data processed by the server
makes all the difference to your margin: the more you can do with the
same hardware - viz, the more efficiently and faster you can make the
hardware run - then the more profit you make.  Buying more RAM is
peanuts on that scale.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
JID: matt...@infracaninophile.co.uk   Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


Re: Recommended SWAP space for large amounts of ram (8GB)

2011-09-14 Thread Michael Sierchio
On Wed, Sep 14, 2011 at 6:55 AM, Matthew Seaman
 wrote:

> ... In these days of plentiful RAM, the new rule of thumb is "if you're
> swapping, then you're doing it wrong."

I think your response follows the excellent pedagogical principle: "a
little inaccuracy saves a lot of explanation."  But... disk is still
(by far) the cheapest commodity, and the opportunistic paging
algorithm manages VM very well.  VM is not by any means obsolete, and
seeing paging behavior is not a sign of a misconfigured system.

Regards,

- Michael
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Recommended SWAP space for large amounts of ram (8GB)

2011-09-14 Thread Jonathan Vomacka
Excellent response. Thank you so much.

On Sep 14, 2011 9:56 AM, "Matthew Seaman" 
wrote:
>
> On 14/09/2011 13:34, Jonathan Vomacka wrote:
> > Each operating system seems to have different documentation regarding
> > what a decent swap size is for systems with large amounts of RAM. My
> > system only has 8GB of RAM. Some people have gone with the general idea
> > that 2X the amount of RAM is sufficient but for systems with large
> > amounts of memory 1X the amount of RAM is fine. I was also told that
> > anything over 2GB of SWAP space will cause performance issues on the
> > system and that it is not recommended.
> >
> > Either from the FreeBSD docs, or based on personal experiences, what is
> > the recommended swap space for a 8GB system? Your opinions are greatly
> > appreciated
>
> The old rule of thumb of swap = 2 x RAM dates back to the days when
> 128MB RAM was a big deal.  Nowadays, you're likely to have that much in
> your phone, and systems with 128GB RAM are not unknown.
>
> In these days of plentiful RAM, the new rule of thumb is "if you're
> swapping, then you're doing it wrong."  You don't need anything like as
> much swap nowadays, at least, not as compensation for lack of RAM.  You
> may need swap to back eg. tmpfs filesystems.  You don't need swap
> nowadays for system dumps -- any partition with ephemeral data (or no
> data at all) can be used for dumping, and given that minidump capability
> exists now, you don't even need to supply the 1 x RAM + delta required
> for a full dump.
>
> That swap > 2GB resulted in performance problems was certainly true
> once, but I doubt very much that it is still the case in HEAD or the
> upcoming 9.0-RELEASE, nor probably in {7,8}-STABLE.  IIRC the problem
> was due to avoiding integer overflow in some calculations deep inside
> the VM system, which is usually not a hugely difficult problem to fix.
>
> My recommendation: for systems with 1GB RAM or more, and that don't make
> heavy use of memory filesystems and the like, then 2GB swap is ample,
> and you can probably get away with as little as 1GB at need.
>
>Cheers,
>
>Matthew
>
> --
> Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
>  Flat 3
> PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
> JID: matt...@infracaninophile.co.uk   Kent, CT11 9PW
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Recommended SWAP space for large amounts of ram (8GB)

2011-09-14 Thread Matthew Seaman
On 14/09/2011 13:34, Jonathan Vomacka wrote:
> Each operating system seems to have different documentation regarding
> what a decent swap size is for systems with large amounts of RAM. My
> system only has 8GB of RAM. Some people have gone with the general idea
> that 2X the amount of RAM is sufficient but for systems with large
> amounts of memory 1X the amount of RAM is fine. I was also told that
> anything over 2GB of SWAP space will cause performance issues on the
> system and that it is not recommended.
> 
> Either from the FreeBSD docs, or based on personal experiences, what is
> the recommended swap space for a 8GB system? Your opinions are greatly
> appreciated

The old rule of thumb of swap = 2 x RAM dates back to the days when
128MB RAM was a big deal.  Nowadays, you're likely to have that much in
your phone, and systems with 128GB RAM are not unknown.

In these days of plentiful RAM, the new rule of thumb is "if you're
swapping, then you're doing it wrong."  You don't need anything like as
much swap nowadays, at least, not as compensation for lack of RAM.  You
may need swap to back eg. tmpfs filesystems.  You don't need swap
nowadays for system dumps -- any partition with ephemeral data (or no
data at all) can be used for dumping, and given that minidump capability
exists now, you don't even need to supply the 1 x RAM + delta required
for a full dump.

That swap > 2GB resulted in performance problems was certainly true
once, but I doubt very much that it is still the case in HEAD or the
upcoming 9.0-RELEASE, nor probably in {7,8}-STABLE.  IIRC the problem
was due to avoiding integer overflow in some calculations deep inside
the VM system, which is usually not a hugely difficult problem to fix.

My recommendation: for systems with 1GB RAM or more, and that don't make
heavy use of memory filesystems and the like, then 2GB swap is ample,
and you can probably get away with as little as 1GB at need.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
JID: matt...@infracaninophile.co.uk   Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


Recommended SWAP space for large amounts of ram (8GB)

2011-09-14 Thread Jonathan Vomacka

Good morning all,

Each operating system seems to have different documentation regarding 
what a decent swap size is for systems with large amounts of RAM. My 
system only has 8GB of RAM. Some people have gone with the general idea 
that 2X the amount of RAM is sufficient but for systems with large 
amounts of memory 1X the amount of RAM is fine. I was also told that 
anything over 2GB of SWAP space will cause performance issues on the 
system and that it is not recommended.


Either from the FreeBSD docs, or based on personal experiences, what is 
the recommended swap space for a 8GB system? Your opinions are greatly 
appreciated


Kind Regards,
Jonathan
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: swap_pager: out of swap space, swap_pager_getswapspace(16): failed

2011-04-04 Thread Chuck Swiger
On Apr 4, 2011, at 12:59 PM, Paul Chany wrote:
> I follow the link: 
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/adding-swap-space.html
> 
> I did create a swapfile, and run again command: '# make install clean'.
> Since thet it being running on my old Toshiba laptop that had 64 MB RAM and 
> 16 MB swap space but with swapfile it has much more VM.
> 
> Thanks!

You're most welcome.  With only 64MB of RAM, you probably want at least 256MB 
of swapspace handy, but that depends on what you are running, of course...

Regards,
-- 
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: swap_pager: out of swap space, swap_pager_getswapspace(16): failed

2011-04-04 Thread Paul Chany

2011-04-04 21:01 keltezéssel, Chuck Swiger írta:

On Apr 4, 2011, at 11:56 AM, Paul Chany wrote:
   

swap_pager: out of swap space
swap_pager_getswapspace(16): failed
..
c++: Internal error: Killed: 9 (program cc1plus)
..
..
*** Error code 1

What can I do to solve this problem
 

Your system ran out of VM.  Add more RAM, or add more swapspace, or consider "top -o 
size" and kill off anything huge.  Also, compiling with -O0 or -O instead of the 
default -O2 will reduce the size of the compiler process significantly.

Regards,
   
I follow the link: 
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/adding-swap-space.html


I did create a swapfile, and run again command: '# make install clean'.
Since thet it being running on my old Toshiba laptop that had 64 MB RAM 
and 16 MB swap space but with swapfile it has much more VM.


Thanks!

Regards,
Paul

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: swap_pager: out of swap space, swap_pager_getswapspace(16): failed

2011-04-04 Thread Chuck Swiger
On Apr 4, 2011, at 11:56 AM, Paul Chany wrote:
> swap_pager: out of swap space
> swap_pager_getswapspace(16): failed
> ..
> c++: Internal error: Killed: 9 (program cc1plus)
> ..
> ..
> *** Error code 1
> 
> What can I do to solve this problem

Your system ran out of VM.  Add more RAM, or add more swapspace, or consider 
"top -o size" and kill off anything huge.  Also, compiling with -O0 or -O 
instead of the default -O2 will reduce the size of the compiler process 
significantly.

Regards,
-- 
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


swap_pager: out of swap space, swap_pager_getswapspace(16): failed

2011-04-04 Thread Paul Chany

Hi,

On FreeBSD RELEASE 8.2 I'm trying to install sudo with commands:

# cd /usr/ports/security/sudo/
# make install clean
..
swap_pager: out of swap space
swap_pager_getswapspace(16): failed
..
c++: Internal error: Killed: 9 (program cc1plus)
..
..
*** Error code 1

What can I do to solve this problem?

--
Best Regards,
Paul

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Swap Space

2011-01-06 Thread Jerry McAllister
On Thu, Jan 06, 2011 at 09:42:36AM +, Matthew Seaman wrote:

> On 05/01/2011 22:33, Jeff Whitman wrote:
> > I'm finding conflicting data on this.  Some say 0, some say 1 times RAM,
> > others say stay with 2 x RAM.
> 
> Standard advice is 2x RAM -- but that dates back to the days when
> servers would have quantities of RAM measured in Megabytes rather than
> Gigabytes.

Of course, in those days disk space was measured in MBytes too.
> 
> Also, there's a maximum of -- I think -- 8GB
> swap above which the performance of swap is degraded, due to algorithmic
> limits in the way memory pages are mapped onto disk pages.

I don't know about an 8GB limit for swap performance.  I suppose
it is possible.So, the following formula from Mathew is probably 
a good new rule of thumb.

> 
> You need 1 x RAM + a few kB in order to support getting a crashdump. Or
> at least, you did before the days of minidumps.  Not sure what the
> requirements are for getting system dumps nowadays.  Swap space used for
> crashdumps should be a raw partition, not a file.

jerry


> 
> On the other hand, for good performance you should not be using any
> significant amounts of swap in normal usage.  You will need some swap,
> as the OS tends to use a small amount even when not under memory
> pressure.  You should have swap to act as a buffer in case your machine
> suddenly starts using up more memory than you expect, either because of
> memory leaks, or due to demand spikes or through any number of other
> possible causes.
> 
> Therefore, I think the best advice for a modern large memory system
> would be:
> 
> If RAM > 8GB, then SWAP = 8GB[*]
> If RAM < 8GB, then SWAP = 1 x RAM + delta
> 
> where delta is perhaps a Megabyte or so.  Just rounding the partition
> size up to the next cylinder boundary should be enough (which happens
> automatically with most partitioning schemes).
> 
>   Cheers,
> 
>   Matthew
> 
> [*] In this case, if you need crashdumps, you should dedicate another
> otherwise unused partition of the correct size as your dumpdev.
> 
> -- 
> Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
>   Flat 3
> PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
> JID: matt...@infracaninophile.co.uk   Kent, CT11 9PW
> 


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Swap Space

2011-01-06 Thread Matthew Seaman
On 05/01/2011 22:33, Jeff Whitman wrote:
> I'm finding conflicting data on this.  Some say 0, some say 1 times RAM,
> others say stay with 2 x RAM.

Standard advice is 2x RAM -- but that dates back to the days when
servers would have quantities of RAM measured in Megabytes rather than
Gigabytes.

2 X RAM is a lot of disk space nowadays -- so either you'll need to find
some other use for that space; eg. as a swap-backed /tmp partition,
or else provide less swap.  Also, there's a maximum of -- I think -- 8GB
swap above which the performance of swap is degraded, due to algorithmic
limits in the way memory pages are mapped onto disk pages.

You need 1 x RAM + a few kB in order to support getting a crashdump. Or
at least, you did before the days of minidumps.  Not sure what the
requirements are for getting system dumps nowadays.  Swap space used for
crashdumps should be a raw partition, not a file.

On the other hand, for good performance you should not be using any
significant amounts of swap in normal usage.  You will need some swap,
as the OS tends to use a small amount even when not under memory
pressure.  You should have swap to act as a buffer in case your machine
suddenly starts using up more memory than you expect, either because of
memory leaks, or due to demand spikes or through any number of other
possible causes.

Therefore, I think the best advice for a modern large memory system
would be:

If RAM > 8GB, then SWAP = 8GB[*]
If RAM < 8GB, then SWAP = 1 x RAM + delta

where delta is perhaps a Megabyte or so.  Just rounding the partition
size up to the next cylinder boundary should be enough (which happens
automatically with most partitioning schemes).

Cheers,

Matthew

[*] In this case, if you need crashdumps, you should dedicate another
otherwise unused partition of the correct size as your dumpdev.

-- 
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
JID: matt...@infracaninophile.co.uk   Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


Re: Swap Space

2011-01-05 Thread Robison, Dave

On 01/05/11 15:20, Gary Gatten wrote:

I will be installing 8.1 on a Dell Poweredge 2850, with dual 3 GHz XEON
processors and 6GB RAM.

What is the recommended swap space?


I'm finding conflicting data on this.  Some say 0, some say 1 times RAM,
others say stay with 2 x RAM.


Definitely not 0, but 2x would probably be way too much IMO. 4 - 6 GB should
be enough for most use cases.


Correct me if I'm wrong, but if necessary one could add (and activate) a 
secondary / additional swap file if necessary without rebooting.  So maybe 
start with a few gig and add an additional swap file if necessary?








"This email is intended to be reviewed by only the intended recipient
  and may contain information that is privileged and/or confidential.
  If you are not the intended recipient, you are hereby notified that
  any review, use, dissemination, disclosure or copying of this email
  and its attachments, if any, is strictly prohibited.  If you have
  received this email in error, please immediately notify the sender by
  return email and delete this email from your system."


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"




yep

man swapon

though this won't be as elegant as having it set up as normal swap


--
Dave Robison
Sales Solution Architect II
FIS Banking Solutions
510/621-2089 (w)
530/518-5194 (c)
510/621-2020 (f)
da...@vicor.com
david.robi...@fisglobal.com

_

The information contained in this message is proprietary and/or confidential. 
If you are not the intended recipient, please: (i) delete the message and all 
copies; (ii) do not disclose, distribute or use the message in any manner; and 
(iii) notify the sender immediately. In addition, please be aware that any 
message addressed to our domain is subject to archiving and review by persons 
other than the intended recipient. Thank you.
_
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Swap Space

2011-01-05 Thread Robert Huff
Adam Vande More writes:

>  > I will be installing 8.1 on a Dell Poweredge 2850, with dual 3 GHz XEON
>  > processors and 6GB RAM.
>  >
>  > What is the recommended swap space?
>
>  > I'm finding conflicting data on this.  Some say 0, some say 1 times RAM,
>  > others say stay with 2 x RAM.
>  >
>  
>  Definitely not 0, but 2x would probably be way too much IMO. 4 -
>  6 GB should be enough for most use cases.

One data point:

last pid: 58457;  load averages:  1.91,  2.20,  2.27  up 8+19:16:27 18:51:23
166 processes: 5 running, 158 sleeping, 2 stopped, 1 zombie

Mem: 1541M Active, 1267M Inact, 1223M Wired, 195M Cache, 802M Buf, 3440M Free
Swap: 18G Total, 11M Used, 18G Free

(That's 8g total memory.)  It's a fairly lightly loaded
workstation.
A philosophical consideration: modern disks are cheap, and
fairly fast.  Repartitioning if you don't have enough is a pain.


Robert Huff

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


RE: Swap Space - hijack?

2011-01-05 Thread Gary Gatten
> Correct me if I'm wrong, but if necessary one could add (and
> activate) a secondary / additional swap file if necessary without
> rebooting.  So maybe start with a few gig and add an additional swap
> file if necessary?

Swapping to a file is really slow and should only be done if absolutely
necessary since every read/write has to go through the filesystem code
which it doesn't do if done via a swap slice.
Good point.  It's been several years and back on v5 or 6 when I did something 
like this.  If there's unpartitioned space on the drive, can one add a 
secondary swap partition real-time?  I forget what I did here - I'm sure I 
followed what's in the handbook re swap space.  Probably did a swap file...

 Yes you can do that with swapon(1)

It's been said though that FreeBSD memory paging algorithms take into account 
the system's entire available VM for deciding on when to act in low memory 
conditions and these parameters are tuned expect some of that to be swap space. 
 That is why one reason there *should* be a least some swap space even on a 
system w/ plenty of RAM.

Sorry for the probable hijack... Speaking of swapping algorithms, is there a 
way to force a parent and all child processes to NOT be swapped - period - and 
always remain 100% in "real" memory?  And if so, is it discouraged or 
completely up to the sysadmin?










"This email is intended to be reviewed by only the intended recipient
 and may contain information that is privileged and/or confidential.
 If you are not the intended recipient, you are hereby notified that
 any review, use, dissemination, disclosure or copying of this email
 and its attachments, if any, is strictly prohibited.  If you have
 received this email in error, please immediately notify the sender by
 return email and delete this email from your system."


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Swap Space

2011-01-05 Thread Adam Vande More
On Wed, Jan 5, 2011 at 5:33 PM, Gary Gatten  wrote:

>
> > Correct me if I'm wrong, but if necessary one could add (and
> > activate) a secondary / additional swap file if necessary without
> > rebooting.  So maybe start with a few gig and add an additional swap
> > file if necessary?
>
> Swapping to a file is really slow and should only be done if absolutely
> necessary since every read/write has to go through the filesystem code
> which it doesn't do if done via a swap slice.
>
> Good point.  It's been several years and back on v5 or 6 when I did
> something like this.  If there's unpartitioned space on the drive, can one
> add a secondary swap partition real-time?  I forget what I did here - I'm
> sure I followed what's in the handbook re swap space.  Probably did a swap
> file...
>

 Yes you can do that with swapon(1)

It's been said though that FreeBSD memory paging algorithms take into
account the system's entire available VM for deciding on when to act in low
memory conditions and these parameters are tuned expect some of that to be
swap space.  That is why one reason there *should* be a least some swap
space even on a system w/ plenty of RAM.



-- 
Adam Vande More
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


RE: Swap Space

2011-01-05 Thread Gary Gatten

> Correct me if I'm wrong, but if necessary one could add (and
> activate) a secondary / additional swap file if necessary without
> rebooting.  So maybe start with a few gig and add an additional swap
> file if necessary?

Swapping to a file is really slow and should only be done if absolutely
necessary since every read/write has to go through the filesystem code
which it doesn't do if done via a swap slice.

Good point.  It's been several years and back on v5 or 6 when I did something 
like this.  If there's unpartitioned space on the drive, can one add a 
secondary swap partition real-time?  I forget what I did here - I'm sure I 
followed what's in the handbook re swap space.  Probably did a swap file...








"This email is intended to be reviewed by only the intended recipient
 and may contain information that is privileged and/or confidential.
 If you are not the intended recipient, you are hereby notified that
 any review, use, dissemination, disclosure or copying of this email
 and its attachments, if any, is strictly prohibited.  If you have
 received this email in error, please immediately notify the sender by
 return email and delete this email from your system."


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Swap Space

2011-01-05 Thread Bruce Cran
On Wed, 5 Jan 2011 17:20:48 -0600
Gary Gatten  wrote:

> Correct me if I'm wrong, but if necessary one could add (and
> activate) a secondary / additional swap file if necessary without
> rebooting.  So maybe start with a few gig and add an additional swap
> file if necessary?

Swapping to a file is really slow and should only be done if absolutely
necessary since every read/write has to go through the filesystem code
which it doesn't do if done via a swap slice.

-- 
Bruce Cran
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


RE: Swap Space

2011-01-05 Thread Gary Gatten

> I will be installing 8.1 on a Dell Poweredge 2850, with dual 3 GHz XEON
> processors and 6GB RAM.
>
> What is the recommended swap space?
>
>
> I'm finding conflicting data on this.  Some say 0, some say 1 times RAM,
> others say stay with 2 x RAM.
>

Definitely not 0, but 2x would probably be way too much IMO. 4 - 6 GB should
be enough for most use cases.


Correct me if I'm wrong, but if necessary one could add (and activate) a 
secondary / additional swap file if necessary without rebooting.  So maybe 
start with a few gig and add an additional swap file if necessary?








"This email is intended to be reviewed by only the intended recipient
 and may contain information that is privileged and/or confidential.
 If you are not the intended recipient, you are hereby notified that
 any review, use, dissemination, disclosure or copying of this email
 and its attachments, if any, is strictly prohibited.  If you have
 received this email in error, please immediately notify the sender by
 return email and delete this email from your system."


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Swap Space

2011-01-05 Thread Adam Vande More
On Wed, Jan 5, 2011 at 4:33 PM, Jeff Whitman wrote:

> I will be installing 8.1 on a Dell Poweredge 2850, with dual 3 GHz XEON
> processors and 6GB RAM.
>
> What is the recommended swap space?
>
>
> I'm finding conflicting data on this.  Some say 0, some say 1 times RAM,
> others say stay with 2 x RAM.
>

Definitely not 0, but 2x would probably be way too much IMO. 4 - 6 GB should
be enough for most use cases.


-- 
Adam Vande More
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Swap Space

2011-01-05 Thread Jeff Whitman
I will be installing 8.1 on a Dell Poweredge 2850, with dual 3 GHz XEON
processors and 6GB RAM.  

 

What is the recommended swap space?  

 

I'm finding conflicting data on this.  Some say 0, some say 1 times RAM,
others say stay with 2 x RAM.

 

Thank you

 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: VirtualBox: out of swap space

2010-08-09 Thread Rusty Nejdl
On Mon, 9 Aug 2010 17:37:39 +0200, Samuel Martín Moro
 wrote:
> Hi,
> 
> 
> I'm trying to have a few BSD VMs (4.7, 5.5, 6.2, 7.2, 8.1)
> running under VirtualBox-OSE / FreeBSD-8.1-RELEASE-amd64
> 
> 
> First problem:
>   Sometimes, when I start a VM, all other running VM stop,
>   their status switch to 'abort' (or whatever the
>   traduction is, here it's "avorté").
>   Reading my /var/log/messages, I see a few
>   'pid  (VirtualBox), uid 0, was killed: out of swap space'
> 
>   I've got 8Gb of RAM, and so assumed I wouldn't need any swap.
>   Was I wrong?
>   Have I to reinstall my server to add some swap?
>   (and if so, how much?!)

Samuel,

It is generally a bad idea not to have a swap partition.  I have 12GB
of memory and I even hit swap, though very little.

[tethys]:/home/rnejdl> swapinfo -h
Device  1K-blocks UsedAvail Capacity
/dev/ada0s1b  4194304 4.5M 4.0G 0%

I have 4GB on mine and that is plenty.

I don't have answers for the below though.

Sincerely,
Rusty Nejdl

> 
> 
>   btw, my PC (home) have the same HWare (core i7 930, 8Gb DDR3)
>   I can run two 8.1-RELEASE (amd64 + i386), and two debian
>   while host is running compiz and all that gay stuff...
>   (ArchLinux x86_64)
> 
>   except VirtualBox, the server I'm having problems with, is
>   hosting some nfs shares and running ion2 (since VBoxVNC
>   segfaults... I need a WM). And that's it.
> 
> 
> Second problem:
>   When I'm creating a disk (in VirtualBox), and while there's
>   some scp or so running on other guests, these guests display
>   some gvfs errors, about not finding ad0.
>   Sometimes, they just halt, and wait I pressed a key to reboot.
> 
> 
> Third problem:
>   I already posted that on emulation this morning:
>   I can't boot FreeBSD-8.1-amd64. It's stuck in
>   'md0: preloaded image  x bytes 0xsomewhere'
>   nothing else happend...
> 
> 
> I could have finished already if I just had installed a Linux
> host in the first place...
> I read so much posts recently, from FreeBSD/VBox users, saying
> everything's working just fine.
> I assumed it would be OK.
> Obviously not...
> 
> Is there some hope sticking with BSD?
> (if I can get rid of the swap and the 8.1 problems, it would
> be fine enough)
> 
> 
> I'm seriously thinking on dropping that BSD idea, and choosing
> some random linux to make it work... (and maybe, try xen...)
> 
> 
> What should I do?
> 
> Thanks for any advices.
> 
> 
> Samuel Martín Moro
> {EPITECH.} tek4
> CamTrace S.A.S
>   (+033) 1 41 38 37 60
>   1 Allée de la Venelle
>   92150 Suresnes
>   FRANCE
> 
> "Nobody wants to say how this works.
>   Maybe nobody knows ..."
>   Xorg.conf(5)
> ___
> freebsd-emulat...@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-emulation
> To unsubscribe, send any mail to "freebsd-emulation-unsubscr...@freebsd.org"

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


VirtualBox: out of swap space

2010-08-09 Thread Samuel Martín Moro
Hi,


I'm trying to have a few BSD VMs (4.7, 5.5, 6.2, 7.2, 8.1)
running under VirtualBox-OSE / FreeBSD-8.1-RELEASE-amd64


First problem:
  Sometimes, when I start a VM, all other running VM stop,
  their status switch to 'abort' (or whatever the
  traduction is, here it's "avorté").
  Reading my /var/log/messages, I see a few
  'pid  (VirtualBox), uid 0, was killed: out of swap space'

  I've got 8Gb of RAM, and so assumed I wouldn't need any swap.
  Was I wrong?
  Have I to reinstall my server to add some swap?
  (and if so, how much?!)


  btw, my PC (home) have the same HWare (core i7 930, 8Gb DDR3)
  I can run two 8.1-RELEASE (amd64 + i386), and two debian
  while host is running compiz and all that gay stuff...
  (ArchLinux x86_64)

  except VirtualBox, the server I'm having problems with, is
  hosting some nfs shares and running ion2 (since VBoxVNC
  segfaults... I need a WM). And that's it.


Second problem:
  When I'm creating a disk (in VirtualBox), and while there's
  some scp or so running on other guests, these guests display
  some gvfs errors, about not finding ad0.
  Sometimes, they just halt, and wait I pressed a key to reboot.


Third problem:
  I already posted that on emulation this morning:
  I can't boot FreeBSD-8.1-amd64. It's stuck in
  'md0: preloaded image  x bytes 0xsomewhere'
  nothing else happend...


I could have finished already if I just had installed a Linux
host in the first place...
I read so much posts recently, from FreeBSD/VBox users, saying
everything's working just fine.
I assumed it would be OK.
Obviously not...

Is there some hope sticking with BSD?
(if I can get rid of the swap and the 8.1 problems, it would
be fine enough)


I'm seriously thinking on dropping that BSD idea, and choosing
some random linux to make it work... (and maybe, try xen...)


What should I do?

Thanks for any advices.


Samuel Martín Moro
{EPITECH.} tek4
CamTrace S.A.S
  (+033) 1 41 38 37 60
  1 Allée de la Venelle
  92150 Suresnes
  FRANCE

"Nobody wants to say how this works.
  Maybe nobody knows ..."
  Xorg.conf(5)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: shrinking swap space

2010-07-10 Thread John Almberg

Robert & Chuck,

Thanks for your answers... they sound like good clues. I'll need to read 
up some more to understand the answers :-)


Thanks!

-- John
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: shrinking swap space

2010-07-09 Thread Chuck Swiger
Hi--

On Jul 9, 2010, at 6:18 AM, John Almberg wrote:
> Is there a utility that shows which programs are using swap space? Or that 
> can help debug this problem?

Try: "top -o size"

Regards,
-- 
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: shrinking swap space

2010-07-09 Thread Robert Bonomi
> From owner-freebsd-questi...@freebsd.org  Fri Jul  9 08:18:56 2010
> Date: Fri, 09 Jul 2010 09:18:01 -0400
> From: John Almberg 
> To: freebsd-questions@freebsd.org
> Subject: shrinking swap space
>
> Since my server locked me out last week because it was out of swap 
> space, I've been monitoring the swap space every 4 hours. It started off 
> with 3% used and little by little it has crept up to 17% this morning.
>
> I've been reading up on the subject in my two FreeBSD books (Absolute 
> and Complete) but neither give me a hint on how to find the program(s) 
> that are slowly eating up my swap space.
>
> Is there a utility that shows which programs are using swap space? Or 
> that can help debug this problem?

'ps' is your friend.  it will show you the 'total' memory used by each
process, *AND* the 'working set' size.  The working set is the part of that
process's address-space that is currently mapped into RAM.  The -difference-
betwen the total size, and the working set size is the swap usage.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


shrinking swap space

2010-07-09 Thread John Almberg
Since my server locked me out last week because it was out of swap 
space, I've been monitoring the swap space every 4 hours. It started off 
with 3% used and little by little it has crept up to 17% this morning.


I've been reading up on the subject in my two FreeBSD books (Absolute 
and Complete) but neither give me a hint on how to find the program(s) 
that are slowly eating up my swap space.


Is there a utility that shows which programs are using swap space? Or 
that can help debug this problem?


Thanks: JOhn
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Using mdconfig for swap space

2009-09-09 Thread Jerry McAllister
On Wed, Sep 09, 2009 at 04:46:56PM +0100, Daniel Bye wrote:

> On Wed, Sep 09, 2009 at 10:59:23AM -0400, Jerry McAllister wrote:
> > On Wed, Sep 09, 2009 at 11:57:07AM +0100, Daniel Bye wrote:
> > 
> > > On Tue, Sep 08, 2009 at 07:52:59PM -0400, Jerry McAllister wrote:
> > > > On Tue, Sep 08, 2009 at 04:51:20PM -0500, Peter Steele wrote:
> > > > 
> > > > > Are there any advantages to using mdconfig and creating a virtual 
> > > > > disk for swap space as opposed to having a designated swap partition? 
> > > > > For example, I could do something like this:
> > > > 
> > > > Unless I am missing something basic here, it seems like a bad idea to 
> > > > me - to carve out and use up some memory to use as extra storage for 
> > > > processes that need more memory that you have taken away to give to 
> > > > swap.  
> > > > That is self defeating.
> > > > 
> > > > In addition, one use of swap is to write dumps to if there is a crash. 
> > > > If you put it in memory, it is gone when you reboot.
> > > 
> > > He's talking about using a swap file, rather than a dedicated partition 
> > > on 
> > > the disk, not in RAM! Although it is slightly slower, as Chuck has 
> > > already 
> > > pointed out, it might, in certain circumstances, be a somewhat more 
> > > convenient solution than repartitioning/reinstalling the whole system.
> > > 
> > > And as RW has said, the facility already exists and can be enabled with a
> > > couple of knobs in /etc/rc.conf.
> > 
> > I understand using a file and making it in to swapspace.  I have used that
> > a couple of times when I needed to add some swap space temporarily.   But 
> > isn't the command he is trying to use (mdconfig) for creating a memory 
> > filesystem - eg use a chunk of memory and make a file from it (then use it 
> > for swap or whatever)?That is in RAM.
> 
> No, with the -t vnode and -f  options, he'd actually be creating
> a file-backed memory disk. The terminology can be a little confusing, but
> in this instance the file wouldn't be loaded into RAM, but would instead
> be treated as any other disk-like device. It's exactly the same approach
> as used by /etc/rc.d/addswap, which gets its configuration from $swapfile
> set in /etc/rc.conf.

I see that now, but it seems like the long way around to
get to what you get with a swapon.
Oh well.

jerry


> 
> Dan
> 
> -- 
> Daniel Bye
>  _
>   ASCII ribbon campaign ( )
>  - against HTML, vCards and  X
> - proprietary attachments in e-mail / \


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Using mdconfig for swap space

2009-09-09 Thread Jerry McAllister
On Wed, Sep 09, 2009 at 11:23:14AM -0400, Lowell Gilbert wrote:

> Jerry McAllister  writes:
> 
> > On Wed, Sep 09, 2009 at 11:57:07AM +0100, Daniel Bye wrote:
> >
> >> On Tue, Sep 08, 2009 at 07:52:59PM -0400, Jerry McAllister wrote:
> >> > On Tue, Sep 08, 2009 at 04:51:20PM -0500, Peter Steele wrote:
> >> > 
> >> > > Are there any advantages to using mdconfig and creating a virtual disk 
> >> > > for swap space as opposed to having a designated swap partition? For 
> >> > > example, I could do something like this:
> >> > 
> >> > Unless I am missing something basic here, it seems like a bad idea to 
> >> > me - to carve out and use up some memory to use as extra storage for 
> >> > processes that need more memory that you have taken away to give to 
> >> > swap.  
> >> > That is self defeating.
> >> > 
> >> > In addition, one use of swap is to write dumps to if there is a crash. 
> >> > If you put it in memory, it is gone when you reboot.
> >> 
> >> He's talking about using a swap file, rather than a dedicated partition on 
> >> the disk, not in RAM! Although it is slightly slower, as Chuck has already 
> >> pointed out, it might, in certain circumstances, be a somewhat more 
> >> convenient solution than repartitioning/reinstalling the whole system.
> >> 
> >> And as RW has said, the facility already exists and can be enabled with a
> >> couple of knobs in /etc/rc.conf.
> >
> > I understand using a file and making it in to swapspace.  I have used that
> > a couple of times when I needed to add some swap space temporarily.   But 
> > isn't the command he is trying to use (mdconfig) for creating a memory 
> > filesystem - eg use a chunk of memory and make a file from it (then use it 
> > for swap or whatever)?That is in RAM.
> 
> Not necessarily.  What he wants is the '-t vnode' option for mdconfig(8).

Hmmm.   Haven't dealt with that before.   
Still seems like either a regular file or a dedicated partition
would be best.

jerry


> 
> -- 
> Lowell Gilbert, embedded/networking software engineer, Boston area
>   http://be-well.ilk.org/~lowell/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Using mdconfig for swap space

2009-09-09 Thread Daniel Bye
On Wed, Sep 09, 2009 at 10:59:23AM -0400, Jerry McAllister wrote:
> On Wed, Sep 09, 2009 at 11:57:07AM +0100, Daniel Bye wrote:
> 
> > On Tue, Sep 08, 2009 at 07:52:59PM -0400, Jerry McAllister wrote:
> > > On Tue, Sep 08, 2009 at 04:51:20PM -0500, Peter Steele wrote:
> > > 
> > > > Are there any advantages to using mdconfig and creating a virtual disk 
> > > > for swap space as opposed to having a designated swap partition? For 
> > > > example, I could do something like this:
> > > 
> > > Unless I am missing something basic here, it seems like a bad idea to 
> > > me - to carve out and use up some memory to use as extra storage for 
> > > processes that need more memory that you have taken away to give to swap. 
> > >  
> > > That is self defeating.
> > > 
> > > In addition, one use of swap is to write dumps to if there is a crash. 
> > > If you put it in memory, it is gone when you reboot.
> > 
> > He's talking about using a swap file, rather than a dedicated partition on 
> > the disk, not in RAM! Although it is slightly slower, as Chuck has already 
> > pointed out, it might, in certain circumstances, be a somewhat more 
> > convenient solution than repartitioning/reinstalling the whole system.
> > 
> > And as RW has said, the facility already exists and can be enabled with a
> > couple of knobs in /etc/rc.conf.
> 
> I understand using a file and making it in to swapspace.  I have used that
> a couple of times when I needed to add some swap space temporarily.   But 
> isn't the command he is trying to use (mdconfig) for creating a memory 
> filesystem - eg use a chunk of memory and make a file from it (then use it 
> for swap or whatever)?That is in RAM.

No, with the -t vnode and -f  options, he'd actually be creating
a file-backed memory disk. The terminology can be a little confusing, but
in this instance the file wouldn't be loaded into RAM, but would instead
be treated as any other disk-like device. It's exactly the same approach
as used by /etc/rc.d/addswap, which gets its configuration from $swapfile
set in /etc/rc.conf.

Dan

-- 
Daniel Bye
 _
  ASCII ribbon campaign ( )
 - against HTML, vCards and  X
- proprietary attachments in e-mail / \


pgpucoDWr6Wwu.pgp
Description: PGP signature


RE: Using mdconfig for swap space

2009-09-09 Thread Peter Steele
>It's easy to *try* the swap files.  Then measure the performance.  
>If the behaviour is really as specific to your custom application as you 
>indicate, then general advice may not apply either.

In fact, after discussing this with the team, we are going to do exactly that. 
We'll allocate an extra 8GB of swap space through an image file and let QA run 
their stress tests to see how things behave. That's the only way to know for 
sure if this will work for us.

Thanks for the feedback.

Peter

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Using mdconfig for swap space

2009-09-09 Thread Lowell Gilbert
Jerry McAllister  writes:

> On Wed, Sep 09, 2009 at 11:57:07AM +0100, Daniel Bye wrote:
>
>> On Tue, Sep 08, 2009 at 07:52:59PM -0400, Jerry McAllister wrote:
>> > On Tue, Sep 08, 2009 at 04:51:20PM -0500, Peter Steele wrote:
>> > 
>> > > Are there any advantages to using mdconfig and creating a virtual disk 
>> > > for swap space as opposed to having a designated swap partition? For 
>> > > example, I could do something like this:
>> > 
>> > Unless I am missing something basic here, it seems like a bad idea to 
>> > me - to carve out and use up some memory to use as extra storage for 
>> > processes that need more memory that you have taken away to give to swap.  
>> > That is self defeating.
>> > 
>> > In addition, one use of swap is to write dumps to if there is a crash. 
>> > If you put it in memory, it is gone when you reboot.
>> 
>> He's talking about using a swap file, rather than a dedicated partition on 
>> the disk, not in RAM! Although it is slightly slower, as Chuck has already 
>> pointed out, it might, in certain circumstances, be a somewhat more 
>> convenient solution than repartitioning/reinstalling the whole system.
>> 
>> And as RW has said, the facility already exists and can be enabled with a
>> couple of knobs in /etc/rc.conf.
>
> I understand using a file and making it in to swapspace.  I have used that
> a couple of times when I needed to add some swap space temporarily.   But 
> isn't the command he is trying to use (mdconfig) for creating a memory 
> filesystem - eg use a chunk of memory and make a file from it (then use it 
> for swap or whatever)?That is in RAM.

Not necessarily.  What he wants is the '-t vnode' option for mdconfig(8).

-- 
Lowell Gilbert, embedded/networking software engineer, Boston area
http://be-well.ilk.org/~lowell/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Using mdconfig for swap space

2009-09-09 Thread Maciej Suszko
Peter Steele  wrote:
> Thanks for the responses. The reason I'm looking at doing this is
> that we have increased memory on our platform from 4GB to 8GB and
> therefore have to increase swap space from 8GB to 16GB. We have
> enough space in our /var partition that we could add a swap file
> there and not have to touch the existing partition layout. I like the
> simplicity of the swap file approach, but we have an application that
> is very sensitive to I/O performance and I'm a little wary what this
> could mean. QA I know would have a field day in trying to pound the
> system with all sorts of stress tests. I think a dedicated swap
> partition is probably a safer option.

Nowadays having swap twice as RAM is not necessary. If your system
wasn't swapping much in the past you can safely stay with 4G in my
opinion... extending it to 16G would be waste of space :)
-- 
regards, Maciej Suszko.


signature.asc
Description: PGP signature


Re: Using mdconfig for swap space

2009-09-09 Thread Lowell Gilbert
Peter Steele  writes:

>>Nowadays having swap twice as RAM is not necessary. If your system
>>wasn't swapping much in the past you can safely stay with 4G in my
>>opinion... extending it to 16G would be waste of space :)
>
> I won't bore you with the details but in fact our application *does*
> require this much swap space, but not for the typical reasons. It's a
> side effect of how our application works and we thought we could make
> use of an image file for the extra swap rather than repartitioning,
> but I've read too many warnings against going this route so I've
> decided to stick with increasing the size of the swap partition.

It's easy to *try* the swap files.  Then measure the performance.  
If the behaviour is really as specific to your custom application 
as you indicate, then general advice may not apply either.

-- 
Lowell Gilbert, embedded/networking software engineer, Boston area
http://be-well.ilk.org/~lowell/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Using mdconfig for swap space

2009-09-09 Thread Jerry McAllister
On Wed, Sep 09, 2009 at 11:57:07AM +0100, Daniel Bye wrote:

> On Tue, Sep 08, 2009 at 07:52:59PM -0400, Jerry McAllister wrote:
> > On Tue, Sep 08, 2009 at 04:51:20PM -0500, Peter Steele wrote:
> > 
> > > Are there any advantages to using mdconfig and creating a virtual disk 
> > > for swap space as opposed to having a designated swap partition? For 
> > > example, I could do something like this:
> > 
> > Unless I am missing something basic here, it seems like a bad idea to 
> > me - to carve out and use up some memory to use as extra storage for 
> > processes that need more memory that you have taken away to give to swap.  
> > That is self defeating.
> > 
> > In addition, one use of swap is to write dumps to if there is a crash. 
> > If you put it in memory, it is gone when you reboot.
> 
> He's talking about using a swap file, rather than a dedicated partition on 
> the disk, not in RAM! Although it is slightly slower, as Chuck has already 
> pointed out, it might, in certain circumstances, be a somewhat more 
> convenient solution than repartitioning/reinstalling the whole system.
> 
> And as RW has said, the facility already exists and can be enabled with a
> couple of knobs in /etc/rc.conf.

I understand using a file and making it in to swapspace.  I have used that
a couple of times when I needed to add some swap space temporarily.   But 
isn't the command he is trying to use (mdconfig) for creating a memory 
filesystem - eg use a chunk of memory and make a file from it (then use it 
for swap or whatever)?That is in RAM.

jerry

> 
> Dan
> 
> -- 
> Daniel Bye
>  _
>   ASCII ribbon campaign ( )
>  - against HTML, vCards and  X
> - proprietary attachments in e-mail / \


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


RE: Using mdconfig for swap space

2009-09-09 Thread Peter Steele
>Nowadays having swap twice as RAM is not necessary. If your system wasn't 
>swapping much in the past you can safely stay with 4G in my opinion... 
>extending it to 16G >would be waste of space :)

I won't bore you with the details but in fact our application *does* require 
this much swap space, but not for the typical reasons. It's a side effect of 
how our application works and we thought we could make use of an image file for 
the extra swap rather than repartitioning, but I've read too many warnings 
against going this route so I've decided to stick with increasing the size of 
the swap partition.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Using mdconfig for swap space

2009-09-09 Thread Mel Flynn
On Wednesday 09 September 2009 15:07:37 Peter Steele wrote:
> Thanks for the responses. The reason I'm looking at doing this is that we
> have increased memory on our platform from 4GB to 8GB and therefore have to
> increase swap space from 8GB to 16GB.

No you don't. It's advised, but not mandatory.

> We have enough space in our /var
> partition that we could add a swap file there and not have to touch the
> existing partition layout. I like the simplicity of the swap file approach,
> but we have an application that is very sensitive to I/O performance and
> I'm a little wary what this could mean. QA I know would have a field day in
> trying to pound the system with all sorts of stress tests. I think a
> dedicated swap partition is probably a safer option.

Any I/O bound application suffers from any kind of swap. You would do better 
to first establish how this application suffers once you start swapping. If 
your machine needs more then or even close to 8GB of swap, I doubt the 
applications are responsive to begin with. With 8GB of memory, it's probably 
better to have 2GB of swap, so that offending applications are killed off 
sooner and the machine is able to recover sooner. But - I'm assuming this is a 
server, for a multimedia machine - editing large images or videos - more swap 
is beneficial as inactive images/videos can be swapped out.

-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


RE: Using mdconfig for swap space

2009-09-09 Thread Peter Steele
Thanks for the responses. The reason I'm looking at doing this is that we have 
increased memory on our platform from 4GB to 8GB and therefore have to increase 
swap space from 8GB to 16GB. We have enough space in our /var partition that we 
could add a swap file there and not have to touch the existing partition 
layout. I like the simplicity of the swap file approach, but we have an 
application that is very sensitive to I/O performance and I'm a little wary 
what this could mean. QA I know would have a field day in trying to pound the 
system with all sorts of stress tests. I think a dedicated swap partition is 
probably a safer option.

Peter

-Original Message-
From: owner-freebsd-questi...@freebsd.org 
[mailto:owner-freebsd-questi...@freebsd.org] On Behalf Of Daniel Bye
Sent: Wednesday, September 09, 2009 3:57 AM
To: 'freebsd-questions@freebsd.org'
Subject: Re: Using mdconfig for swap space

On Tue, Sep 08, 2009 at 07:52:59PM -0400, Jerry McAllister wrote:
> On Tue, Sep 08, 2009 at 04:51:20PM -0500, Peter Steele wrote:
> 
> > Are there any advantages to using mdconfig and creating a virtual disk for 
> > swap space as opposed to having a designated swap partition? For example, I 
> > could do something like this:
> 
> Unless I am missing something basic here, it seems like a bad idea to 
> me - to carve out and use up some memory to use as extra storage for 
> processes that need more memory that you have taken away to give to swap.
> That is self defeating.
> 
> In addition, one use of swap is to write dumps to if there is a crash. 
> If you put it in memory, it is gone when you reboot.

He's talking about using a swap file, rather than a dedicated partition on the 
disk, not in RAM! Although it is slightly slower, as Chuck has already pointed 
out, it might, in certain circumstances, be a somewhat more convenient solution 
than repartitioning/reinstalling the whole system.

And as RW has said, the facility already exists and can be enabled with a 
couple of knobs in /etc/rc.conf.

Dan

--
Daniel Bye
 _
  ASCII ribbon campaign ( )
 - against HTML, vCards and  X
- proprietary attachments in e-mail / \
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Using mdconfig for swap space

2009-09-09 Thread Daniel Bye
On Tue, Sep 08, 2009 at 07:52:59PM -0400, Jerry McAllister wrote:
> On Tue, Sep 08, 2009 at 04:51:20PM -0500, Peter Steele wrote:
> 
> > Are there any advantages to using mdconfig and creating a virtual disk for 
> > swap space as opposed to having a designated swap partition? For example, I 
> > could do something like this:
> 
> Unless I am missing something basic here, it seems like a bad idea to 
> me - to carve out and use up some memory to use as extra storage for 
> processes that need more memory that you have taken away to give to swap.  
> That is self defeating.
> 
> In addition, one use of swap is to write dumps to if there is a crash. 
> If you put it in memory, it is gone when you reboot.

He's talking about using a swap file, rather than a dedicated partition on 
the disk, not in RAM! Although it is slightly slower, as Chuck has already 
pointed out, it might, in certain circumstances, be a somewhat more 
convenient solution than repartitioning/reinstalling the whole system.

And as RW has said, the facility already exists and can be enabled with a
couple of knobs in /etc/rc.conf.

Dan

-- 
Daniel Bye
 _
  ASCII ribbon campaign ( )
 - against HTML, vCards and  X
- proprietary attachments in e-mail / \


pgpMvbL6kGGlc.pgp
Description: PGP signature


Re: Using mdconfig for swap space

2009-09-08 Thread RW
On Tue, 8 Sep 2009 16:51:20 -0500
Peter Steele  wrote:

> Are there any advantages to using mdconfig and creating a virtual
> disk for swap space as opposed to having a designated swap partition?
> For example, I could do something like this:
> 
> mdconfig -a -t swap -f /var/swap0 -s 4g
> swapon -a /dev/md0

FWIW that's already supported by adding  swapfile="/var/swap0" to
rc.conf

Your arguments are wrong BTW "-t swap" creates a device *backed* by
swap. And the size comes from the size of the supplied file - which you
typically create with dd.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Using mdconfig for swap space

2009-09-08 Thread Jerry McAllister
On Tue, Sep 08, 2009 at 04:51:20PM -0500, Peter Steele wrote:

> Are there any advantages to using mdconfig and creating a virtual disk for 
> swap space as opposed to having a designated swap partition? For example, I 
> could do something like this:

Unless I am missing something basic here, it seems like a bad idea to 
me - to carve out and use up some memory to use as extra storage for 
processes that need more memory that you have taken away to give to swap.  
That is self defeating.

In addition, one use of swap is to write dumps to if there is a crash. 
If you put it in memory, it is gone when you reboot.

jerry


> 
> mdconfig -a -t swap -f /var/swap0 -s 4g
> swapon -a /dev/md0
> 
> to add 4G to the system swap space backed by the file /var/swap0. How would 
> this compare to repartitioning my hard drive and adding a new 4GB swap 
> partition?
> 
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
> 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Using mdconfig for swap space

2009-09-08 Thread Adam Vande More
On Tue, Sep 8, 2009 at 4:51 PM, Peter Steele  wrote:

> Are there any advantages to using mdconfig and creating a virtual disk for
> swap space as opposed to having a designated swap partition? For example, I
> could do something like this:
>
> mdconfig -a -t swap -f /var/swap0 -s 4g
> swapon -a /dev/md0
>
> to add 4G to the system swap space backed by the file /var/swap0. How would
> this compare to repartitioning my hard drive and adding a new 4GB swap
> partition?
>
> In general, this is not a good idea.  Your system will ideally not use swap
space at all, and if it's using it a lot then it could sure use the extra
ram consumed by the md drive instead of in swap.  Most likely to slow your
system down, not speed it up.  If you're going to do anything, it's best to
keep swap on a separate disk, or on the outer part of disk.


-- 
Adam Vande More
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Using mdconfig for swap space

2009-09-08 Thread Chuck Swiger

Hi, Peter--

On Sep 8, 2009, at 2:51 PM, Peter Steele wrote:
Are there any advantages to using mdconfig and creating a virtual  
disk for swap space as opposed to having a designated swap  
partition? For example, I could do something like this:


mdconfig -a -t swap -f /var/swap0 -s 4g
swapon -a /dev/md0

to add 4G to the system swap space backed by the file /var/swap0.  
How would this compare to repartitioning my hard drive and adding a  
new 4GB swap partition?


First, using -f means using -t vnode.  Secondly, swapping directly to  
a swap partition is mildly faster than having to navigate through the  
filesystem layers to do swapfile based swapping.  Other platforms have  
chosen to go with the dynamically created and deleted swapfiles  
(under /var/vm/swapfile0, 1, etc for example) to allow the system to  
adjust the amount of disk used for swapspace dynamically.


With disk space costing a matter of a few cents per gigabyte nowadays,  
setting up a dedicated swap partition and just letting it do it's  
thing is much easier than trying to fiddle around with alternatives,  
IMHO, but you're welcome to experiment and see whether you end up with  
something which is actually better for your circumstances


Regards,
--
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Using mdconfig for swap space

2009-09-08 Thread Peter Steele
Are there any advantages to using mdconfig and creating a virtual disk for swap 
space as opposed to having a designated swap partition? For example, I could do 
something like this:

mdconfig -a -t swap -f /var/swap0 -s 4g
swapon -a /dev/md0

to add 4G to the system swap space backed by the file /var/swap0. How would 
this compare to repartitioning my hard drive and adding a new 4GB swap 
partition?

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


RE: Should swap space be mirrored via geom?

2009-01-14 Thread Peter Steele
> If you don't mirror swap space, and a drive goes out, you're almost  
> certain to experience a kernel panic and not just application failures

> in userland.  Unless you have an urgent need for lots of swap space  
> available, it's much better from the standpoint of system reliability

> to mirror swap also.

That's what we assumed might be the danger. It's pretty obvious when you
think about it ultimately and I'm curious why anyone would have
suggested not to mirror the swap partition. 

Thanks for the reply.

Peter

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Should swap space be mirrored via geom?

2009-01-14 Thread Chuck Swiger

On Jan 14, 2009, at 8:04 AM, Peter Steele wrote:
We have been debating whether or we should mirror the swap  
partitions as
well. I set it up not mirrored based on some articles I read on the  
net,

but we're concerned what might happen to a system if a drive died at a
time when the its swap partition contained active pages. My first
reaction would be that the applications bound to these pages would
crash, something that would not happen if we used swap mirroring.


If you don't mirror swap space, and a drive goes out, you're almost  
certain to experience a kernel panic and not just application failures  
in userland.  Unless you have an urgent need for lots of swap space  
available, it's much better from the standpoint of system reliability  
to mirror swap also.


Regards,
--
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Should swap space be mirrored via geom?

2009-01-14 Thread Peter Steele
We have systems setup using geom based mirroring where the drives are
partitioned into three slices, one for the OS, one for the swap
partition, and one for our application data. We have four hot-swappable
SATA drives per system. At present we only have the OS slice mirrored
with geom, and our own data partition is definitely not a candidate for
mirroring. The swap slice is not mirrored, so we end up with 4x4GB of
space on each system (which is probably way more than we need).

 

We have been debating whether or we should mirror the swap partitions as
well. I set it up not mirrored based on some articles I read on the net,
but we're concerned what might happen to a system if a drive died at a
time when the its swap partition contained active pages. My first
reaction would be that the applications bound to these pages would
crash, something that would not happen if we used swap mirroring.

 

Can anyone shed some light on this?

 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: SNMPD Consuming Swap Space

2008-11-27 Thread Lowell Gilbert
"Davenport, Steve M" <[EMAIL PROTECTED]> writes:

> Hello,
>  
> I am running snmpd 5.4.1.2 built from a port on 7-Release, hardware is
> Sun V100, 512Mb total memory, 381Mb free. The daemon starts fine. When a
> snmpwalk is done from another system all is well until the interface
> table and then I see:
>  
> interfaces.ifTable.ifEntry.ifSpeed.1 : Gauge32: 1000
> interfaces.ifTable.ifEntry.ifSpeed.2 : Gauge32: 0
> interfaces.ifTable.ifEntry.ifSpeed.3 : Gauge32: 0
> snmpwalk: No response arrived before timeout.
>
> After the timeout happens, looking at "swapinfo -k" shows that swap
> space is continually consumed until empty at which point the snmpd
> daemon is stopped:
>  
> fbsdh# swap_pager: out of swap space
> swap_pager_getswapspace(16): failed
> Nov 25 11:44:08 fbsdh kernel: pid 84674 (snmpd), uid 0, was killed: out
> of swap space
>  
> Now the swap space is freeded:
> fbsdh# swapinfo -k
> Device  1K-blocks UsedAvail Capacity
> /dev/ad0b 209916026456  2072704 1%
>  
> Has anyone seen this issue or know of a solution. 

Since you're running the SNMP daemon from a port, not the one from the
base system, you may need developers' assistance for this sort of bug.
Problems like this are often caused by wraparound bugs or infinite loops
in my experience, although there are lots of other possibilities.  If
you can get a stack traceback when it crashes, that will is quite likely
to give a solid clue.

-- 
Lowell Gilbert, embedded/networking software engineer, Boston area
http://be-well.ilk.org/~lowell/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


SNMPD Consuming Swap Space

2008-11-25 Thread Davenport, Steve M
Hello,
 
I am running snmpd 5.4.1.2 built from a port on 7-Release, hardware is
Sun V100, 512Mb total memory, 381Mb free. The daemon starts fine. When a
snmpwalk is done from another system all is well until the interface
table and then I see:
 
interfaces.ifTable.ifEntry.ifSpeed.1 : Gauge32: 1000
interfaces.ifTable.ifEntry.ifSpeed.2 : Gauge32: 0
interfaces.ifTable.ifEntry.ifSpeed.3 : Gauge32: 0
snmpwalk: No response arrived before timeout.

After the timeout happens, looking at "swapinfo -k" shows that swap
space is continually consumed until empty at which point the snmpd
daemon is stopped:
 
fbsdh# swap_pager: out of swap space
swap_pager_getswapspace(16): failed
Nov 25 11:44:08 fbsdh kernel: pid 84674 (snmpd), uid 0, was killed: out
of swap space
 
Now the swap space is freeded:
fbsdh# swapinfo -k
Device  1K-blocks UsedAvail Capacity
/dev/ad0b 209916026456  2072704 1%
 
Has anyone seen this issue or know of a solution. 
 
Thanks for your assistance,
Steve
 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Real Memory and Swap Space.

2006-11-08 Thread Dan Nelson
In the last episode (Nov 08), Grant Peel said:
> I have two older servers that started with 512 MB of RAM. 
> 
> I want to install two GIGs of RAM.
> 
> My swap space is set at 1 GB.
> 
> Whan I upgrade to two GB RAM, do I have to increase the swap slice?

Probably not, but it depends on your workload.  If you never ran out of
swap with 512MB, you probably won't with 2GB either.

You'll also want to enable mini crashdumps (add "debug.minidump=1" to
/etc/sysctl.conf), since if the system panics, it won't be able to dump
2GB of RAM into 1GB of swap :)

-- 
Dan Nelson
[EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Real Memory and Swap Space.

2006-11-08 Thread Grant Peel
Hi all,

I have two older servers that started with 512 MB of RAM. 

I want to install two GIGs of RAM.

My swap space is set at 1 GB.

Whan I upgrade to two GB RAM, do I have to increase the swap slice?

-GRant
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Running out of swap space????

2006-06-06 Thread Bill Moran
On Tue, 06 Jun 2006 09:13:22 -0500
Paul Schmehl <[EMAIL PROTECTED]> wrote:

> [EMAIL PROTECTED] wrote:
> > Quoting [EMAIL PROTECTED]:
> > 
> >>> -- Original message --
> >>> From: [EMAIL PROTECTED]
> >>> +pid 37308 (mysqld), uid 88, was killed: out of swap space
> >>> +swap_pager: out of swap space
> >>> +swap_pager_getswapspace(1): failed
> >>
> >> If you kill mysql server, does the swap space free up?  Are there any known
> >> issues between the version of MySQL that you're running and FreeBSD 6.0?
> > 
> > MySQL not having a properly tuned config file for the system it runs on?  
> > It is
> > known to consume vast amounts of resources if not properly configured... 
> > 
> I wrote a one line shell script that runs swapinfo -h and cron'd it to 
> run once an hour.  Each hour the amount of swap space being used has 
> increased by 100 to 200 MB.  Eventually swap is exhausted and the system 
> kills a binary.  (It's not just mysql.  Other things are being killed as 
> well.)

This is typical.  I believe that the process killed is the one swapped out
the longest, or maybe it's random?  Either way, the one killed usually
isn't the one using all the memory.

> What would cause swap to increase steadily like that?  Something not 
> releasing swap when it's no longer needed?

One of two things:
1) You have misconfigured an application to think it has _way_ more memory
   available than it does, so it just keeps using more and more memory,
   because you told it that it was OK to do so.
2) You are running an application with a memory leak.  Meaning: it allocates
   memory, then loses track of said allocation and re-allocates it later.
   Since it lost track, it's no longer using the memory, but can't tell
   the kernel to release the memory for other applications to use either.
   This is a bug in the application, not FreeBSD.

If you provide the full output of top to the list, I'm sure some problem
will jump out for someone on the list.  Wait till the system is close to
having no swap, then do "top > somefile" and paste the file into your
mailer.

-- 
Bill Moran
Collaborative Fusion Inc.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Running out of swap space????

2006-06-06 Thread Paul Schmehl

[EMAIL PROTECTED] wrote:

Quoting [EMAIL PROTECTED]:


-- Original message --
From: [EMAIL PROTECTED]
+pid 37308 (mysqld), uid 88, was killed: out of swap space
+swap_pager: out of swap space
+swap_pager_getswapspace(1): failed


If you kill mysql server, does the swap space free up?  Are there any known
issues between the version of MySQL that you're running and FreeBSD 6.0?


MySQL not having a properly tuned config file for the system it runs on?  It is
known to consume vast amounts of resources if not properly configured... 

I wrote a one line shell script that runs swapinfo -h and cron'd it to 
run once an hour.  Each hour the amount of swap space being used has 
increased by 100 to 200 MB.  Eventually swap is exhausted and the system 
kills a binary.  (It's not just mysql.  Other things are being killed as 
well.)


What would cause swap to increase steadily like that?  Something not 
releasing swap when it's no longer needed?


--
Paul Schmehl ([EMAIL PROTECTED])
Adjunct Information Security Officer
The University of Texas at Dallas
http://www.utdallas.edu/ir/security/


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Running out of swap space????

2006-06-06 Thread cknipe
Quoting [EMAIL PROTECTED]:

> > -- Original message --
> >From: [EMAIL PROTECTED]
> 
> >+pid 37308 (mysqld), uid 88, was killed: out of swap space
> >+swap_pager: out of swap space
> >+swap_pager_getswapspace(1): failed
> 
> 
> If you kill mysql server, does the swap space free up?  Are there any known
> issues between the version of MySQL that you're running and FreeBSD 6.0?

MySQL not having a properly tuned config file for the system it runs on?  It is
known to consume vast amounts of resources if not properly configured... 

Just a thought

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Running out of swap space????

2006-06-06 Thread bob . middaugh
> -- Original message --
>From: [EMAIL PROTECTED]

>+pid 37308 (mysqld), uid 88, was killed: out of swap space
>+swap_pager: out of swap space
>+swap_pager_getswapspace(1): failed


If you kill mysql server, does the swap space free up?  Are there any known 
issues between the version of MySQL that you're running and FreeBSD 6.0?

Just some thoughts,

Bob



--- Begin Message ---

I've got a server that is running out of swap space:

+pid 37308 (mysqld), uid 88, was killed: out of swap space
+swap_pager: out of swap space
+swap_pager_getswapspace(1): failed

The strange this is, this server has a 6GB swap partition!

swapinfo -h
Device  1K-blocks UsedAvail Capacity
/dev/da0s1b   6291456 2.6G 6.0G43%

This isn't exactly a resource-starved machine either:

CPU: AMD Opteron(tm) Processor 244 (1793.88-MHz K8-class CPU)
 Origin = "AuthenticAMD"  Id = 0xf5a  Stepping = 10

Features=0x78bfbff
 AMD Features=0xe0500800
real memory  = 2146893824 (2047 MB)
avail memory = 2065797120 (1970 MB)
ACPI APIC Table: 
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
cpu0 (BSP): APIC ID:  0
cpu1 (AP): APIC ID:  1

FreeBSD hostname.utdallas.edu 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Thu Mar 
30 19:25:18 CST 2006 
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/SMPKERNEL  amd64


last pid: 52327;  load averages:  0.45,  0.46,  0.45 
up 11+03:42:04  03:32:15

63 processes:  1 running, 62 sleeping
CPU states:  5.3% user,  0.0% nice,  0.8% system,  3.9% interrupt, 90.1% 
idle

Mem: 1410M Active, 126M Inact, 190M Wired, 82M Cache, 214M Buf, 78M Free
Swap: 6144M Total, 2687M Used, 3457M Free, 43% Inuse

Any suggestions are welcome - what could cause this?  How to troubleshoot? 
Possible solutions/workarounds?


Paul Schmehl ([EMAIL PROTECTED])
Adjunct Information Security Officer
The University of Texas at Dallas
http://www.utdallas.edu/ir/security/
--- End Message ---
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: Running out of swap space????

2006-06-05 Thread Dan Nelson
In the last episode (Jun 05), [EMAIL PROTECTED] said:
> I've got a server that is running out of swap space:
> 
> +pid 37308 (mysqld), uid 88, was killed: out of swap space
> +swap_pager: out of swap space
> +swap_pager_getswapspace(1): failed
> 
> The strange this is, this server has a 6GB swap partition!
> 
> swapinfo -h
> Device  1K-blocks UsedAvail Capacity
> /dev/da0s1b   6291456 2.6G 6.0G43%
> 
> This isn't exactly a resource-starved machine either:
> 
> real memory  = 2146893824 (2047 MB)
> avail memory = 2065797120 (1970 MB)
> 
> last pid: 52327;  load averages:  0.45,  0.46,  0.45 
> up 11+03:42:04  03:32:15
> 63 processes:  1 running, 62 sleeping
> CPU states:  5.3% user,  0.0% nice,  0.8% system,  3.9% interrupt, 90.1% idle
> Mem: 1410M Active, 126M Inact, 190M Wired, 82M Cache, 214M Buf, 78M Free
> Swap: 6144M Total, 2687M Used, 3457M Free, 43% Inuse

Seems sort of starved to me; 2GB of RAM yet you have enough processes
active to have allocated all of that plus 2.6GB of swap!  I wouldn't be
surprised if occasionally you allocated another 3GB, which would max
out your swap space.  With only 120 processes total, you can probably
just run top sorted by size (top -o size, or enter "osize" when it's
running) and look for large ones.

-- 
Dan Nelson
[EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Running out of swap space????

2006-06-05 Thread Björn König

[EMAIL PROTECTED] schrieb:

I've got a server that is running out of swap space:

+pid 37308 (mysqld), uid 88, was killed: out of swap space
+swap_pager: out of swap space
+swap_pager_getswapspace(1): failed

The strange this is, this server has a 6GB swap partition!

swapinfo -h
Device  1K-blocks UsedAvail Capacity
/dev/da0s1b   6291456 2.6G 6.0G43%

This isn't exactly a resource-starved machine either:

CPU: AMD Opteron(tm) Processor 244 (1793.88-MHz K8-class CPU)
 Origin = "AuthenticAMD"  Id = 0xf5a  Stepping = 10

Features=0x78bfbff

SE,SSE2>
 AMD Features=0xe0500800
real memory  = 2146893824 (2047 MB)
avail memory = 2065797120 (1970 MB)
ACPI APIC Table: 
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
cpu0 (BSP): APIC ID:  0
cpu1 (AP): APIC ID:  1

FreeBSD hostname.utdallas.edu 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Thu 
Mar 30 19:25:18 CST 2006 
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/SMPKERNEL  amd64


last pid: 52327;  load averages:  0.45,  0.46,  0.45 up 11+03:42:04  
03:32:15

63 processes:  1 running, 62 sleeping
CPU states:  5.3% user,  0.0% nice,  0.8% system,  3.9% interrupt, 90.1% 
idle

Mem: 1410M Active, 126M Inact, 190M Wired, 82M Cache, 214M Buf, 78M Free
Swap: 6144M Total, 2687M Used, 3457M Free, 43% Inuse

Any suggestions are welcome - what could cause this?


ps aux | sort -n +5

The latter processes need most memory.

How to 
troubleshoot?


This may be normal behaviour. It depends on the processes.


Possible solutions/workarounds?


It depends also. Possible solutions are: Add more RAM, add swap (see 
[1]) or run less processes.


[1] http://www.freebsd.org/handbook/adding-swap-space.html

Regards Björn
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Running out of swap space????

2006-06-05 Thread pauls

I've got a server that is running out of swap space:

+pid 37308 (mysqld), uid 88, was killed: out of swap space
+swap_pager: out of swap space
+swap_pager_getswapspace(1): failed

The strange this is, this server has a 6GB swap partition!

swapinfo -h
Device  1K-blocks UsedAvail Capacity
/dev/da0s1b   6291456 2.6G 6.0G43%

This isn't exactly a resource-starved machine either:

CPU: AMD Opteron(tm) Processor 244 (1793.88-MHz K8-class CPU)
 Origin = "AuthenticAMD"  Id = 0xf5a  Stepping = 10

Features=0x78bfbff
 AMD Features=0xe0500800
real memory  = 2146893824 (2047 MB)
avail memory = 2065797120 (1970 MB)
ACPI APIC Table: 
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
cpu0 (BSP): APIC ID:  0
cpu1 (AP): APIC ID:  1

FreeBSD hostname.utdallas.edu 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Thu Mar 
30 19:25:18 CST 2006 
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/SMPKERNEL  amd64


last pid: 52327;  load averages:  0.45,  0.46,  0.45 
up 11+03:42:04  03:32:15

63 processes:  1 running, 62 sleeping
CPU states:  5.3% user,  0.0% nice,  0.8% system,  3.9% interrupt, 90.1% 
idle

Mem: 1410M Active, 126M Inact, 190M Wired, 82M Cache, 214M Buf, 78M Free
Swap: 6144M Total, 2687M Used, 3457M Free, 43% Inuse

Any suggestions are welcome - what could cause this?  How to troubleshoot? 
Possible solutions/workarounds?


Paul Schmehl ([EMAIL PROTECTED])
Adjunct Information Security Officer
The University of Texas at Dallas
http://www.utdallas.edu/ir/security/


Re: portupgrade eats my swap space

2006-01-18 Thread Kris Kennaway
On Wed, Jan 18, 2006 at 02:50:10PM +0700, Roger Merritt wrote:

> OK, my problem doesn't seem to be exactly the same. My machine hangs, and 
> when I check it the console screen is filled with the message, "swap-pager: 
> indefinite wait buffer: bufobj: 0, blkno: 26650, size: 4096" and at that 
> point the only thing I can do is a hard reboot -- it's not reacting to 
> input at all.

You probably have a failing HD.  Back up and replace before the damage
becomes worse and you lose data.

> My /etc/make.conf in its entirety is
> 
> # added by use.perl 2006-01-18 08:04:37
> PERL_VER=5.8.7
> PERL_VERSION=5.8.7
> 
> I was surprised to find there is no /etc/defaults/make.conf any more -- 
> that may have something to do with it. I haven't been paying very close 
> attention until now.

Nope, it's in /usr/share/examples/etc/make.conf now.  The file is
entirely commented out so it was a NOP to have it in /etc/defaults.

Kris


pgpU5uVEvSu7w.pgp
Description: PGP signature


Re: portupgrade eats my swap space

2006-01-17 Thread Roger Merritt

At 12:55 AM 1/18/2006 -0500, you wrote:

On Wed, Jan 18, 2006 at 06:54:39AM +0100, P.U.Kruppa wrote:
> On Wed, 18 Jan 2006, Kris Kennaway wrote:
>
> >On Wed, Jan 18, 2006 at 04:25:57AM +0100, P.U.Kruppa wrote:
> >>Hi!
> >>
> >>OK, this is an old PIII 1 GHZ , 500 MB RAM  running
> >>6.0-STABLE FreeBSD 6.0-STABLE #0: Sun Jan 15 05:56:00 CET 2006
> >>
> >>When I start a
> >>
> >>  # portupgrade -a
> >>
> >>up to 671 MB swap are used and I see this message:
> >>
> >>  make: Max recursion level (500) exceeded.: Resource temporarily
> >>  unavailable
> >>
> >>and of course everything becomes really slow. Has anybody else
> >>seen this?
> >
> >You are setting an illegal variable in your make.conf or environment
> >that is causing the port makefile to recurse.  Probably USE_GCC or
> >some other USE_*.
> That could be a hint. I can find legal options in
>   /usr/ports/Mk/bsd.port.mk
> can I ?

Sort of..but it also lists options that are only legal within specific
port makefiles (like USE_*).

Post your make.conf and I'll probably be able to tell you what's wrong.

Kris


OK, my problem doesn't seem to be exactly the same. My machine hangs, and 
when I check it the console screen is filled with the message, "swap-pager: 
indefinite wait buffer: bufobj: 0, blkno: 26650, size: 4096" and at that 
point the only thing I can do is a hard reboot -- it's not reacting to 
input at all.


My /etc/make.conf in its entirety is

# added by use.perl 2006-01-18 08:04:37
PERL_VER=5.8.7
PERL_VERSION=5.8.7

I was surprised to find there is no /etc/defaults/make.conf any more -- 
that may have something to do with it. I haven't been paying very close 
attention until now.



--
Roger


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: portupgrade eats my swap space

2006-01-17 Thread Kris Kennaway
On Wed, Jan 18, 2006 at 08:12:49AM +0100, P.U.Kruppa wrote:
> On Wed, 18 Jan 2006, Kris Kennaway wrote:
> 
> >On Wed, Jan 18, 2006 at 07:51:12AM +0100, P.U.Kruppa wrote:
> >>On Wed, 18 Jan 2006, Kris Kennaway wrote:
> >>
> >>>On Wed, Jan 18, 2006 at 07:17:32AM +0100, P.U.Kruppa wrote:
> On Wed, 18 Jan 2006, Kris Kennaway wrote:
> 
> >>>
> >>>You are setting an illegal variable in your make.conf or environment
> >>>that is causing the port makefile to recurse.  Probably USE_GCC or
> >>>some other USE_*.
> >>That could be a hint. I can find legal options in
> >>/usr/ports/Mk/bsd.port.mk
> >>can I ?
> >
> >Sort of..but it also lists options that are only legal within specific
> >port makefiles (like USE_*).
> >
> >Post your make.conf and I'll probably be able to tell you what's wrong.
> This is it:
>   
> X_WINDOW_SYSTEM= xorg
> 
> CUPS_OVERWRITE_BASE=yes
> NO_LPR=yes
> 
> # WITH_FAM= yes
> USE_FAM=yes
> >>>
> >>>As I said, USE_* are illegal here and cause recursion.
> >>>
> >>>Kris
> >>>
> >>Thanks, I'll ask freebsd-gnome about that.
> >
> >What's to ask?  They'll tell you the same thing I did.
> It seems, they are substituting fam by gamin for gnome 2.14 . 
> Obviously I gathered the wrong make.conf settings for that from 
> some mail archieve. Since they are nice and patient people, they 
> will probably give me the right ones :-)

Surely WITH_FAM is what you meant.

Kris


pgpSRnTqGDTJv.pgp
Description: PGP signature


Re: portupgrade eats my swap space

2006-01-17 Thread P.U.Kruppa

On Wed, 18 Jan 2006, Kris Kennaway wrote:


On Wed, Jan 18, 2006 at 07:51:12AM +0100, P.U.Kruppa wrote:

On Wed, 18 Jan 2006, Kris Kennaway wrote:


On Wed, Jan 18, 2006 at 07:17:32AM +0100, P.U.Kruppa wrote:

On Wed, 18 Jan 2006, Kris Kennaway wrote:



You are setting an illegal variable in your make.conf or environment
that is causing the port makefile to recurse.  Probably USE_GCC or
some other USE_*.

That could be a hint. I can find legal options in
/usr/ports/Mk/bsd.port.mk
can I ?


Sort of..but it also lists options that are only legal within specific
port makefiles (like USE_*).

Post your make.conf and I'll probably be able to tell you what's wrong.

This is it:

X_WINDOW_SYSTEM= xorg

CUPS_OVERWRITE_BASE=yes
NO_LPR=yes

# WITH_FAM= yes
USE_FAM=yes


As I said, USE_* are illegal here and cause recursion.

Kris


Thanks, I'll ask freebsd-gnome about that.


What's to ask?  They'll tell you the same thing I did.
It seems, they are substituting fam by gamin for gnome 2.14 . 
Obviously I gathered the wrong make.conf settings for that from 
some mail archieve. Since they are nice and patient people, they 
will probably give me the right ones :-)


Uli.



Kris





*
* Peter Ulrich Kruppa - Wuppertal - Germany *
*
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: portupgrade eats my swap space

2006-01-17 Thread Kris Kennaway
On Wed, Jan 18, 2006 at 07:51:12AM +0100, P.U.Kruppa wrote:
> On Wed, 18 Jan 2006, Kris Kennaway wrote:
> 
> >On Wed, Jan 18, 2006 at 07:17:32AM +0100, P.U.Kruppa wrote:
> >>On Wed, 18 Jan 2006, Kris Kennaway wrote:
> >>
> >
> >You are setting an illegal variable in your make.conf or environment
> >that is causing the port makefile to recurse.  Probably USE_GCC or
> >some other USE_*.
> That could be a hint. I can find legal options in
>  /usr/ports/Mk/bsd.port.mk
> can I ?
> >>>
> >>>Sort of..but it also lists options that are only legal within specific
> >>>port makefiles (like USE_*).
> >>>
> >>>Post your make.conf and I'll probably be able to tell you what's wrong.
> >>This is it:
> >>
> >>X_WINDOW_SYSTEM= xorg
> >>
> >>CUPS_OVERWRITE_BASE=yes
> >>NO_LPR=yes
> >>
> >># WITH_FAM= yes
> >>USE_FAM=yes
> >
> >As I said, USE_* are illegal here and cause recursion.
> >
> >Kris
> >
> Thanks, I'll ask freebsd-gnome about that.

What's to ask?  They'll tell you the same thing I did.

Kris


pgpshDy5XY0Mk.pgp
Description: PGP signature


Re: portupgrade eats my swap space

2006-01-17 Thread P.U.Kruppa

On Wed, 18 Jan 2006, Kris Kennaway wrote:


On Wed, Jan 18, 2006 at 07:17:32AM +0100, P.U.Kruppa wrote:

On Wed, 18 Jan 2006, Kris Kennaway wrote:



You are setting an illegal variable in your make.conf or environment
that is causing the port makefile to recurse.  Probably USE_GCC or
some other USE_*.

That could be a hint. I can find legal options in
 /usr/ports/Mk/bsd.port.mk
can I ?


Sort of..but it also lists options that are only legal within specific
port makefiles (like USE_*).

Post your make.conf and I'll probably be able to tell you what's wrong.

This is it:

X_WINDOW_SYSTEM= xorg

CUPS_OVERWRITE_BASE=yes
NO_LPR=yes

# WITH_FAM= yes
USE_FAM=yes


As I said, USE_* are illegal here and cause recursion.

Kris


Thanks, I'll ask freebsd-gnome about that.

Uli.


*
* Peter Ulrich Kruppa - Wuppertal - Germany *
*
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: portupgrade eats my swap space

2006-01-17 Thread Kris Kennaway
On Wed, Jan 18, 2006 at 07:17:32AM +0100, P.U.Kruppa wrote:
> On Wed, 18 Jan 2006, Kris Kennaway wrote:
> 
> >>>
> >>>You are setting an illegal variable in your make.conf or environment
> >>>that is causing the port makefile to recurse.  Probably USE_GCC or
> >>>some other USE_*.
> >>That could be a hint. I can find legal options in
> >>  /usr/ports/Mk/bsd.port.mk
> >>can I ?
> >
> >Sort of..but it also lists options that are only legal within specific
> >port makefiles (like USE_*).
> >
> >Post your make.conf and I'll probably be able to tell you what's wrong.
> This is it:
>   
> X_WINDOW_SYSTEM= xorg
> 
> CUPS_OVERWRITE_BASE=yes
> NO_LPR=yes
> 
> # WITH_FAM= yes
> USE_FAM=yes

As I said, USE_* are illegal here and cause recursion.

Kris


pgpKzQOsrutKw.pgp
Description: PGP signature


Re: portupgrade eats my swap space

2006-01-17 Thread P.U.Kruppa

On Wed, 18 Jan 2006, Kris Kennaway wrote:



You are setting an illegal variable in your make.conf or environment
that is causing the port makefile to recurse.  Probably USE_GCC or
some other USE_*.

That could be a hint. I can find legal options in
  /usr/ports/Mk/bsd.port.mk
can I ?


Sort of..but it also lists options that are only legal within specific
port makefiles (like USE_*).

Post your make.conf and I'll probably be able to tell you what's wrong.

This is it:

X_WINDOW_SYSTEM= xorg

CUPS_OVERWRITE_BASE=yes
NO_LPR=yes

# WITH_FAM= yes
USE_FAM=yes
WITH_LAME= yes

WITH_APACHE2= yes

OVERRIDE_LINUX_BASE_PORT=rh-9

# added by use.perl 2005-12-26 20:43:23
PERL_VER=5.8.7
PERL_VERSION=5.8.7
---

Uli.



Kris





*
* Peter Ulrich Kruppa - Wuppertal - Germany *
*
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: portupgrade eats my swap space

2006-01-17 Thread Kris Kennaway
On Wed, Jan 18, 2006 at 06:54:39AM +0100, P.U.Kruppa wrote:
> On Wed, 18 Jan 2006, Kris Kennaway wrote:
> 
> >On Wed, Jan 18, 2006 at 04:25:57AM +0100, P.U.Kruppa wrote:
> >>Hi!
> >>
> >>OK, this is an old PIII 1 GHZ , 500 MB RAM  running
> >>6.0-STABLE FreeBSD 6.0-STABLE #0: Sun Jan 15 05:56:00 CET 2006
> >>
> >>When I start a
> >>
> >>  # portupgrade -a
> >>
> >>up to 671 MB swap are used and I see this message:
> >>
> >>  make: Max recursion level (500) exceeded.: Resource temporarily
> >>  unavailable
> >>
> >>and of course everything becomes really slow. Has anybody else
> >>seen this?
> >
> >You are setting an illegal variable in your make.conf or environment
> >that is causing the port makefile to recurse.  Probably USE_GCC or
> >some other USE_*.
> That could be a hint. I can find legal options in
>   /usr/ports/Mk/bsd.port.mk
> can I ?

Sort of..but it also lists options that are only legal within specific
port makefiles (like USE_*).

Post your make.conf and I'll probably be able to tell you what's wrong.

Kris


pgpCsJsk22BHb.pgp
Description: PGP signature


Re: portupgrade eats my swap space

2006-01-17 Thread P.U.Kruppa

On Wed, 18 Jan 2006, Kris Kennaway wrote:


On Wed, Jan 18, 2006 at 04:25:57AM +0100, P.U.Kruppa wrote:

Hi!

OK, this is an old PIII 1 GHZ , 500 MB RAM  running
6.0-STABLE FreeBSD 6.0-STABLE #0: Sun Jan 15 05:56:00 CET 2006

When I start a

  # portupgrade -a

up to 671 MB swap are used and I see this message:

  make: Max recursion level (500) exceeded.: Resource temporarily
  unavailable

and of course everything becomes really slow. Has anybody else
seen this?


You are setting an illegal variable in your make.conf or environment
that is causing the port makefile to recurse.  Probably USE_GCC or
some other USE_*.

That could be a hint. I can find legal options in
  /usr/ports/Mk/bsd.port.mk
can I ?

Uli.



Kris





*
* Peter Ulrich Kruppa - Wuppertal - Germany *
*
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: portupgrade eats my swap space

2006-01-17 Thread Kris Kennaway
On Wed, Jan 18, 2006 at 04:25:57AM +0100, P.U.Kruppa wrote:
> Hi!
> 
> OK, this is an old PIII 1 GHZ , 500 MB RAM  running
> 6.0-STABLE FreeBSD 6.0-STABLE #0: Sun Jan 15 05:56:00 CET 2006
> 
> When I start a
> 
>   # portupgrade -a
> 
> up to 671 MB swap are used and I see this message:
> 
>   make: Max recursion level (500) exceeded.: Resource temporarily
>   unavailable
> 
> and of course everything becomes really slow. Has anybody else 
> seen this?

You are setting an illegal variable in your make.conf or environment
that is causing the port makefile to recurse.  Probably USE_GCC or
some other USE_*.

Kris


pgpbTESpaKQBm.pgp
Description: PGP signature


Re: portupgrade eats my swap space

2006-01-17 Thread P.U.Kruppa

On Wed, 18 Jan 2006, Roger Merritt wrote:


At 04:25 AM 1/18/2006 +0100, you wrote:

Hi!

OK, this is an old PIII 1 GHZ , 500 MB RAM  running
6.0-STABLE FreeBSD 6.0-STABLE #0: Sun Jan 15 05:56:00 CET 2006

When I start a

  # portupgrade -a

up to 671 MB swap are used and I see this message:

  make: Max recursion level (500) exceeded.: Resource temporarily
  unavailable

and of course everything becomes really slow. Has anybody else seen this?


Yes. I'm running FreeBSD 6.0 on a PII 300MHz with 64MB RAM and a 40GB hard 
drive. It works great until I run portupgrade on mysql-server. Then it runs 
out of swap space and I get console error messages and have to reboot. I 
haven't dug into it yet, but several months ago I redirected the swap file to 
a different location to increase the size. I'll have to do some research to 
find out exactly what I did and how much space I gave it and how to increase 
it. I haven't had time yet to do it. Don't know why building mysql-* (and 
possibly some others) takes so much swap space. I first encountered it 
running portmanager -u and didn't realize for a couple of days (and four or 
five freeze-ups) what was happening.



This really has become more dramatic:
Usually - when I run a portupgrade - about half of my RAM is used 
and I can still work on my Gnome desktop without any swapping or 
serious performance losses.
Now every port produces this Max recursion message and 
applications become unusable.


Uli.




*
* Peter Ulrich Kruppa - Wuppertal - Germany *
*
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: portupgrade eats my swap space

2006-01-17 Thread Roger Merritt

At 04:25 AM 1/18/2006 +0100, you wrote:

Hi!

OK, this is an old PIII 1 GHZ , 500 MB RAM  running
6.0-STABLE FreeBSD 6.0-STABLE #0: Sun Jan 15 05:56:00 CET 2006

When I start a

  # portupgrade -a

up to 671 MB swap are used and I see this message:

  make: Max recursion level (500) exceeded.: Resource temporarily
  unavailable

and of course everything becomes really slow. Has anybody else seen this?


Yes. I'm running FreeBSD 6.0 on a PII 300MHz with 64MB RAM and a 40GB hard 
drive. It works great until I run portupgrade on mysql-server. Then it runs 
out of swap space and I get console error messages and have to reboot. I 
haven't dug into it yet, but several months ago I redirected the swap file 
to a different location to increase the size. I'll have to do some research 
to find out exactly what I did and how much space I gave it and how to 
increase it. I haven't had time yet to do it. Don't know why building 
mysql-* (and possibly some others) takes so much swap space. I first 
encountered it running portmanager -u and didn't realize for a couple of 
days (and four or five freeze-ups) what was happening.



--
Roger


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


portupgrade eats my swap space

2006-01-17 Thread P.U.Kruppa

Hi!

OK, this is an old PIII 1 GHZ , 500 MB RAM  running
6.0-STABLE FreeBSD 6.0-STABLE #0: Sun Jan 15 05:56:00 CET 2006

When I start a

  # portupgrade -a

up to 671 MB swap are used and I see this message:

  make: Max recursion level (500) exceeded.: Resource temporarily
  unavailable

and of course everything becomes really slow. Has anybody else 
seen this?


Regards,

Uli.



*
* Peter Ulrich Kruppa - Wuppertal - Germany *
*
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Swap space

2005-11-01 Thread Robert Huff

Lowell Gilbert writes:

>  The basic advice is quite sound, so I'll reiterate it: Provide
>  what you think you might ever need.

Let me get behind Lowell on this bit. The box I am typing on
has 512 mb memory; because that may get bumped to 1 Gb it has 2 Gb
swap split over two disks.

>  If in doubt, err on the side of caution.

In the current paradigm, disk space is dirt cheap - ~$0.60/Gb at
the first place I could find in my bookmarks.  If "out of memory" or
performance problems affect mission-critical work, then you need to
gum the bullet and get more disk space.

One man's opinion,


Robert Huff


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Swap space

2005-11-01 Thread Lowell Gilbert
Bob Johnson <[EMAIL PROTECTED]> writes:

> On 11/1/05, Ian Lord <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I just bought 4 servers with 4 gigs of ram, the documentation
> > proposes to use 2 to 3 times the amount of ram for swap... I don't
> > think 12 gigs of swap would be useful lol, but do I really need to
> > put 4 gigs of ram. (It might be useful for kernel dump but...)
> >
> 
> That's the original reason for the suggestion.  You need more than
> twice the amount of RAM if you need to capture a dump for debugging. 
> If you won't ever be doing that, you may not need so much swap.

Not quite:
>From dumpon(8) on 5-STABLE:

 For most systems the size of the specified dump device must be at
 least the size of physical memory.  Even though an additional
 header is added to the dump, the BIOS for a platform typically
 holds back some memory, so it is not usually necessary to size
 the dump device larger than the actual amount of RAM available in
 the machine.

> My experience is that if you have much more than twice the RAM size
> swapped out, things start to get so sluggish that it is better to find
> a way to reduce your memory requirement or provide more physical
> memory.  Of course, that is characteristic of MY usage and may not
> apply at all to your usage, but it may be the reason that 3xRAM is the
> upper limit of what is routinely recommended.

Interactive single-user use will probably act like that nearly all the
time.  High page fault rates will always slow the system down.  It's
not necessary the case that a system will maintain high paging rates
when it's gone deep into swap, but the exceptions are rather special
cases.  

> > What do you guys do with swap space in this scenario ?
> 
> Provide what you think you will need.  It depends on what you expect
> to be doing with your memory.  A busy mail server that will be using
> huge amounts of temporary storage to manipulate the messages may not
> need a lot of swap, simply because you might prefer to throttle
> incoming mail when the system gets heavily loaded rather than get deep
> into swap and slow the system down.

That's an interesting example, but it's still just an example; it
won't necessarily apply to all mail servers, especially configurations
that use a lot of short-lived files.

The basic advice is quite sound, so I'll reiterate it:  Provide what
you think you might ever need.  If in doubt, err on the side of
caution.

> I configured my new 4GB servers with 4GB of swap.  That's more than I
> expect to ever need, but I have oodles of disk space.   If you have
> multiple drives, you may want to spread that out among the drives for
> more efficiency (but to do a dump you need enough contiguous space on
> one drive).

For ordinary desktop or server use, I think it's always a good idea to
have enough swap for a kernel dump.  It's cheap insurance.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Swap space

2005-11-01 Thread Jerry McAllister
> 
> Hi,
> 
> I just bought 4 servers with 4 gigs of ram, the documentation 
> proposes to use 2 to 3 times the amount of ram for swap... I don't 
> think 12 gigs of swap would be useful lol, but do I really need to 
> put 4 gigs of ram. (It might be useful for kernel dump but...)
> 
> What do you guys do with swap space in this scenario ?

Swap space gets used for at least three things, swapping, paging and
kernel crash dump space.If you are not concerned about dump space,
then the rest of the decision depends a lot on the size and number
of processes you expect to be running at any given time.   

Generally, for smaller memory sizes, swap space, via paging gives
you a larger virtual space to run in.   But, it looks like you may
by trying to make it so everything gets to stay in memory and never
have any of it paged out, much less swapped out.   For our systems
that have plenty of memory, I tend to use about 1 1/2 times memory
for the size of swap -  plenty of memory meaning as much as it can
address or at least more than enough to cover all simultaneous
processes.

Remember that a lot of utilities and daemons fork off new processes
for each incident they encounter rather than queueing stuff for the
main process to handle.   They sort of use it for poor mans queueing.

jerry
> 
> Thanks 
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Swap space

2005-11-01 Thread Bob Johnson
On 11/1/05, Ian Lord <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I just bought 4 servers with 4 gigs of ram, the documentation
> proposes to use 2 to 3 times the amount of ram for swap... I don't
> think 12 gigs of swap would be useful lol, but do I really need to
> put 4 gigs of ram. (It might be useful for kernel dump but...)
>

That's the original reason for the suggestion.  You need more than
twice the amount of RAM if you need to capture a dump for debugging. 
If you won't ever be doing that, you may not need so much swap.

My experience is that if you have much more than twice the RAM size
swapped out, things start to get so sluggish that it is better to find
a way to reduce your memory requirement or provide more physical
memory.  Of course, that is characteristic of MY usage and may not
apply at all to your usage, but it may be the reason that 3xRAM is the
upper limit of what is routinely recommended.

> What do you guys do with swap space in this scenario ?

Provide what you think you will need.  It depends on what you expect
to be doing with your memory.  A busy mail server that will be using
huge amounts of temporary storage to manipulate the messages may not
need a lot of swap, simply because you might prefer to throttle
incoming mail when the system gets heavily loaded rather than get deep
into swap and slow the system down.

I configured my new 4GB servers with 4GB of swap.  That's more than I
expect to ever need, but I have oodles of disk space.   If you have
multiple drives, you may want to spread that out among the drives for
more efficiency (but to do a dump you need enough contiguous space on
one drive).

- Bob
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Swap space

2005-11-01 Thread Lowell Gilbert
Ian Lord <[EMAIL PROTECTED]> writes:

> I just bought 4 servers with 4 gigs of ram, the documentation proposes
> to use 2 to 3 times the amount of ram for swap... I don't think 12
> gigs of swap would be useful lol, but do I really need to put 4 gigs
> of ram. (It might be useful for kernel dump but...)
> 
> What do you guys do with swap space in this scenario ?

It depends on the system usage.  
You don't *need* any swap at all.
I would advise more swap space than RAM, though, to make sure you can
do a kernel dump.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Swap space

2005-11-01 Thread Glenn Dawson

At 07:13 AM 11/1/2005, Vladimir Tsvetkov wrote:

> Hi,
>
> I just bought 4 servers with 4 gigs of ram, the documentation
> proposes to use 2 to 3 times the amount of ram for swap... I don't
> think 12 gigs of swap would be useful lol, but do I really need to
> put 4 gigs of ram. (It might be useful for kernel dump but...)
>
> What do you guys do with swap space in this scenario ?


It depends on how big is the address space for your machines.
32-bit machines can address 4GB of memory, so it's reasonable to use 2
or 3 times the amount of RAM space (if you hawe 256MB or 512MB - the
swap should be 768MB or 1GB), but if you have 32bit machines with 4GB
of memory there is no need to use more than 4GB for swap.


That's not entirely true.  Each process gets a 4GB (virtual) address 
space to operate in.  With default settings, 1GB of that space is 
used for the kernel, and the remaining 3GB is available for the 
process to use.  If you have several processes that require close to 
their 3GB limit, they could quite easily consume 4GB of swap, and more.


-Glenn


64-bit machines can address 2^64 bytes which is a very big address
space, so you should use the guidelines in the documentation (FreeBSD
Handbook).

Best regards,
Vladimir
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Swap space

2005-11-01 Thread Vladimir Tsvetkov
> Hi,
>
> I just bought 4 servers with 4 gigs of ram, the documentation
> proposes to use 2 to 3 times the amount of ram for swap... I don't
> think 12 gigs of swap would be useful lol, but do I really need to
> put 4 gigs of ram. (It might be useful for kernel dump but...)
>
> What do you guys do with swap space in this scenario ?


It depends on how big is the address space for your machines.
32-bit machines can address 4GB of memory, so it's reasonable to use 2
or 3 times the amount of RAM space (if you hawe 256MB or 512MB - the
swap should be 768MB or 1GB), but if you have 32bit machines with 4GB
of memory there is no need to use more than 4GB for swap.
64-bit machines can address 2^64 bytes which is a very big address
space, so you should use the guidelines in the documentation (FreeBSD
Handbook).

Best regards,
Vladimir
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Swap space

2005-11-01 Thread Ian Lord

Hi,

I just bought 4 servers with 4 gigs of ram, the documentation 
proposes to use 2 to 3 times the amount of ram for swap... I don't 
think 12 gigs of swap would be useful lol, but do I really need to 
put 4 gigs of ram. (It might be useful for kernel dump but...)


What do you guys do with swap space in this scenario ?

Thanks 
___

freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Can a process be made immune to out-of-swap-space kills?

2005-10-30 Thread Giorgos Keramidas
On 2005-10-30 00:21, Doug Lee <[EMAIL PROTECTED]> wrote:
> On Sun, Oct 30, 2005 at 01:59:53AM +0300, Giorgos Keramidas wrote:
> > On 2005-10-29 16:34, Doug Lee <[EMAIL PROTECTED]> wrote:
> > > Sometimes, I accidentally run something that eats up too much
> > > memory and causes the pager to run out of swap space and start
> > > shooting down processes to rectify the situation.  Sometimes,
> > > the process chosen for demolition happens to be `screen.'
> > > Since this process sorta manages a whole lot of others and, on
> > > being zapped out of existence, leaves many of them running but
> > > inaccessible, I find this choice decidedly inconvenient.
> > >
> > > Is there a way for me to force FreeBSD to leave `screen' (or
> > > any other process) alone when selecting something to kill to
> > > free memory?
> >
> > Hmmm, why are user limits not applied?  Wouldn't it be a nicer
> > way to solve the "rogue process" problems?
>
> It turns out that the problem is not actually a memory request but a
> huge temp file in an MFS filesystem... so maybe I need to figure out
> how to limit the size of a mount_mfs so it can't blast processes out
> of existence.

Ah!  That explains why this wasn't caught by the user limits :)

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Can a process be made immune to out-of-swap-space kills?

2005-10-29 Thread Doug Lee
On Sun, Oct 30, 2005 at 01:59:53AM +0300, Giorgos Keramidas wrote:
> On 2005-10-29 16:34, Doug Lee <[EMAIL PROTECTED]> wrote:
> > Sometimes, I accidentally run something that eats up too much
> > memory and causes the pager to run out of swap space and start
> > shooting down processes to rectify the situation.  Sometimes,
> > the process chosen for demolition happens to be `screen.'
> > Since this process sorta manages a whole lot of others and, on
> > being zapped out of existence, leaves many of them running but
> > inaccessible, I find this choice decidedly inconvenient.
> >
> > Is there a way for me to force FreeBSD to leave `screen' (or
> > any other process) alone when selecting something to kill to
> > free memory?
> 
> Hmmm, why are user limits not applied?  Wouldn't it be a nicer
> way to solve the "rogue process" problems?

It turns out that the problem is not actually a memory request but a
huge temp file in an MFS filesystem... so maybe I need to figure out
how to limit the size of a mount_mfs so it can't blast processes out
of existence.

For the curious, I had tried a "sox ... reverse" operation, which
reverses a wav file (and apparently does it by making a temporary copy
rather than reading it backward, which I didn't know!), and the file
in question was a wav about 240 megabytes long.  This is a small home
FreeBSD box and almost never hosts any user but me.  My /tmp, a
mount_mfs, is about 150 meg in size, according to `df.'  The `sox'
command ate that up so fast that the sheer volume of swap failure
messages prevented me from acting quickly enough, and the pager shot
down a whole bunch of processes trying to save the world.  The list of
shot processes happened to include `screen,' and this created a number
of orphans that I had to kill subsequently myself, such as a stranded
`ssh' session to another machine.

So yes, I could stand for some tuning.  On a multi-user system, this
would be a most unwise way to leave things.

-- 
Doug Lee   [EMAIL PROTECTED]http://www.dlee.org
SSB + BART Group [EMAIL PROTECTED]   http://www.bartsite.com
"I before E, except after C, or when sounded like A, as in neighbor
and weigh, except for when weird foreign concierges seize neither
leisure nor science from the height of society."
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Can a process be made immune to out-of-swap-space kills?

2005-10-29 Thread Giorgos Keramidas
On 2005-10-29 16:34, Doug Lee <[EMAIL PROTECTED]> wrote:
> Sometimes, I accidentally run something that eats up too much
> memory and causes the pager to run out of swap space and start
> shooting down processes to rectify the situation.  Sometimes,
> the process chosen for demolition happens to be `screen.'
> Since this process sorta manages a whole lot of others and, on
> being zapped out of existence, leaves many of them running but
> inaccessible, I find this choice decidedly inconvenient.
>
> Is there a way for me to force FreeBSD to leave `screen' (or
> any other process) alone when selecting something to kill to
> free memory?

Hmmm, why are user limits not applied?  Wouldn't it be a nicer
way to solve the "rogue process" problems?

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Can a process be made immune to out-of-swap-space kills?

2005-10-29 Thread Andrew P.
On 10/30/05, Doug Lee <[EMAIL PROTECTED]> wrote:
> Sometimes, I accidentally run something that eats up too much memory
> and causes the pager to run out of swap space and start shooting down
> processes to rectify the situation.  Sometimes, the process chosen for
> demolition happens to be `screen.'  Since this process sorta manages a
> whole lot of others and, on being zapped out of existence, leaves many
> of them running but inaccessible, I find this choice decidedly
> inconvenient.
>
> Is there a way for me to force FreeBSD to leave `screen' (or any other
> process) alone when selecting something to kill to free memory?
>
> Please Cc me any answers.
>
> Thanks much.
>
>
> --
> Doug Lee   [EMAIL PROTECTED]http://www.dlee.org
> SSB + BART Group [EMAIL PROTECTED]   http://www.bartsite.com
> "Is your cucumber bitter? Throw it away. Are there briars in your
> path? Turn aside. That is enough. Do not go on to say, `Why were
> things of this sort ever brought into the world?'"
> --Marcus Aurelius
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
>

I don't know how to do that, but by all means you
shouldn't allow that to happen. It's not windoze,
where everything is meant to be swapped. Read
limits(1) manpage to know how to prevent a user
from messing with other processes in such an
unfriendly way.

Last time I ran into a problem alike was upgrading
from fedora core 3 to FC4. Yum requested about
4000GB (4 Terabytes) of RAM. The machine
became inaccessible (as in "showing no signs of
life whatsoever") for 5 hours, but in the end
something coredumped and I could login :-)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Can a process be made immune to out-of-swap-space kills?

2005-10-29 Thread Doug Lee
Sometimes, I accidentally run something that eats up too much memory
and causes the pager to run out of swap space and start shooting down
processes to rectify the situation.  Sometimes, the process chosen for
demolition happens to be `screen.'  Since this process sorta manages a
whole lot of others and, on being zapped out of existence, leaves many
of them running but inaccessible, I find this choice decidedly
inconvenient.

Is there a way for me to force FreeBSD to leave `screen' (or any other
process) alone when selecting something to kill to free memory?

Please Cc me any answers.

Thanks much.


-- 
Doug Lee   [EMAIL PROTECTED]http://www.dlee.org
SSB + BART Group [EMAIL PROTECTED]   http://www.bartsite.com
"Is your cucumber bitter? Throw it away. Are there briars in your
path? Turn aside. That is enough. Do not go on to say, `Why were
things of this sort ever brought into the world?'"
--Marcus Aurelius
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: swap space problems

2005-05-09 Thread WMC
At 01:20 PM 5/9/2005, Chris Fedde wrote:
Occasionaly my system hangs for a few seconds while loading a process
from swap that has been idle for some time.
ad0: TIMEOUT - WRITE_DMA retrying (2 retries left) LBA=161663
What type of driver interface and controller is this?  And what FBSD 
version?
I used to get this error when I was trying to get a SATA drive working last 
summer.  There were bugs in the ata driver (circa 5.2.1) that are about 96% 
fixed in 5.3.  It would happen under heavy disk IO doing a lot of random 
seeks.  The hang really is a hang, not just a delay from the swapping 
activity.  40 or 50% of the time, it resulted in a "hard" full system hang 
(ie:  had to power cycle or hit the reset button.)  Often there was severe 
data corruption, also.

  -Wayne
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: swap space problems

2005-05-09 Thread Ion-Mihai Tetcu
On Mon, 09 May 2005 11:20:17 -0600
Chris Fedde <[EMAIL PROTECTED]> wrote:

> Occasionaly my system hangs for a few seconds while loading a process
> from swap that has been idle for some time.  It could be that I'm
> actualy out of swap space in these conditions, because I see this frequently
> in dmesg output:
> 
> swap_pager_getswapspace(8): failed.
> 
> But I also see other failures that indicate that there may be a
> hardware issue going on:
> 
> swap_pager: I/O error - pageout failed; blkno 20114,size 45056, error 0
> ad0: TIMEOUT - WRITE_DMA retrying (2 retries left) LBA=161663
> ad0: FAILURE - WRITE_DMA timed out
> 
> Boot message for the device controller is:
> 
> atapci0:  port
>   0xfc00-0xfc0f,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 17.1 on pci0
> ata0: channel #0 on atapci0
> ata1: channel #1 on atapci0
> 
> And the disk is 
> 
> ad0: 14648MB  [29762/16/63] at ata0-master UDMA66
> 
> Is there some issue relating to the configuration that I can repair? 
> Or am I seeing a real hardware problem?  

Are you by any chance copying from one disk to an other when this happen
? I'm this case I'm getting this kind of errors (not necessarily limited
to swap) on VIA8235/8237.


-- 
IOnut
Unregistered ;) FreeBSD "user"


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


swap space problems

2005-05-09 Thread Chris Fedde
Occasionaly my system hangs for a few seconds while loading a process
from swap that has been idle for some time.  It could be that I'm
actualy out of swap space in these conditions, because I see this frequently
in dmesg output:

swap_pager_getswapspace(8): failed.

But I also see other failures that indicate that there may be a
hardware issue going on:

swap_pager: I/O error - pageout failed; blkno 20114,size 45056, error 0
ad0: TIMEOUT - WRITE_DMA retrying (2 retries left) LBA=161663
ad0: FAILURE - WRITE_DMA timed out

Boot message for the device controller is:

atapci0:  port
0xfc00-0xfc0f,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 17.1 on pci0
ata0: channel #0 on atapci0
ata1: channel #1 on atapci0

And the disk is 

ad0: 14648MB  [29762/16/63] at ata0-master UDMA66

Is there some issue relating to the configuration that I can repair? 
Or am I seeing a real hardware problem?  

--
Chris Fedde
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: swap space

2005-05-03 Thread Chad Leigh -- Shire.Net LLC
On May 3, 2005, at 3:20 PM, Kris Kennaway wrote:
On Tue, May 03, 2005 at 03:15:54PM -0600, Chad Leigh -- Shire.Net  
LLC wrote:

Thanks!
Well, on my production system, I am not dumping any kernels.  Once It
crashes, I reboot it and go back into production.  Anything dumped
would get wiped out.  Luckily I am pretty conservative and only move
to new versions of the OS when they have been released a while and so
my machines have not had panics in years.
It's up to you, of course, but it's been my experience that you might
regret the small expenditure of a few gigabytes one day when you do
run into a panic you need help to solve...
Of course, now that I have mentioned it, my luck will change and  
something  bad will happen.

I am not running cheap large IDE disks, but expensive fast high  
performance U320 disks on RAID controllers and so the extra GB does  
cost something.  If I get a repeating panic, I can boot off a  
recovery disk and add in extra swap I guess.

Thanks
I always learn a lot here  (I just wish someone could help me with  
the mail submission question I posted)
Chad

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: swap space

2005-05-03 Thread Kris Kennaway
On Tue, May 03, 2005 at 03:15:54PM -0600, Chad Leigh -- Shire.Net LLC wrote:
> 
> On May 3, 2005, at 3:07 PM, Kris Kennaway wrote:
> 
> >On Tue, May 03, 2005 at 03:02:11PM -0600, Chad Leigh -- Shire.Net  
> >LLC wrote:
> >
> >>
> >>On May 3, 2005, at 2:45 PM, Kris Kennaway wrote:
> >>
> >>>Since it's a pain to add swap later you want to make
> >>>allowances for future expansion (e.g. you'd need 32GB of swap if you
> >>>ever plan to add 32GB of RAM).
> >>>
> >>
> >>I understand that people recommend as much swap as you have ram or
> >>more.  However, is this required and why?  I have a dual opteron
> >>system running i386 5.3-release (with released patches) and it has
> >>4GB RAM and only 2GB of swap, which is hardly ever touched, and when
> >>it is, just in small amounts.
> >>
> >>Why is this a problem?  (If it ever needs the 2gb of swap I am in
> >>trouble as the load at that time would be sky high and the machine
> >>not really responsive anyway)
> >>
> >
> >I explained in my email..you need it to dump the kernel.
> >
> 
> Thanks!
> 
> Well, on my production system, I am not dumping any kernels.  Once It  
> crashes, I reboot it and go back into production.  Anything dumped  
> would get wiped out.  Luckily I am pretty conservative and only move  
> to new versions of the OS when they have been released a while and so  
> my machines have not had panics in years.

It's up to you, of course, but it's been my experience that you might
regret the small expenditure of a few gigabytes one day when you do
run into a panic you need help to solve...

Kris


pgpjW0aET1d7B.pgp
Description: PGP signature


Re: swap space

2005-05-03 Thread Charles Swiger
On May 3, 2005, at 5:02 PM, Chad Leigh -- Shire.Net LLC wrote:
On May 3, 2005, at 2:45 PM, Kris Kennaway wrote:
Since it's a pain to add swap later you want to make
allowances for future expansion (e.g. you'd need 32GB of swap if you
ever plan to add 32GB of RAM).
I understand that people recommend as much swap as you have ram or 
more.  However, is this required and why?  I have a dual opteron 
system running i386 5.3-release (with released patches) and it has 4GB 
RAM and only 2GB of swap, which is hardly ever touched, and when it 
is, just in small amounts.
It's not required, but the system can't write a panic crash dump out 
unless there is slightly more swap space available than RAM in the box. 
 If your system doesn't crash, and your workload fits into RAM, having 
gigabytes of swap space set up is not very useful

--
-Chuck
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: swap space

2005-05-03 Thread Chad Leigh -- Shire.Net LLC
On May 3, 2005, at 3:07 PM, Kris Kennaway wrote:
On Tue, May 03, 2005 at 03:02:11PM -0600, Chad Leigh -- Shire.Net  
LLC wrote:

On May 3, 2005, at 2:45 PM, Kris Kennaway wrote:
Since it's a pain to add swap later you want to make
allowances for future expansion (e.g. you'd need 32GB of swap if you
ever plan to add 32GB of RAM).
I understand that people recommend as much swap as you have ram or
more.  However, is this required and why?  I have a dual opteron
system running i386 5.3-release (with released patches) and it has
4GB RAM and only 2GB of swap, which is hardly ever touched, and when
it is, just in small amounts.
Why is this a problem?  (If it ever needs the 2gb of swap I am in
trouble as the load at that time would be sky high and the machine
not really responsive anyway)
I explained in my email..you need it to dump the kernel.
Thanks!
Well, on my production system, I am not dumping any kernels.  Once It  
crashes, I reboot it and go back into production.  Anything dumped  
would get wiped out.  Luckily I am pretty conservative and only move  
to new versions of the OS when they have been released a while and so  
my machines have not had panics in years.

Thanks
Chad
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


  1   2   >