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.

Ramdisk size and freespace

Featured Replies

I googled around a bit, and I couldn't find an answer to what I thought was an easy question.

 

How can I see how big the unRaid system ramdisk is and what is the current free space? I've got some fairly large log files piling up, and I'd like to know how close I am to having a problem. I realize I could just delete or move stuff, but I'm curious about capacity.

 

I figured it should be in unmenu or mymain, or maybe a correctly formatted du command would tell me, but I seem to be failing in my google fu right now.

 

Thanks,

Jonathan

  • Author

enter "free"

I'm trying not to be dense here, but I don't understand what that is telling me. How does unRaid manage RAM? I thought that when it booted, it allocated a chunk of physical RAM to be disk space, and extracted all the various operating system files into that RAMDISK, and finished booting from there. I'm trying to figure out what is currently allocated to the RAMDISK filesystem, and what is used for operating RAM. It looks to me like the free command is telling me the total RAM in use for both the RAMDISK and operating processes, and I'm looking for the current RAMDISK size and how much is used.

  • 1 month later...

I have wanted to know the same. I have not been able to find the full information, but I have managed to learn something in the process.

 

Apparently linux includes the space occupied by ram-disk content in the

'cached'

part of the output of

'free'

, and apparently the ram-space occupied by the ramdisk is not fixed to some predefined size, but equal to the data stored in it.

 

I concluded this writing a huge file to /tmp, and the running free, and the deleting the file, and running free again as shown below (note I have 8GB ram, the dd command will write 0.5GB, lower the count below if you may have less free ram).

 

1. Run

free

look at output.

2. Run

dd if=/dev/zero of=/tmp/test count=1000000

(make sure you don't set count bigger than what will fit in the ram, I don't think linux likes missing ram).

3. Run

free

again - no difference will be shown if cached was already maxed at your amount of ram

4. delete /tmp/test file

5. Run

free

again - now cached will be smaller, by rougly the amounts of bytes in the deleted /tmp/test.

By increasing the count to more than half the ram, I get the 'free' to specify most of the ram free when file is deleted.

 

So armed with this information, that the ram disk is not of a fixed size, I believe the size of the ram disk can be roughly  given by running

 

find / -maxdepth 1 ! -name "/" ! -name "mnt" ! -name dev ! -name sys ! -name proc | xargs du -h -c -s | tail -1

 

I'm not sure I successfully excluded the right dirs, but du could not give me the size of /proc and /sys on my system, and I believe its not possible to write to them anyway.

 

 

Interestingly now that I know that the ramdisk size is equal to the files it contains, I can now also estimate the ram-space used by cache-dirs, or rather how much memory I have free, before cache-dirs will start spinning on my disks continously to try to keep dirs in memory. Cache-dirs is a program I use to keep directories in memory.

Here's another way.

 

 

cat /proc/meminfo  | head

 

 

see memtotal

 

 

then do

du -hsx /

 

 

 

 

 

 

Interestingly now that I know that the ramdisk size is equal to the files it contains, I can now also estimate the ram-space used by cache-dirs, or rather how much memory I have free, before cache-dirs will start spinning on my disks continously to try to keep dirs in memory. Cache-dirs is a program I use to keep directories in memory.

find / -maxdepth 1 ! -name "/" ! -name "mnt" ! -name dev ! -name sys ! -name proc | xargs du -h -c -s | tail -1

 

The "find" command given above lists "1.1G total" on my server.

 

I only have 512 Meg of ram installed.    :-[

 

cat /proc/meminfo | head

shows

root@Tower:~# cat /proc/meminfo | head

MemTotal:        505932 kB

MemFree:          15968 kB

Buffers:          50392 kB

Cached:          309896 kB

SwapCached:            0 kB

 

What's the purpose of that find command? I get 678M.

I think the du -hsx would provide a better utilization. the -x says to stay on the mounted system only.

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.