Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Question regarding swap file

Featured Replies

Installed the swap file package in the latest unmenu release and there is a recommendation on there that says to make your swap file be on your cache drive.  I did accordingly.  In addition, it says that you need to run "swapoff -a -v" in order to start a clean powerdown.  Is there any way this can be automatically done?  ie: added to the powerdown script?  Newb here....just asking to see if its possible

Installed the swap file package in the latest unmenu release and there is a recommendation on there that says to make your swap file be on your cache drive.  I did accordingly.  In addition, it says that you need to run "swapoff -a -v" in order to start a clean powerdown.  Is there any way this can be automatically done?  ie: added to the powerdown script?  Newb here....just asking to see if its possible

Not currently.  Hopefully in the next few releases of unRAID there will be events where tasks as you describe can be done prior to stopping the array.

 

The latest unMENU files included "user-script" buttons that will perform the swappoff command for you by simply pressing it.  If the swapfile is detected, in the same way, as Enable swapfile button will be visible.  Look for them on the "User-Scripts" page. 

 

The initial version of the swapfile package would not properly use the size you specified on the configuration page.  If you check for updates in unMENU (another button on the user-scripts page), it can automatically install an updated package for you if you desire.

 

Joe L.

  • Author

thank you, Joe

  • Author

sorry - just a clarification....the default size is currently set at 128 megabytes.....is this the recomended amount, or were you referring to another amount ?  I installed unmenu updates and this is what the default was set at.  thanks

It all depends on how much memory you have and what you're doing.

 

I have 4GB of memory. I do not use the initial ramdisk as I have it installed under Slackware 13.1. I run several additional programs such as cache_dirs, folding@home distributed client, transmission bittorrent client, SABnzbd usenet client, eggdrop irc script, a few misc others, and some now-and-then Slackware updates and kernel compiles.

 

I very rarely ever have swap-file usage. Though every now and then there will be the brief swap file usage. As hard drive space is cheap and I never know what I might be running in the future, I went with a simple 10Gb swap partition.

 

This is what my system usually looks like:

 

# uname -a && uptime && vmstat && free

Linux Reaver 2.6.33.4-unraid #1 SMP Thu May 13 02:18:06 EDT 2010 i686 Intel(R)
Core(TM)2 Duo CPU     P8600  @ 2.40GHz GenuineIntel GNU/Linux

19:30:15 up 2 days, 17:27,  1 user,  load average: 1.00, 1.00, 1.00

procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
1  0      0  24256 428932 3328812    0    0    13     6   39   90 32  0 68  0

             total       used       free     shared    buffers     cached
Mem:       4010300    3985920      24380          0     428932    3328812
-/+ buffers/cache:     228176    3782124
Swap:     10000452          0   10000452

10GB swap with 4GB of memory. I think that's more then is really needed.

 

The rule used to be 1.5x memory. With the linux memory management this is reduced significantly unless you are running very memory intensive programs such as calculating huge arrays or matrices.  I would guess that if you had a huge tmpfs ramdisk, the large swap space would help. As the tmpfs is used and causes memory pressure, it can be swapped out. Initramfs which unraid uses, does not get swapped out.

 

I would think 512MB of swap should be more then enough for unRAID. (if it ever uses it). If you find you need more, then bump up ram. I've never seen a machine need that much swap unless you were loading huge memory variables. 

 

  In my case at work, we would load a 2GB file into ram and operate on it.  So for the duration of that process we needed a large amount of swap space.  Also we would operate on other files to /tmp which was mounted on tmpfs. So when the system was busy it would swap out the /tmp filesystem's unused part.  Other then that the only thing swap was used for on my side was putting idle pages out to disk.

 

For unRAID, start conservative, you can change it later if you need.  1.5x ram is a safe on the high side bet.

 

For my 12GB workstation at home. I have 4GB of swap and only 384kb is used.

 

 

  • Author

Great info....Thanks fellas.

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.