Re: Swap Questions

2015-08-14 Thread Tim Daneliuk
On 08/14/2015 12:39 PM, Warren Block wrote:
> On Fri, 14 Aug 2015, Tim Daneliuk wrote:
> 
>> I just built a 10.2 machine on a cloud-based VPS (Digital Ocean) that has
>> 512M of memory and 1G of swap partition.  I am seeing a ton of errors like
>> this:
>>
>> Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(10): failed
>> Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(14): failed
>> Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(11): failed
>> Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(6): failed
>> Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(7): failed
>> Aug 14 00:01:22 myhost last message repeated 2 times
>>
>>
>> So, I added this to fstab (after creating /usr/swap0):
>>
>> md99noneswapsw,file=/usr/swap000
>>
>> And then did this:
>>
>> swapon -aq
>>
>>
>> But, when I do a swapinfo, all I can see is the "disk" swap partition
>> that comes standard with the VPS:
>>
>>
>> Device  1K-blocks UsedAvail Capacity
>> /dev/gpt/swapfs   1048576   456572   59200444%
> 
> Add the -L (late) option to swapon.  How this works might differ between 
> 10-Release, 10-Stable, and 11.
> 
> Incidentally, md99 does not have to be literal, it's just meant to get the md 
> device number up out of the way of common interactive usage of mdconfig.


I can try that, but this still does not resolve the issue of md99 (I get
that its not literal :)   is not destroyed with the swapoff nor the fact
that the swap file doesn't get put into use at all on boot.

-- 

Tim Daneliuk tun...@tundraware.com
PGP Key: http://www.tundraware.com/PGP/

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


Re: Swap Questions

2015-08-14 Thread Carl Johnson
Tim Daneliuk  writes:

> On 08/14/2015 11:38 AM, Carl Johnson wrote:
>
>> I should have mentioned that I had similar problems until I added the
>> "late" option to the swapfile line in fstab.  I suspect that it is a
>> general problem with swapfiles and should be in the swapfile example in
>> the fstab(5) manpage.
>> 
>
> Would you mind posting the exact line you're using...  Thanks

md  noneswapsw,late,file=/var/swapfile  0   0

This is on a Raspberry Pi, but I don't think that should make any
difference.

-- 
Carl Johnsonca...@peak.org

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


Re: Swap Questions

2015-08-14 Thread Tim Daneliuk
On 08/14/2015 11:38 AM, Carl Johnson wrote:

> I should have mentioned that I had similar problems until I added the
> "late" option to the swapfile line in fstab.  I suspect that it is a
> general problem with swapfiles and should be in the swapfile example in
> the fstab(5) manpage.
> 

Would you mind posting the exact line you're using...  Thanks

-- 

Tim Daneliuk tun...@tundraware.com
PGP Key: http://www.tundraware.com/PGP/

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


Re: Swap Questions

2015-08-14 Thread Warren Block

On Fri, 14 Aug 2015, Tim Daneliuk wrote:


I just built a 10.2 machine on a cloud-based VPS (Digital Ocean) that has
512M of memory and 1G of swap partition.  I am seeing a ton of errors like
this:

Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(10): failed
Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(14): failed
Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(11): failed
Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(6): failed
Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(7): failed
Aug 14 00:01:22 myhost last message repeated 2 times


So, I added this to fstab (after creating /usr/swap0):

md99noneswapsw,file=/usr/swap0  0   0

And then did this:

swapon -aq


But, when I do a swapinfo, all I can see is the "disk" swap partition
that comes standard with the VPS:


Device  1K-blocks UsedAvail Capacity
/dev/gpt/swapfs   1048576   456572   59200444%


Add the -L (late) option to swapon.  How this works might differ between 
10-Release, 10-Stable, and 11.


Incidentally, md99 does not have to be literal, it's just meant to get 
the md device number up out of the way of common interactive usage of 
mdconfig.

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


Re: Swap Questions

2015-08-14 Thread Carl Johnson
Tim Daneliuk  writes:

> On 08/14/2015 10:48 AM, Carl Johnson wrote:
>> Tim Daneliuk  writes:
>> 
>>> On 08/14/2015 08:53 AM, Patrick M. Hausen wrote:
 HI!

