Strange disk usage

4.3.1,Lucid,Raring,Precise,Racy,Wary

Moderator: Forum moderators

Post Reply
CRi
Posts: 7
Joined: Mon Jun 10, 2024 12:16 pm
Location: Belgium
Has thanked: 4 times
Been thanked: 2 times

Strange disk usage

Post by CRi »

Hi everyone,

I have a recurring issue with one of our legacy system running Puppy Precise.

Every so often, a message will appear:

WARNING: RAM working space only 1MB,
recommend a reboot which will flush the RAM

According to df, the pup_rw partition is full (500M used) but I can only find around 20M of files on it.
Image

RAM doesn't seem full with almost 200M free.
Image

I'm a bit lost by this issue, any help would be welcome.

Thanks in advance!

User avatar
rockedge
Site Admin
Posts: 6547
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2749 times
Been thanked: 2626 times
Contact:

Re: Strange disk usage

Post by rockedge »

@CRi

I feel like a cache is filling up. Can you look closer at the cache's size?

CRi
Posts: 7
Joined: Mon Jun 10, 2024 12:16 pm
Location: Belgium
Has thanked: 4 times
Been thanked: 2 times

Re: Strange disk usage

Post by CRi »

Sure, how can I see that exactly?

I attached my sysinfo report if that can help.

Attachments
sys-info-240610.zip
(17.78 KiB) Downloaded 17 times
User avatar
rockedge
Site Admin
Posts: 6547
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2749 times
Been thanked: 2626 times
Contact:

Re: Strange disk usage

Post by rockedge »

It would be a good idea to have a swap file/partition set up!

=== Memory (free) ===
total used free shared buffers
Mem: 1024156 807188 216968 0 7744
-/+ buffers: 799444 224712
Swap: 0 0 0

=== Memory (/proc/meminfo) ===

955 MiB free (incl. buffers,cache) of 1001 MiB total RAM (shared unaccounted for)

Code: Select all

=== /etc/rc.d/PUPSTATE ===

PUPMODE=13
PDEV1='mmcblk0p1'
DEV1FS='vfat'
PUPSFS='mmcblk0p1,vfat,/puppy_precise_5.7.sfs'
PUPSAVE='mmcblk0p1,vfat,/precisesave-masterfuel.4fs'
PMEDIA='ataflash'
#ATADRIVES is all internal ide/pata/sata drives, excluding optical, excluding usb...
ATADRIVES='mmcblk0 '
#ATAOPTICALDRIVES is list of non-usb optical drives...
ATAOPTICALDRIVES=''
#these directories are unionfs/aufs layers in /initrd...
SAVE_LAYER='/pup_ro1'
PUP_LAYER='/pup_ro2'
#The partition that has the precisesave file is mounted here...
PUP_HOME='/mnt/dev_save'
#(in /initrd) ...note, /mnt/home is a link to it.
#this file has extra kernel drivers and firmware...
ZDRV=''
#complete set of modules in the initrd (moved to main f.s.)...
ZDRVINIT='no'
#Partition no. override on boot drive to which session is (or will be) saved...
PSAVEMARK=''
PSUBDIR=''

=== probepart ===

/dev/mmcblk0p1|vfat|3870468

=== df -h ===

Filesystem      Size  Used Avail Use% Mounted on
/dev/mmcblk0p1  1,9G  1,5G  486M  75% /initrd/mnt/dev_save
/dev/loop1     1008M  486M  523M  49% /initrd/pup_ro1
tmpfs           501M  500M  232K 100% /initrd/pup_rw
tmpfs           195M  194M  1,0M 100% /initrd/mnt/tmpfs
/dev/loop0      194M  194M     0 100% /initrd/pup_ro2
/dev/loop4       47M   47M     0 100% /initrd/pup_ro4
unionfs         501M  500M  232K 100% /
shmfs           145M     0  145M   0% /dev/shm

It seems this system is running in pupmode13

which means that a RAM disk is being used with "save on demand" and it's only as big as the RAM this machine has which looks like is 1 G (?).

By triggering a save (usually a "save" icon on the desktop) this will flush the RAM and write to the save file.

Does the size of this save file need to be increased?

CRi
Posts: 7
Joined: Mon Jun 10, 2024 12:16 pm
Location: Belgium
Has thanked: 4 times
Been thanked: 2 times

Re: Strange disk usage

Post by CRi »

First of all, thanks for your reply!

This system indeed has 1G RAM and a 1G save file.

I'm not sure a swap partition is necessary as this is an embedded system that runs a single application, which is capped at a maximum of 256M of RAM usage.
We have about 60 computers running this specific version of puppy. They've been running for years without issue.

We use "save on demand" but our application runs the save command on a regular basis. I ran it manually but it hasn't fixed the issue.

I could try to increase the size of the save file but I would then have to reboot... which would clear the issue anyway.

