lost swap after upgrade to 8.3.0p1

Status
Not open for further replies.

Erik Carlson

Dabbler
Joined
Aug 2, 2012
Messages
19
Hello,
I have just upgraded from 8.0.4 to 8.3.0p1.
Everything appears to work however I have lost some swap.

I have 3 drives in the machine

/dev/ada0 is a 3TB drive which is not associated with any other drives
/dev/ada1 & /dev/ada2 are both 1TB drives which are mirrored and these are the drives i use every day.

all 3 drives have a 2GB swap partition. The machine itself has 16GB of real RAM.

I upgraded in place from 8.0.4 to 8.3.0p1 using a cd of the 64bit iso.

I have not upgraded the zfs format yet in case I have to roll back.

swapinfo shows:

[root@freenas ~]# swapinfo
Device 512-blocks Used Avail Capacity
/dev/ada1p1 4194304 0 4194304 0%
/dev/ada2p1 4194304 0 4194304 0%
Total 8388608 0 8388608 0%

so it appears to be ignoring the 2GB swap on /dev/ada0p1 ?

I can access the data on /dev/ada0p2 just fine.

I can't see anything in the freenas manual about mucking around with existing swap, only settings for new disks which this is not.

Any ideas?

Thanks
Erik
 

Erik Carlson

Dabbler
Joined
Aug 2, 2012
Messages
19
sure, i should have posted this first time:

=> 34 5860533101 ada0 GPT (2.7T)
34 94 - free - (47k)
128 4194304 1 freebsd-swap (2.0G)
4194432 5856338703 2 freebsd-zfs (2.7T)

=> 34 1953525101 ada1 GPT (931G)
34 94 - free - (47k)
128 4194304 1 freebsd-swap (2.0G)
4194432 1949330703 2 freebsd-zfs (929G)

=> 34 1953525101 ada2 GPT (931G)
34 94 - free - (47k)
128 4194304 1 freebsd-swap (2.0G)
4194432 1949330703 2 freebsd-zfs (929G)

=> 63 62439361 da0 MBR (29G)
63 1930257 1 freebsd [active] (942M)
1930320 63 - free - (31k)
1930383 1930257 2 freebsd (942M)
3860640 3024 3 freebsd (1.5M)
3863664 41328 4 freebsd (20M)
3904992 58534432 - free - (27G)

=> 0 1930257 da0s1 BSD (942M)
0 16 - free - (8.0k)
16 1930241 1 !0 (942M)

da0 is a usb flash drive plugged into the mobo and from which the system boots.

Thanks for your interest.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
In all seriousness why do you care about the swap at all? I don't think I've seen anyone actually provide any information that their swap is used. I've never seen my swap ever be used despite doing very nasty things like use 8GB of RAM with 20TB of files.

I haven't done what I consider alot of research(I like to be extremely thorough) on the FreeBSD swap space, but I get the impression that if you are using the swap space at all that:

1. Your performance will tank... horribly. I'm thinking so bad you won't want to use the server.
2. This is your indicator that you NEED to upgrade your RAM... soon.
3. You should be asking yourself what is using up all of this RAM and if you really feel it necessary to continue to use whatever is gobbling up your RAM.

FreeNAS will not allocate 2GB(or whatever size you have specified in the GUI) of the disk to swap space until you create a zpool/UFS partition on it. Being that the disk is unallocated that tells me that the reason its not being used is that you have not used the drive for anything. If you delete the zpool(not sure about UFS) then the swap space is freed. So to me your system is operating exactly as expected. See the 3 bullets above for why you should be glad you aren't using the swap space.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
I'm guessing you get "2" when you do this:

sqlite3 /data/freenas-v1.db "select adv_swapondrive from system_advanced;"

Just to be safe, make a backup of your database.

Code:
mount -uw /

cp /data/freenas-v1.db /data/freenas-v1.db.bak

Then do this:

sqlite3 /data/freenas-v1.db "update system_advanced set adv_swapondrive=3 where adv_swapondrive=2;"


Then reboot and see if that fixes it.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
In all seriousness why do you care about the swap at all? I don't think I've seen anyone actually provide any information that their swap is used. I've never seen my swap ever be used despite doing very nasty things like use 8GB of RAM with 20TB of files.

I haven't done what I consider alot of research(I like to be extremely thorough) on the FreeBSD swap space, but I get the impression that if you are using the swap space at all that:

1. Your performance will tank... horribly. I'm thinking so bad you won't want to use the server.
2. This is your indicator that you NEED to upgrade your RAM... soon.
3. You should be asking yourself what is using up all of this RAM and if you really feel it necessary to continue to use whatever is gobbling up your RAM.

FreeNAS will not allocate 2GB(or whatever size you have specified in the GUI) of the disk to swap space until you create a zpool/UFS partition on it. Being that the disk is unallocated that tells me that the reason its not being used is that you have not used the drive for anything. If you delete the zpool(not sure about UFS) then the swap space is freed. So to me your system is operating exactly as expected. See the 3 bullets above for why you should be glad you aren't using the swap space.

The points you make are mostly true, but swap is needed to do a dump if you want to do a crash analysis. The developers have strongly encouraged people to not use zero swap. The swap at the beginning also gives people a buffer if they're replacing drives and sizes don't match, then you can just delete the swap on that disk and you'll hopefully have the extra you'd need.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Erik,

I'm just about to get some sleep. I'm assuming this will solve your problem, but if not, maybe someone else can jump in while I'm gone ;)
 

Erik Carlson

Dabbler
Joined
Aug 2, 2012
Messages
19
Erik,

I'm just about to get some sleep. I'm assuming this will solve your problem, but if not, maybe someone else can jump in while I'm gone ;)

You were right, it did return 2 as the value. I followed your instructions and it worked like a charm, thanks! But I wonder why that happened in the upgrade to do that. I have not switched on autotune.

Thanks very much!
 

Erik Carlson

Dabbler
Joined
Aug 2, 2012
Messages
19
In all seriousness why do you care about the swap at all? I don't think I've seen anyone actually provide any information that their swap is used. I've never seen my swap ever be used despite doing very nasty things like use 8GB of RAM with 20TB of files.

I haven't done what I consider alot of research(I like to be extremely thorough) on the FreeBSD swap space, but I get the impression that if you are using the swap space at all that:

1. Your performance will tank... horribly. I'm thinking so bad you won't want to use the server.
2. This is your indicator that you NEED to upgrade your RAM... soon.
3. You should be asking yourself what is using up all of this RAM and if you really feel it necessary to continue to use whatever is gobbling up your RAM.

FreeNAS will not allocate 2GB(or whatever size you have specified in the GUI) of the disk to swap space until you create a zpool/UFS partition on it. Being that the disk is unallocated that tells me that the reason its not being used is that you have not used the drive for anything. If you delete the zpool(not sure about UFS) then the swap space is freed. So to me your system is operating exactly as expected. See the 3 bullets above for why you should be glad you aren't using the swap space.

Hi noobsauce. You are right that usually swap is not used at all on my system, but in my last attempt to upgrade from 8.0.4 (that time to 8.2) i had all kinds of problems and needed all the swap (see http://forums.freenas.org/showthread.php?8121-swap-problems-with-8-2-0p1) . I ended up rolling back to 8.0.4 , this time round with my RAM doubled and a later software release I am hoping I will have an easier time.

I am also a bit paranoid when anything unexpected happens. I am hoping it is not indicative that something else odd will happen.

Thanks
Erik
 
Status
Not open for further replies.
Top