> Am 14.08.2015 um 15:15 schrieb Tim Daneliuk :
>
> I just built a 10.2 machine on a cloud-based VPS (Digital Ocean) that has
> 512M of memory and 1G of swap partition.  I am seeing a ton of errors like
> this:
>
> [...]
> So, I added this to fstab (after creating /usr/swap0):

 Did you create it with dd or just with touch? You need to create a
 file that actually occupies the disk blocks with dd.

 HTH
 Patrick

>>>
>>> The file was actually created, and space reserved.
>> 
>> Try removing the md99 device with mdconfig and then run the swapon again.
>> 
>
> Now we're getting somewhere.  The problem I discovered is that if I do this:
>
> 1) Remove fstab entry for swap file and reboot
> 2) Reinstall fstab entry for swap and swapon
>
> Voila' - it works.  BUT ...  if I then swapoff that disk *the md device does
> not go away and cannot be removed with mdcoswapon -a
> swapon: md99 on /usr/swap0: Device already in use
> nfig:
>
> mdconfig -d md99 
> mdconfig: file can only be used with -a
>
>
> I also cannot reenable it as swap again (which is why this appeared to not
> be working:
>
> swapon -a
> swapon: md99 on /usr/swap0: Device already in use
>
>
> IOW, the system thinks the /dev/md99 is still in use even though I have 
> swapped it
> off and will neither automatically remove the device nor allow me to do so 
> manually.

I should have mentioned that I had similar problems until I added the
"late" option to the swapfile line in fstab.  I suspect that it is a
general problem with swapfiles and should be in the swapfile example in
the fstab(5) manpage.

-- 
Carl Johnsonca...@peak.org

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


Re: Swap Questions

2015-08-14 Thread Tim Daneliuk
On 08/14/2015 10:48 AM, Carl Johnson wrote:
> Tim Daneliuk  writes:
> 
>> On 08/14/2015 08:53 AM, Patrick M. Hausen wrote:
>>> HI!
>>>
 Am 14.08.2015 um 15:15 schrieb Tim Daneliuk :

 I just built a 10.2 machine on a cloud-based VPS (Digital Ocean) that has
 512M of memory and 1G of swap partition.  I am seeing a ton of errors like
 this:

 [...]
 So, I added this to fstab (after creating /usr/swap0):
>>>
>>> Did you create it with dd or just with touch? You need to create a
>>> file that actually occupies the disk blocks with dd.
>>>
>>> HTH
>>> Patrick
>>>
>>
>> The file was actually created, and space reserved.
> 
> Try removing the md99 device with mdconfig and then run the swapon again.
> 

Now we're getting somewhere.  The problem I discovered is that if I do this:

1) Remove fstab entry for swap file and reboot
2) Reinstall fstab entry for swap and swapon

Voila' - it works.  BUT ...  if I then swapoff that disk *the md device does
not go away and cannot be removed with mdcoswapon -a
swapon: md99 on /usr/swap0: Device already in use
nfig:

mdconfig -d md99 
mdconfig: file can only be used with -a


