getting MANY swap_pager_getswapspace failed messages

Joined
Mar 5, 2022
Messages
224
I am new to TrueNAS so this server is only a few days old:
16 X 2TB drives (RAID Z2)
2 X SSD (mirrored for boot)
32 GB RAM

I have a VM running ubuntu desktop with 4GB RAM (it is stopped)

I have 4 jails:
* Plex (very little activity)
* MariaDB (not using it yet, but it is up and running)
* apache (just says hello ;-)
* general purpose that will eventually run scripts via cron

I am getting literally hundreds of these messages per minute.
I added 16 GB RAM a few days ago (total of 32 GB now)
I've been running a backup script (uses rsync) from the console for a couple of days (starting it manually on boots)
These errors started last night after I added an Ubuntu VM. I gave it 4 GB RAM but it has been shut down all night after I first started seeing these errors
I am/have been backing up a large part of the pool to a USB drive. Is this going to make the backup suspect?

CPU.jpg
memory.jpg
pool.jpg



Here are my jails:
jails.jpg

I have one VM, but it has been shut down for 10 hours
vms.jpg


Output from top sorted by swap:
swap.jpg
 
Last edited:
Joined
Mar 5, 2022
Messages
224
I rebooted the entire NAS and started the backup again... So far there are no errors...
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Maybe try htop next time and sort by M_SIZE which should point at anything taking a lot of memory beyond what's resident (which seems from your top screnshot to be not much).
 
Joined
Mar 5, 2022
Messages
224
I deleted the ubuntu vm and am creating another. Suddenly I started getting this error again (completely filling up the console!)
I ran htop (very cool!) - results below

I think I got it to sort by M_SIZE...

htop.jpg
 
Joined
Mar 5, 2022
Messages
224
So, from this thread, I added a tunable vfs.zfs.arc_max of 28672, which should be 28GB:
tunable.jpg


Now the memory is a little different:
new_mem.jpg



Bottom line is that I am not getting the swap_pager_getswapspace errors with the backup and vm running (at least for now!)
 
Joined
Mar 5, 2022
Messages
224
Well, so much for that... I moved my backup from the terminal to a couple of tmux windows simultaneously backing up to the single USB drive I've done this before without issue) and TrueNAS filled the terminal with the swap_pager_getswapspace errors and the system locked up so badly that I had to press and hold the power button to reboot (could not access it via the web or from an ssh connection.

I never get any of these messages via an email - if I wasn't watching the terminal I would never have known what was going on. I desperately need to get this resolved!
 
Joined
Mar 5, 2022
Messages
224
I have been getting this error:

CRITICAL​

Device: /dev/ada6, 5 Currently unreadable (pending) sectors.​