Maybe my best bet is just to reboot the system every week or so...

williams2
Posts: 1062
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 305 times

Re: Strange disk usage

Post by williams2 »

The tmpfs file systejm in ram has no more free space.

This should show what is taking up space in the tmpfs:

Code: Select all

cd /initrd/mnt/tmpfs/
du -h pup_rw/ tmp/ | sort -hk1

you can copy/paste each line into a terminal
or create and save a script file.
You might need to delte a file in /tmp or /root first to get some space.

Precise's du might not support the -h option,
but this should work (all on 1 line):

Code: Select all

du /initrd/mnt/tmpfs/ | sort  -nk1

Could be a log file that has become large.

The tmpfs file system (the save data) is 591M
/tmp/ is 195M

In my Pup, /tmp is a symlink to a dir in /initrd/mnt/tmpfs/
You might need to do something like this:

Code: Select all

du /initrd/mnt/tmpfs/  /initrd/pup_rw/ | sort  -nk1
sonny
Posts: 725
Joined: Mon Feb 15, 2021 4:50 pm
Has thanked: 486 times
Been thanked: 173 times

Re: Strange disk usage

Post by sonny »

@williams2, welcome back!
I'm glad to see you write again.

Clarity
Posts: 3829
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1628 times
Been thanked: 523 times

Re: Strange disk usage

Post by Clarity »

@rockedge says (I paraphrase) "create a swapfile or swap-partition". I concur for this PC being used!

Do this and reboot your system for a better system behavior.

CRi
Posts: 7
Joined: Mon Jun 10, 2024 12:16 pm
Location: Belgium
Has thanked: 4 times
Been thanked: 2 times

Re: Strange disk usage

Post by CRi »

Thank you all for your input.
Unfortunately that PC has been rebooted so I can't check for now.
I'll have to wait for the issue to reoccur to investigate more.

Clarity wrote: Tue Jun 11, 2024 7:53 pm

@rockedge says (I paraphrase) "create a swapfile or swap-partition". I concur for this PC being used!

Do this and reboot your system for a better system behavior.

Those systems run of a SD card. I think the swap file was purposefully disabled by the creator of the disk image because it killed the SD card over time.
We have over 250 systems running with various versions of puppy and none of them have a problem with having no swap file.

williams2
Posts: 1062
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 305 times

Re: Strange disk usage

Post by williams2 »

I'm running Firefox in the tmpfs, so du shows

Code: Select all

(snip)
42M	tmp/firefox/browser
62M	pup_rw/root/.mozilla
62M	pup_rw/root/.mozilla/firefox
62M	pup_rw/root/.mozilla/firefox/gff0mhxb.default
65M	pup_rw/root/.cache
65M	pup_rw/root/.cache/mozilla
65M	pup_rw/root/.cache/mozilla/firefox
65M	pup_rw/root/.cache/mozilla/firefox/gff0mhxb.default
139M	pup_rw/root
149M	pup_rw/
228M	tmp/firefox
235M	tmp/
# 

In certain situations, swap space can be useful
Often paging is not needed.
I'm not using swap space.
I had a swap file enabled,
and for 6 months my Puppy with default swapiness,
did not use the swap space even once.

Code: Select all

# ll /mnt/home/PUP1/swapfile
-rwxr-xr-x 1 256M Jan  9  2021 /mnt/home/PUP1/swapfile
# hd /mnt/home/PUP1/swapfile
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000400  01 00 00 00 ff ff 00 00  00 00 00 00 fc 52 c7 cc  |.............R..|
00000410  98 f2 41 70 a4 2e aa 4f  41 ec e6 9c 00 00 00 00  |..Ap...OA.......|
00000420  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000ff0  00 00 00 00 00 00 53 57  41 50 53 50 41 43 45 32  |......SWAPSPACE2|
00001000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
10000000
# 

I do run EarlyOOM, it seems to work very well.
viewtopic.php?t=2980

Large files can be log files or cache files
that increase in size over a period of time.

CRi
Posts: 7
Joined: Mon Jun 10, 2024 12:16 pm
Location: Belgium
Has thanked: 4 times
Been thanked: 2 times

Re: Strange disk usage

Post by CRi »

williams2 wrote: Tue Jun 11, 2024 4:49 pm

The tmpfs file systejm in ram has no more free space.

This should show what is taking up space in the tmpfs:

Code: Select all

cd /initrd/mnt/tmpfs/
du -h pup_rw/ tmp/ | sort -hk1

you can copy/paste each line into a terminal
or create and save a script file.
You might need to delte a file in /tmp or /root first to get some space.

Precise's du might not support the -h option,
but this should work (all on 1 line):

Code: Select all

du /initrd/mnt/tmpfs/ | sort  -nk1

Could be a log file that has become large.

The tmpfs file system (the save data) is 591M
/tmp/ is 195M