I also cannot reenable it as swap again (which is why this appeared to not
be working:

swapon -a
swapon: md99 on /usr/swap0: Device already in use


IOW, the system thinks the /dev/md99 is still in use even though I have swapped 
it
off and will neither automatically remove the device nor allow me to do so 
manually.


Ideas anyone?  (And that for all the help from you folks...)

Tim Daneliuk tun...@tundraware.com
PGP Key: http://www.tundraware.com/PGP/

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


Re: Swap Questions

2015-08-14 Thread Carl Johnson
Tim Daneliuk  writes:

> On 08/14/2015 08:53 AM, Patrick M. Hausen wrote:
>> HI!
>> 
>>> Am 14.08.2015 um 15:15 schrieb Tim Daneliuk :
>>>
>>> I just built a 10.2 machine on a cloud-based VPS (Digital Ocean) that has
>>> 512M of memory and 1G of swap partition.  I am seeing a ton of errors like
>>> this:
>>>
>>> [...]
>>> So, I added this to fstab (after creating /usr/swap0):
>> 
>> Did you create it with dd or just with touch? You need to create a
>> file that actually occupies the disk blocks with dd.
>> 
>> HTH
>> Patrick
>> 
>
> The file was actually created, and space reserved.

Try removing the md99 device with mdconfig and then run the swapon again.

-- 
Carl Johnsonca...@peak.org

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


Re: Swap Questions

2015-08-14 Thread Ronald Klop

On Fri, 14 Aug 2015 16:44:31 +0200, Tim Daneliuk 
wrote:


On 08/14/2015 08:35 AM, Ronald Klop wrote:
Does the /dev/md99 device exist now? Otherwise something went wrong  
when you tried adding swap. Try swapon -a without the -q.


Yes, the device exists and yes, swapon claims is is in use:

swapon -a
swapon: md99 on /usr/swap0: Device already in use

But swapinfo doesn't know about it, if it is:

swapinfo
Device  1K-blocks UsedAvail Capacity
/dev/gpt/swapfs   1048576   500300   54827648%


I don't know whether this is just an artifact of how swapinfo reports  
things,
but the system acts like it's not seeing the additional swap when it is  
under

heavy load.

The main culprit here, BTW, is clamav which chews through memory like  
crazy
as best as I can determine, and this is a VM with only 512M of memory,  
hence

the desire to increase swap space.




I tested this on my 11-CURRENT/amd64 laptop and I get this:

# grep swap /etc/fstab
/dev/gpt/swap0  noneswapsw  0   0
md99noneswapsw,file=/tmp/test   0   0

# dd if=/dev/zero of=/tmp/test bs=1M count=10

# swapon -a
swapon: adding /dev/md99 as swap device

[root@sjakie /tmp]# swapinfo
Device  1K-blocks UsedAvail Capacity
/dev/gpt/swap04193280   276744  3916536 7%
/dev/md99   10240010240 0%
Total 4203520   276744  3926776 7%

Works ok for me.

Regards,
Ronald.
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: Swap Questions

2015-08-14 Thread Tim Daneliuk
On 08/14/2015 08:53 AM, Patrick M. Hausen wrote:
> HI!
> 
>> Am 14.08.2015 um 15:15 schrieb Tim Daneliuk :
>>
>> I just built a 10.2 machine on a cloud-based VPS (Digital Ocean) that has
>> 512M of memory and 1G of swap partition.  I am seeing a ton of errors like
>> this:
>>
>> [...]
>> So, I added this to fstab (after creating /usr/swap0):
> 
> Did you create it with dd or just with touch? You need to create a
> file that actually occupies the disk blocks with dd.
> 
> HTH
> Patrick
> 

The file was actually created, and space reserved.

-- 

Tim Daneliuk tun...@tundraware.com
PGP Key: http://www.tundraware.com/PGP/

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


Re: Swap Questions

2015-08-14 Thread Tim Daneliuk
On 08/14/2015 08:35 AM, Ronald Klop wrote:
> Does the /dev/md99 device exist now? Otherwise something went wrong when you 
> tried adding swap. Try swapon -a without the -q.

Yes, the device exists and yes, swapon claims is is in use:

swapon -a
swapon: md99 on /usr/swap0: Device already in use

But swapinfo doesn't know about it, if it is:

swapinfo 
Device  1K-blocks UsedAvail Capacity
/dev/gpt/swapfs   1048576   500300   54827648%


I don't know whether this is just an artifact of how swapinfo reports things,
but the system acts like it's not seeing the additional swap when it is under
heavy load.

The main culprit here, BTW, is clamav which chews through memory like crazy
as best as I can determine, and this is a VM with only 512M of memory, hence
the desire to increase swap space.

-- 

Tim Daneliuk tun...@tundraware.com
PGP Key: http://www.tundraware.com/PGP/

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


Re: Swap Questions

2015-08-14 Thread Patrick M. Hausen
HI!

> Am 14.08.2015 um 15:15 schrieb Tim Daneliuk :
> 
> I just built a 10.2 machine on a cloud-based VPS (Digital Ocean) that has
> 512M of memory and 1G of swap partition.  I am seeing a ton of errors like
> this:
> 
> [...]
> So, I added this to fstab (after creating /usr/swap0):

Did you create it with dd or just with touch? You need to create a
file that actually occupies the disk blocks with dd.

HTH
Patrick
-- 
punkt.de GmbH * Kaiserallee 13a * 76133 Karlsruhe
Tel. 0721 9109 0 * Fax 0721 9109 100
i...@punkt.de   http://www.punkt.de
Gf: Jürgen Egeling  AG Mannheim 108285



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

Re: Swap Questions

2015-08-14 Thread Ronald Klop
On Fri, 14 Aug 2015 15:15:26 +0200, Tim Daneliuk   
wrote:



I just built a 10.2 machine on a cloud-based VPS (Digital Ocean) that has
512M of memory and 1G of swap partition.  I am seeing a ton of errors  
like

this:

Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(10): failed
Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(14): failed
Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(11): failed
Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(6): failed
Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(7): failed
Aug 14 00:01:22 myhost last message repeated 2 times


So, I added this to fstab (after creating /usr/swap0):

md99noneswapsw,file=/usr/swap0  0   0

And then did this:

swapon -aq


But, when I do a swapinfo, all I can see is the "disk" swap partition
that comes standard with the VPS:


Device  1K-blocks UsedAvail Capacity
/dev/gpt/swapfs   1048576   456572   59200444%



Two questions:

1) Is this reasonable behavior from  a machine wiht 512M of memory and
   a 1G swap partition?  I am doing things like running clamscan and
   buildworld at the same time. That's why I tried to add space with
   a file.

