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.

Linux Question - Ramdisk filesystem

Featured Replies

I am running a batch process on the unRAID server and piping the output to /root.  The file is about 10K now.  It will run a very long time (2-3 days), and I don't want to crash the server 90% through or I will have to start over.  I expect the file could get as big as several megabytes, but not really sure exactly how big it will get before the end.

 

Two questions:

 

1 - How can I figure out how much space is left on the ramdisk before it fills up and crashes the server?

 

2 - Can I somehow truncate the output file if it gets too big?  (The output is not important - it is just status messages.)

 

If not, I should probably kill it now and start over piping the output to the cache disk.  (I'd lose about 2 hours)

 

Thanks for your help!

 

"vmstat" will show you free memory

  • Author

Thanks.  Here is what I see:

 

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  50616  12696 1900868    0    0    36    19  130   64  4  8 59 29

 

Does the ramdisk share main memory?  If so, it looks like I have 50Meg free which I know is way way more than I need.

Yup.

 

And RAM allocated to cache will be taken back and given to apps when needed.

Why not just have it output to a file on one of your data disks?

Why not just have it output to a file on one of your data disks?

 

or on your flash drive.

  • Author

Why not just have it output to a file on one of your data disks?

 

Next time I will (pipe output to cache disk).

 

The piped file is up to a whopping 200K this morning.  It is about 20% done (estimated).  So the file is likely to stay way under 1 meg.  Even if it gets 10x that big, With 2G of physical RAM I should be okay.

 

I was under the mistaken understanding that the ramdisk was statically allocated to a certain size.  I didn't know that it dynamically allocated RAM for the ramdisk.  (Good to know!)

 

Thanks!

Why not just have it output to a file on one of your data disks?

 

Next time I will (pipe output to cache disk).

 

The piped file is up to a whopping 200K this morning.  It is about 20% done (estimated).  So the file is likely to stay way under 1 meg.  Even if it gets 10x that big, With 2G of physical RAM I should be okay.

 

I was under the mistaken understanding that the ramdisk was statically allocated to a certain size.  I didn't know that it dynamically allocated RAM for the ramdisk.  (Good to know!)

 

Thanks!

 

unRAID uses something called rootfs which makes all ram available for use as file storage when needed.

With rootfs it does not emulate a block type device, so it is faster and more efficient on ram usage.

The problem is, without limits, other parts of the kernel can become starved for ram causing failure conditions.

 

tmpfs and other ramdisk filesystems emulate block devices and have limits defined when they are created/formatted.

 

So with the current unraid environment we have the best and possible worst conditions of

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.