In my Pup, /tmp is a symlink to a dir in /initrd/mnt/tmpfs/
You might need to do something like this:

Code: Select all

du /initrd/mnt/tmpfs/  /initrd/pup_rw/ | sort  -nk1

Hi Williams,

I have the issue occurring right now and still can't find what's taking the space.

tmpfs is 1Gb but is 92% full

Code: Select all

sh-4.3# df
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/mmcblk0p1   1887232 1391584    495648  74% /initrd/mnt/dev_save
tmpfs            1218548 1109584    108964  92% /initrd/mnt/tmpfs
unionfs          1218548 1109584    108964  92% /
/dev/loop0        204800  204800         0 100% /initrd/pup_ro2
/dev/loop1         33408   33408         0 100% /initrd/pup_z
/dev/loop2        999320  394412    588524  41% /initrd/pup_ro1
devtmpfs          979776       0    979776   0% /dev
shmfs             362832       0    362832   0% /dev/shm
/dev/loop3         47616   47616         0 100% /initrd/pup_ro3

But I can't seem to find 900Mb of files...

Code: Select all

sh-4.3# cd /initrd/mnt/tmpfs/
sh-4.3# du -h pup_rw/ tmp/ | sort -hk1
0	pup_rw/etc/modules
0	pup_rw/initrd/mnt
0	pup_rw/initrd/mnt/dev_save
0	pup_rw/initrd/pup_ro1
0	pup_rw/initrd/pup_ro3
0	pup_rw/mnt
0	pup_rw/root/.config
0	pup_rw/root/.config/rox.sourceforge.net
0	pup_rw/root/.config/rox.sourceforge.net/ROX-Filer
0	pup_rw/sys
0	pup_rw/var/lock/gprs
0	pup_rw/var/lock/subsys
0	pup_rw/.wh..wh.orph
0	pup_rw/.wh..wh.plnk
0	tmp/pup_event_ipc
0	tmp/rc_sysinit
0	tmp/simple_network_setup
0	tmp/udev/links
0	tmp/udev/links/\x2finput\x2fby-path\x2fplatform-pcspkr-event-spkr
0	tmp/udev/links/\x2fserial\x2fby-id\x2fusb-SimTech__Incorporated_SimTech__Incorporated_0123456789ABCDEF-if00-port0
0	tmp/udev/links/\x2fserial\x2fby-id\x2fusb-SimTech__Incorporated_SimTech__Incorporated_0123456789ABCDEF-if01-port0
0	tmp/udev/links/\x2fserial\x2fby-id\x2fusb-SimTech__Incorporated_SimTech__Incorporated_0123456789ABCDEF-if02-port0
0	tmp/udev/links/\x2fserial\x2fby-id\x2fusb-SimTech__Incorporated_SimTech__Incorporated_0123456789ABCDEF-if03-port0
0	tmp/udev/links/\x2fserial\x2fby-id\x2fusb-SimTech__Incorporated_SimTech__Incorporated_0123456789ABCDEF-if04-port0
0	tmp/udev/links/\x2fserial\x2fby-path\x2fpci-0000:00:14.0-usb-0:1:1.0-port0
0	tmp/udev/links/\x2fserial\x2fby-path\x2fpci-0000:00:14.0-usb-0:1:1.1-port0
0	tmp/udev/links/\x2fserial\x2fby-path\x2fpci-0000:00:14.0-usb-0:1:1.2-port0
0	tmp/udev/links/\x2fserial\x2fby-path\x2fpci-0000:00:14.0-usb-0:1:1.3-port0
0	tmp/udev/links/\x2fserial\x2fby-path\x2fpci-0000:00:14.0-usb-0:1:1.4-port0
0	tmp/udev/links/\x2fsnd\x2fby-path\x2fpci-0000:00:1b.0
0	tmp/udev/links/\x2fsnd\x2fby-path\x2fplatform-pcspkr
0	tmp/udev/rules.d
0	tmp/.X11-unix
4,0K	pup_rw/dev
4,0K	pup_rw/etc/modprobe.d
4,0K	pup_rw/etc/network-wizard
4,0K	pup_rw/etc/network-wizard/network
4,0K	pup_rw/etc/network-wizard/network/interfaces
4,0K	pup_rw/etc/ppp
4,0K	pup_rw/etc/ppp/peers
4,0K	pup_rw/root/Choices
4,0K	pup_rw/root/Choices/ROX-Filer
4,0K	pup_rw/root/.dbus
4,0K	pup_rw/root/.dbus/session-bus
4,0K	pup_rw/var/lib
4,0K	pup_rw/var/lib/alsa
4,0K	pup_rw/var/lock
4,0K	pup_rw/var/run/cups
4,0K	pup_rw/var/run/cups/certs
4,0K	pup_rw/var/run/dbus
8,0K	pup_rw/etc/rc.d
8,0K	pup_rw/var/local/pupdial/isp1
8,0K	pup_rw/var/local/pupdial/isp2
8,0K	tmp/services
8,0K	tmp/sfs_load
12K	pup_rw/var/local/sns
16K	pup_rw/var/local/pupdial
28K	pup_rw/var/local
32K	pup_rw/var/run
32K	tmp/hsperfdata_root
36K	pup_rw/etc
60K	pup_rw/initrd/tmp
88K	pup_rw/usr
88K	pup_rw/usr/java
88K	pup_rw/usr/java/lib
88K	pup_rw/usr/java/lib/security
104K	tmp/udev
104K	tmp/udev/data
108K	tmp/pup_event_backend
116K	pup_rw/initrd
792K	pup_rw/var/log
864K	pup_rw/var/cups
864K	pup_rw/var/cups/log
880K	pup_rw/root/my-applications/data
1,7M	pup_rw/var
7,9M	tmp/
22M	pup_rw/root/my-applications/log
27M	pup_rw/root/my-applications/bin
49M	pup_rw/root
49M	pup_rw/root/my-applications
51M	pup_rw/