2) Why doesn't the extra swap disk appear in the hostinfo output.



Does the /dev/md99 device exist now? Otherwise something went wrong when  
you tried adding swap. Try swapon -a without the -q.


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


Swap Questions

2015-08-14 Thread Tim Daneliuk
I just built a 10.2 machine on a cloud-based VPS (Digital Ocean) that has
512M of memory and 1G of swap partition.  I am seeing a ton of errors like
this:

Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(10): failed
Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(14): failed
Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(11): failed
Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(6): failed
Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(7): failed
Aug 14 00:01:22 myhost last message repeated 2 times


So, I added this to fstab (after creating /usr/swap0):

md99noneswapsw,file=/usr/swap0  0   0

And then did this:

swapon -aq


But, when I do a swapinfo, all I can see is the "disk" swap partition
that comes standard with the VPS:


Device  1K-blocks UsedAvail Capacity
/dev/gpt/swapfs   1048576   456572   59200444%



Two questions:

1) Is this reasonable behavior from  a machine wiht 512M of memory and
   a 1G swap partition?  I am doing things like running clamscan and
   buildworld at the same time. That's why I tried to add space with
   a file.

2) Why doesn't the extra swap disk appear in the hostinfo output.


TIA, 

Tim Daneliuk tun...@tundraware.com
PGP Key: http://www.tundraware.com/PGP/

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


Re: merging commiter headers

2015-08-14 Thread Willem Jan Withagen

On 14-8-2015 07:58, Aristedes Maniatis wrote:

I've just upgraded three machines from 10.1 to 10.2. Congratulations
on the release...

This was one of the worst upgrade experiences in my FreeBSD history,
going back to 4.0 days. I used freebsd-update but I was absolutely
swamped with merging the svn (nee cvs) headers in roughly 80 files.

<<< current version # $FreeBSD:
release/10.0.0/etc/periodic/security/800.loginfail 254974 2013-08-27
21:20:28Z jlh $ === # $FreeBSD:
releng/10.2/etc/periodic/security/800.loginfail 263661 2014-03-23
12:58:48Z brueffer $

10.2-RELEASE



Let's leave aside why users would care what commit number, date or
user last touched this file. Let's assume that you don't need a
header to tell you the path of the file you are looking at. And let's
leave aside why release is now releng (are we saving bytes?). And
let's leave aside why the diff shows an upgrade from 10.0 to 10.2
when actually this was from 10.1 to 10.2.

Can't some merge tool inside freebsd-update just sort this out for
me? Please? Not only does it take over 45 minutes to go through all
those files, but I feel sure I missed something.


For me the majore reason to go back to
 - just plain STABLE installs
 - run mergemaster
which has some tweaks to prevent diffs on versioning

Compiling takes a bit of work. You kick off that during the night, and 
do the install next day.
The upside from that is you get to deviate from what upstream thinks it 
should be.


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