but again, I have to look for it (I don't get it via email).

When I checked disk ada6, it looks like the S.M.A.R.T. results are good:
ada6.jpg


The pools look like they are OK:
pools.jpg
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
So, from this thread, I added a tunable vfs.zfs.arc_max of 28672, which should be 28GB:
I think you'll find that tunable is in bytes, so you're way off.

When I checked disk ada6, it looks like the S.M.A.R.T. results are good:
Complete rubbish... a smartctl test completed with "success" can contain results that show the disk is failing. All that means is the test didn't get interrupted and it was able to complete.

run smartctl -a /dev/ada6 and look in careful detail for pending sectors.

The pools look like they are OK:
Absolutely compatible with a disk that's having errors... that's how ZFS and checksums keep your data safe.
 
Joined
Mar 5, 2022
Messages
224
I think you'll find that tunable is in bytes, so you're way off.


Complete rubbish... a smartctl test completed with "success" can contain results that show the disk is failing. All that means is the test didn't get interrupted and it was able to complete.

run smartctl -a /dev/ada6 and look in careful detail for pending sectors.


Absolutely compatible with a disk that's having errors... that's how ZFS and checksums keep your data safe.

Thanks for you responses and help.
I changed vfs.zfs.arc_max to 30064771072 and rebooted (this is with backups running):
mem-2.jpg





Results of smartctl -a /dev/ada6 are here (there is a lot to look at - what am I looking for specifically?):

Code:
smartctl 7.2 2020-12-30 r5155 [FreeBSD 12.2-RELEASE-p12 amd64] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Caviar Green
Device Model:     WDC WD20EADS-00S2B0
Serial Number:    WD-WCAVY3669032
LU WWN Device Id: 5 0014ee 2047e12cf
Firmware Version: 01.00A01
User Capacity:    2,000,398,934,016 bytes [2.00 TB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    5400 rpm
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS (minor revision not indicated)
SATA Version is:  SATA 2.6, 3.0 Gb/s
Local Time is:    Sat Mar 19 10:08:25 2022 EDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x84) Offline data collection activity
                                        was suspended by an interrupting command from host.
                                        Auto Offline Data Collection: Enabled.
Self-test execution status:      ( 113) The previous self-test completed having
                                        the read element of the test failed.
Total time to complete Offline
data collection:                (42360) seconds.
Offline data collection
capabilities:                    (0x7b) SMART execute Offline immediate.
                                        Auto Offline data collection on/off support.
                                        Suspend Offline collection upon new
                                        command.
                                        Offline surface scan supported.
                                        Self-test supported.
                                        Conveyance Self-test supported.
                                        Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                                        power-saving mode.
                                        Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                                        General Purpose Logging supported.
Short self-test routine
recommended polling time:        (   2) minutes.
Extended self-test routine
recommended polling time:        ( 482) minutes.
Conveyance self-test routine
recommended polling time:        (   5) minutes.
SCT capabilities:              (0x303f) SCT Status supported.
                                        SCT Error Recovery Control supported.
                                                        SCT Feature Control supported.
                                        SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   200   199   051    Pre-fail  Always       -       286
  3 Spin_Up_Time            0x0027   176   143   021    Pre-fail  Always       -       8166
  4 Start_Stop_Count        0x0032   078   078   000    Old_age   Always       -       22018
  5 Reallocated_Sector_Ct   0x0033   198   198   140    Pre-fail  Always       -       11
  7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   073   073   000    Old_age   Always       -       20107
 10 Spin_Retry_Count        0x0032   100   100   000    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   100   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       533
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       264
193 Load_Cycle_Count        0x0032   140   140   000    Old_age   Always       -       182653
194 Temperature_Celsius     0x0022   113   090   000    Old_age   Always       -       39
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       7
198 Offline_Uncorrectable   0x0030   200   200   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x0008   200   200   000    Old_age   Offline      -       25

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed: read failure       10%     20104         3855100741
# 2  Short offline       Completed without error       00%     19968         -
# 3  Extended offline    Completed without error       00%     19903         -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.                        


If I'm understanding this, the raw read error rate is too high. If that is the case, I may have other issues on the way:
Code:
ID#  ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
ada1 Raw_Read_Error_Rate     0x000f   081   064   006    Pre-fail  Always       -       133983150
ada2 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       0
ada3 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       0
ada4 Raw_Read_Error_Rate     0x0033   095   095   050    Pre-fail  Always       -       0/5052445
ada5 Raw_Read_Error_Rate     0x000f   078   078   050    Pre-fail  Always       -       0/9455385
ada6 Raw_Read_Error_Rate     0x002f   200   199   051    Pre-fail  Always       -       288
ada7 Raw_Read_Error_Rate     0x000f   076   063   044    Pre-fail  Always       -       47058753
ada8 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       0
ada9 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       0
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I changed vfs.zfs.arc_max to 30064771072
I think that's too high... if you're going to set that at all (and I recommend just like other experienced members of the forum to not set it), it needs to take into account enough for the system (probably 8GB) and your VM(s) (seems another 4GB) and also a little space for "miscellaneous", I would suggest another 4 GB... that means 32GB minus at least 16GB should be as much as ARC shoudl take up. (and if I remember right, that's actually the default anyway that ARC max will be half of RAM).

If I'm understanding this, the raw read error rate is too high. If that is the case, I may have other issues on the way:
Code:
D#  ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
ada1 Raw_Read_Error_Rate     0x000f   081   064   006    Pre-fail  Always       -       133983150 (SEAGATE disk, numbers not recorded the same way, not necessarily a concern)
ada2 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       0
ada3 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       0
ada4 Raw_Read_Error_Rate     0x0033   095   095   050    Pre-fail  Always       -       0/5052445 (that's showing 0 of 5052445... no issues)
ada5 Raw_Read_Error_Rate     0x000f   078   078   050    Pre-fail  Always       -       0/9455385 (same as the previous one)
ada6 Raw_Read_Error_Rate     0x002f   200   199   051    Pre-fail  Always       -       288 (that's a problem... the one we're already looking at)
ada7 Raw_Read_Error_Rate     0x000f   076   063   044    Pre-fail  Always       -       47058753 (SEAGATE disk, numbers not recorded the same way, not necessarily a concern)
ada8 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       0
ada9 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       0


These are the problems with ada6:

Code:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   200   199   051    Pre-fail  Always       -       286
  5 Reallocated_Sector_Ct   0x0033   198   198   140    Pre-fail  Always       -       11
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       7
200 Multi_Zone_Error_Rate   0x0008   200   200   000    Old_age   Offline      -       25

Put all those together and you have a disk that's on its way to death... treat it with complete distrust.
 
Joined
Mar 5, 2022
Messages
224
I think that's too high... if you're going to set that at all (and I recommend just like other experienced members of the forum to not set it), it needs to take into account enough for the system (probably 8GB) and your VM(s) (seems another 4GB) and also a little space for "miscellaneous", I would suggest another 4 GB... that means 32GB minus at least 16GB should be as much as ARC shoudl take up. (and if I remember right, that's actually the default anyway that ARC max will be half of RAM).
I started down this path because I am getting swap_pager_getswapspace errors only since standing up the Ubuntu vm. I wanted to carve out 4gb for this vm (hence the 32 - 4 =28gb = 30064771072 Bytes.
Code:
D#  ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
ada1 Raw_Read_Error_Rate     0x000f   081   064   006    Pre-fail  Always       -       133983150 (SEAGATE disk, numbers not recorded the same way, not necessarily a concern)
ada2 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       0
ada3 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       0
ada4 Raw_Read_Error_Rate     0x0033   095   095   050    Pre-fail  Always       -       0/5052445 (that's showing 0 of 5052445... no issues)
ada5 Raw_Read_Error_Rate     0x000f   078   078   050    Pre-fail  Always       -       0/9455385 (same as the previous one)
ada6 Raw_Read_Error_Rate     0x002f   200   199   051    Pre-fail  Always       -       288 (that's a problem... the one we're already looking at)
ada7 Raw_Read_Error_Rate     0x000f   076   063   044    Pre-fail  Always       -       47058753 (SEAGATE disk, numbers not recorded the same way, not necessarily a concern)
ada8 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       0
ada9 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       0


These are the problems with ada6:

Code:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   200   199   051    Pre-fail  Always       -       286
  5 Reallocated_Sector_Ct   0x0033   198   198   140    Pre-fail  Always       -       11
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       7
200 Multi_Zone_Error_Rate   0x0008   200   200   000    Old_age   Offline      -       25

Put all those together and you have a disk that's on its way to death... treat it with complete distrust.
I've taken your suggestion to heart and have just bought a new 2tb drive.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I started down this path because I am getting swap_pager_getswapspace errors only since standing up the Ubuntu vm. I wanted to carve out 4gb for this vm (hence the 32 - 4 =28gb = 30064771072 Bytes.
You need to leave room for more than just the VM.

Also maybe try this :
top -oswap -w

It should sort by swap use.
 
Joined
Mar 5, 2022
Messages
224
thanks very much again for your help. This is the results of
Code:
top -oswap -w
with only a couple of rsyncs, a cp, an a resilvering (for the replacement disk you recommened replacing) running. I have shut down the VM and the jails also:
1647734213334.png
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Are you still running with ~30GB of arc_max?
 
Joined
Mar 5, 2022
Messages
224
At the time this snapshot was taken, I had disabled the vfs.zfs.arc_max setting and no jail or vm was running. I have since rebooted and stared the jails and vm (with vfs.zfs.arc_max disabled). So far, so good. I feel pretty confident that if I stop the vm and start it again, I will get this warning:
not enough memory.jpg
 
Last edited:
Top