I'm really at a loss with this...

williams2
Posts: 1062
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 305 times

Re: Strange disk usage

Post by williams2 »

This seems to be a different machine.
The mount default for a tmpfs file system is 50%
The first machine had a pup_rw (writable layer) of 501M
This pup_rw is about 1G

The size is just an arbitrary number.
The size of the tmpfs depends on the space taken by the files.
With no files, the tmpfs takes almost no space.
The tmpfs is supposed to expand and contract to fit the space taken by the files.

On a machine with 1G, a tmpfs of 500M max
leaves 500M of ram free even with the tmpfs completely full.
nearly 1G of ram free for an almost empty tmpfs.

du shows pup_rw (the save layer in ram)
is using about 51M and /tmp/ is using about 8M
These are perfectly normal values for Puppy.

Why the discrepancy with df I'm not sure.

If a file that is being used is deleted,
the name of the file is removed from the file system,
but all the rest of the file stays in the FS (inodes,data,etc)
That part will be deleted if and when the file is released.
Until the file is completely deleted, it will continue to take space in the FS.
That space will not be visible to du

Not sure about Precise, my Pup copies the sfs files to the tmpfs.
That uses 500M or so of ram space.
I don't think the sfs files were copied to the tmpfs.

WARNING: RAM working space only 1MB

That sounds like a message from Puppy.
It specifically refers to ram working space.
So, it doesn't seem to be running out of inodes.

Do you run servers, like html or ftp or even Samba?
Servers often need the numbers of files allowed, to be tweaked.
Samba logs may periodically need deleting.
Should show up by du

Viruses can cause strange things to happen.

williams2
Posts: 1062
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 305 times

Re: Strange disk usage

Post by williams2 »

We use "save on demand" but our application runs the save command on a regular basis. I ran it manually but it hasn't fixed the issue.

There are references to ram being flushed to the save file.

I'm not sure how the save works.
The files in ram (pup_rw tmpfs) are copied or moved to the save file (/initrd/pup_ro1/)
If the files are moved, it would empty the tmpfs.
If the files are copied, the tmpfs would still be full of files.

I'm not sure which way it works.
It would be easy to do a save then look in pup_rw to see if it is still full of files.

CRi
Posts: 7
Joined: Mon Jun 10, 2024 12:16 pm
Location: Belgium
Has thanked: 4 times
Been thanked: 2 times

Re: Strange disk usage

Post by CRi »

Yes indeed it's another machine.
In fact I just check and it's not running puppy precise.

Code: Select all

DISTRO_NAME='tahrpup'
DISTRO_VERSION=6.0.6

The only servers we run are ftp and vnc.
Viruses shouldn't be an issue, all those machines are on a private network with no internet access.

CRi
Posts: 7
Joined: Mon Jun 10, 2024 12:16 pm
Location: Belgium
Has thanked: 4 times
Been thanked: 2 times

Re: Strange disk usage

Post by CRi »

And once again a reboot has fixed the issue:

Code: Select all

root# df
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/mmcblk0p1   1887232 1391648    495584  74% /initrd/mnt/dev_save
tmpfs            1218548  244068    974480  21% /initrd/mnt/tmpfs
unionfs          1218548  244068    974480  21% /
/dev/loop0        204800  204800         0 100% /initrd/pup_ro2
/dev/loop1         33408   33408         0 100% /initrd/pup_z
/dev/loop2        999320  394244    588692  41% /initrd/pup_ro1
devtmpfs          979776       0    979776   0% /dev
shmfs             362836       0    362836   0% /dev/shm
/dev/loop3         47616   47616         0 100% /initrd/pup_ro3
Post Reply

Return to “Legacy”