Knowing your Changes and Save.dat file size and usage

Post here if you are a new Porteus member and you're looking for some help.
meet
Black ninja
Black ninja
Posts: 88
Joined: 31 Mar 2020, 04:37
Distribution: Porteus 4.0

Knowing your Changes and Save.dat file size and usage

Post#1 by meet » 14 Apr 2020, 03:27

Hello.
I am running Porteus 4 with KDE.
Everytime I boot into it, it lags (hangs) for about half a minute after showing me the desktop. Then it works perfectly fine without any lags whatsoever.

I believe it is loading background scripts or may be the desktop or the settings from previous sessions, or something.

Please let me know what is it doing during that lag period. And is it possible to stop the lagging and start working as soon as I see the desktop?

Note: My PC is a 4GB RAM, Intel processor laptop, which runs Windows 10 without any lag. So hardware is not the issue here.

Thank you.

EDIT:
PLS IGNORE THIS QUESTION. THIS THREAD HAS DISCUSSION CONCERNING HOW TO CHECK THE CHANGES AND SAVE.DAT FILE SIZE AND USAGE.
FOR LAG/HANG ISSUE ON LOADING THE DESKTOP, FOLLOW THE THIS THREAD.
Last edited by meet on 21 Apr 2020, 05:12, edited 2 times in total.

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Start-up lag on KDE

Post#2 by Ed_P » 14 Apr 2020, 05:57

Are you running with a swap file? Or a porteussave.dat file?
Ed

meet
Black ninja
Black ninja
Posts: 88
Joined: 31 Mar 2020, 04:37
Distribution: Porteus 4.0

Start-up lag on KDE

Post#3 by meet » 14 Apr 2020, 09:22

Ed_P wrote:
14 Apr 2020, 05:57
Are you running with a swap file? Or a porteussave.dat file?
A save.dat file.
It's size is 1.5 GB.

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

Start-up lag on KDE

Post#4 by ncmprhnsbl » 14 Apr 2020, 13:32

meet wrote:
14 Apr 2020, 03:27
Please let me know what is it doing during that lag period.
there may be a clue somewhere in /var/log/<somelog>.log
if i have to guess, baloo would be first.. what is baloo? it's a file search indexer.. somewhere in the kde settings to do with startup, it should be able to be disabled..
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Start-up lag on KDE

Post#5 by Ed_P » 14 Apr 2020, 14:59

Something else to try meet, add EXIT to your changes= cheatcode to keep things from being written to the save.dat file until you shutdown Porteus. Especially effective for USB drives. changes=EXIT:pathto/porteussave.dat
Ed

meet
Black ninja
Black ninja
Posts: 88
Joined: 31 Mar 2020, 04:37
Distribution: Porteus 4.0

Start-up lag on KDE

Post#6 by meet » 15 Apr 2020, 05:30

ncmprhnsbl wrote:
14 Apr 2020, 13:32
meet wrote:
14 Apr 2020, 03:27
Please let me know what is it doing during that lag period.
there may be a clue somewhere in /var/log/<somelog>.log
Hey I found something in the log.
Today, I started the PC around 10:33 and the desktop appeared on 10:34. Then the lag continued till 10:35, and then everything worked smoothly.
So the period of lag was 10:34:00 to 10:34:59.

There's an entry of org.freedesktop something during this period both in syslog and in messages file. And I guess that is what causing the lag. Also, there are other services starting during the same time in messages file.
Check it out, if you will please.

syslog

Code: Select all

Apr 15 10:34:01 porteus pulseaudio[1607]: [pulseaudio] pid.c: Stale PID file, overwriting.
Apr 15 10:34:02 porteus pulseaudio[1607]: [pulseaudio] bluez5-util.c: GetManagedObjects() failed: org.freedesktop.DBus.Error.ServiceUnknown: The name org.bluez was not provided by any .service files
Apr 15 10:34:42 porteus NetworkManager[1130]: <warn>  [1586927082.8200] dhcp6 (wlan0): request timed out
messages log

Code: Select all

Apr 15 10:34:01 porteus dbus-daemon[566]: [system] Successfully activated service 'org.freedesktop.UDisks2'
Apr 15 10:34:01 porteus dbus-daemon[566]: [system] Activating service name='org.freedesktop.UPower' requested by ':1.8' (uid=1000 pid=1503 comm="/usr/bin/baloo_file ") (using servicehelper)
Apr 15 10:34:01 porteus dbus-daemon[566]: [system] Successfully activated service 'org.freedesktop.UPower'
Apr 15 10:34:02 porteus dbus-daemon[1224]: [session uid=1000 pid=1222] Activating service name='org.kde.KScreen' requested by ':1.2' (uid=1000 pid=1275 comm="kded5 [kdeinit5]                                  ")
Apr 15 10:34:02 porteus dbus-daemon[1224]: [session uid=1000 pid=1222] Successfully activated service 'org.kde.KScreen'
Apr 15 10:34:02 porteus dbus-daemon[1224]: [session uid=1000 pid=1222] Activating service name='org.kde.ActivityManager' requested by ':1.14' (uid=1000 pid=1521 comm="/usr/bin/plasmashell ")
Apr 15 10:34:02 porteus dbus-daemon[1224]: [session uid=1000 pid=1222] Successfully activated service 'org.kde.ActivityManager'
Apr 15 10:34:02 porteus dbus-daemon[1224]: [session uid=1000 pid=1222] Activating service name='org.gnome.GConf' requested by ':1.19' (uid=1000 pid=1654 comm="/usr/libexec/pulse/gconf-helper ")
Apr 15 10:34:02 porteus dbus-daemon[1224]: [session uid=1000 pid=1222] Successfully activated service 'org.gnome.GConf'
Apr 15 10:34:02 porteus dbus-daemon[566]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.38" (uid=1000 pid=1498 comm="kwin_x11 ") interface="org.freedesktop.ConsoleKit.Manager" member="GetSessionByPID" error name="(unset)" requested_reply="0" destination="org.freedesktop.ConsoleKit" (uid=0 pid=1210 comm="/usr/sbin/console-kit-daemon --no-daemon ")
Apr 15 10:34:03 porteus dbus-daemon[566]: [system] Activating service name='org.kde.powerdevil.discretegpuhelper' requested by ':1.37' (uid=1000 pid=1625 comm="/usr/lib64/libexec/org_kde_powerdevil ") (using servicehelper)
Apr 15 10:34:03 porteus dbus-daemon[566]: [system] Successfully activated service 'org.kde.powerdevil.discretegpuhelper'
Apr 15 10:34:03 porteus dbus-daemon[1224]: [session uid=1000 pid=1222] Activating service name='org.bluez.obex' requested by ':1.2' (uid=1000 pid=1275 comm="kded5 [kdeinit5]                                  ")
[color=#FF0000]Apr 15 10:34:03 porteus obexd[1717]: OBEX daemon 5.49
Apr 15 10:34:03 porteus dbus-daemon[1224]: [session uid=1000 pid=1222] Successfully activated service 'org.bluez.obex'
Apr 15 10:34:05 porteus dhclient: XMT: Solicit on wlan0, interval 8180ms.
Apr 15 10:34:07 porteus dbus-daemon[1224]: [session uid=1000 pid=1222] Activating service name='org.kde.kuiserver' requested by ':1.14' (uid=1000 pid=1521 comm="/usr/bin/plasmashell ")
Apr 15 10:34:07 porteus dbus-daemon[1224]: [session uid=1000 pid=1222] Successfully activated service 'org.kde.kuiserver'
Apr 15 10:34:08 porteus root: ACPI group battery / action PNP0C0A:00 is not defined
Apr 15 10:34:09 porteus root: ACPI group battery / action PNP0C0A:00 is not defined
Apr 15 10:34:13 porteus dhclient: XMT: Solicit on wlan0, interval 15700ms.
Apr 15 10:34:17 porteus root: ACPI group battery / action PNP0C0A:00 is not defined
Apr 15 10:34:29 porteus last message repeated 3 times
Apr 15 10:34:29 porteus dhclient: XMT: Solicit on wlan0, interval 31030ms.
Apr 15 10:34:32 porteus root: ACPI group battery / action PNP0C0A:00 is not defined
Apr 15 10:34:37 porteus last message repeated 3 times
Apr 15 10:34:42 porteus NetworkManager[1130]: <info>  [1586927082.8201] dhcp6 (wlan0): state changed unknown -> timeout
Apr 15 10:34:46 porteus NetworkManager[1130]: <info>  [1586927086.6995] dhcp6 (wlan0): canceled DHCP transaction, DHCP client pid 1441
Apr 15 10:34:46 porteus NetworkManager[1130]: <info>  [1586927086.6996] dhcp6 (wlan0): state changed timeout -> done[/color]
Apr 15 10:34:55 porteus dbus-daemon[1224]: [session uid=1000 pid=1222] Activating service name='org.kde.runners.baloo' requested by ':1.10' (uid=1000 pid=1511 comm="/usr/bin/krunner ")
Apr 15 10:34:55 porteus dbus-daemon[1224]: [session uid=1000 pid=1222] Successfully activated service 'org.kde.runners.baloo'
Apr 15 10:35:00 porteus dbus-daemon[1224]: [session uid=1000 pid=1222] Activating service name='org.gtk.vfs.Daemon' requested by ':1.25' (uid=1000 pid=1919 comm="/usr/bin/firefox ")
Apr 15 10:35:00 porteus dbus-daemon[1224]: [session uid=1000 pid=1222] Successfully activated service 'org.gtk.vfs.Daemon'
Apr 15 10:35:02 porteus dbus-daemon[1224]: [session uid=1000 pid=1222] Activating service name='org.a11y.Bus' requested by ':1.28' (uid=1000 pid=1919 comm="/usr/bin/firefox ")
Apr 15 10:35:02 porteus dbus-daemon[1224]: [session uid=1000 pid=1222] Successfully activated service 'org.a11y.Bus'
Apr 15 10:35:30 porteus root: ACPI group battery / action PNP0C0A:00 is not defined
Apr 15 10:36:04 porteus last message repeated 10 times
Apr 15 10:37:05 porteus last message repeated 14 times
Apr 15 10:38:06 porteus last message repeated 20 times
Apr 15 10:39:07 porteus last message repeated 9 times
Apr 15 10:39:45 porteus last message repeated 12 times
Apr 15 10:41:11 porteus last message repeated 12 times
Apr 15 10:42:12 porteus last message repeated 6 times
Apr 15 10:43:07 porteus last message repeated 6 times
Apr 15 10:43:56 porteus last message repeated 2 times
Apr 15 10:44:36 porteus last message repeated 4 times
Apr 15 10:46:25 porteus root: ACPI group battery / action PNP0C0A:00 is not defined
Apr 15 10:47:03 porteus last message repeated 5 times
Apr 15 10:48:42 porteus last message repeated 5 times
Apr 15 10:48:49 porteus last message repeated 5 times

Also what are all those messages repeaeted XX times messages?

______________________________________________________________________________________________________________

And just another random question here. Found these two entries in the crond log file.

Code: Select all

Apr 15 16:03:47 porteus crond[1019]: crond 4.5 dillon's cron daemon, started with loglevel notice 
Apr 15 10:34:01 porteus crond[1019]: time disparity of -329 minutes detected 
Do they mean that my CPU clock is running 329 minutes behind?
If so, can we set it correct?

jssouza
Legendary
Legendary
Posts: 1165
Joined: 09 Jul 2015, 14:17
Distribution: Porteus x86 arm

Start-up lag on KDE

Post#7 by jssouza » 15 Apr 2020, 05:46

meet wrote:
15 Apr 2020, 05:30
Do they mean that my CPU clock is running 329 minutes behind?
329 (330) minutes is 5 hours 30 minutes. GMT + 5.30 is Indian Standard Time (IST) ;)

If I were to assume, whatever way you fixed your time here [Solved] Date and Time setting not working gets set after cron is activated.
See how the time stamp jumps back 5.30 hours from Apr 15 16:03:47 to Apr 15 10:34:01?
https://www.snbforums.com/threads/time- ... cted.8336/

meet
Black ninja
Black ninja
Posts: 88
Joined: 31 Mar 2020, 04:37
Distribution: Porteus 4.0

Start-up lag on KDE

Post#8 by meet » 15 Apr 2020, 06:47

jssouza wrote:
15 Apr 2020, 05:46
meet wrote:
15 Apr 2020, 05:30
Do they mean that my CPU clock is running 329 minutes behind?
329 (330) minutes is 5 hours 30 minutes. GMT + 5.30 is Indian Standard Time (IST) ;)

If I were to assume, whatever way you fixed your time here [Solved] Date and Time setting not working gets set after cron is activated.
See how the time stamp jumps back 5.30 hours from Apr 15 16:03:47 to Apr 15 10:34:01?
https://www.snbforums.com/threads/time- ... cted.8336/
True that. I didn't notice that.
So now I only need to find what those logs say. And why do I have that 1 minute of lag (freeze time) when KDE desktop is loaded.

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

Start-up lag on KDE

Post#9 by ncmprhnsbl » 15 Apr 2020, 09:14

meet wrote:
15 Apr 2020, 05:30
Also what are all those messages repeaeted XX times messages?
"porteus root: ACPI group battery / action PNP0C0A:00 is not defined"
seems to take a good bit of the time..,
presuming there is a battery.. anything special about it? is it plugged or unplugged, charging?
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

meet
Black ninja
Black ninja
Posts: 88
Joined: 31 Mar 2020, 04:37
Distribution: Porteus 4.0

Start-up lag on KDE

Post#10 by meet » 15 Apr 2020, 10:55

ncmprhnsbl wrote:
15 Apr 2020, 09:14
meet wrote:
15 Apr 2020, 05:30
Also what are all those messages repeaeted XX times messages?
"porteus root: ACPI group battery / action PNP0C0A:00 is not defined"
seems to take a good bit of the time..,
presuming there is a battery.. anything special about it? is it plugged or unplugged, charging?
Well, nope. Battery is all normal.
The delay happens in all cases, battery working or the charger plugged in. It's a laptop this one. The charging also works normally.

Though, one thing I remember is when I started with Porteus, I had installed Porteus 5 rc1 on this USB and then when I had started the run on ram version, it couldn't recognise the battery plugged in. The icon on taskbar said no battery found, though obviously, it's a laptop and it wasn't plugged in to the socket, and it was on, so battery has to be there inside.
Dunno. This might be totally unrelated to our problem also. I don't know.

meet
Black ninja
Black ninja
Posts: 88
Joined: 31 Mar 2020, 04:37
Distribution: Porteus 4.0

Start-up lag on KDE

Post#11 by meet » 16 Apr 2020, 07:16

Ed_P wrote:
14 Apr 2020, 14:59
Something else to try meet, add EXIT to your changes= cheatcode to keep things from being written to the save.dat file until you shutdown Porteus. Especially effective for USB drives. changes=EXIT:pathto/porteussave.dat
This is nice option. But will this reduce the lag on boot? As there is nothing in the logs which points to the save to .dat file causing the delay.
Please help me understand this.

Also, can you explain how the .dat file works?
Does each and every action of mine in the OS saved in the .dat file and a history is maintained?
Or only the final settings and files?
How will I know if the dat file is getting full? Is it even possible for a 1.5 GB file to get full only due to settings? As all the files that I have on the USB are not even 5 MB.
Does the files saved outside the porteus folder on USB, but used while being logged on to the OS uses any space in the dat file?

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Start-up lag on KDE

Post#12 by Ed_P » 16 Apr 2020, 16:28

meet wrote:
16 Apr 2020, 07:16
This is nice option. But will this reduce the lag on boot?
Dunno. Easy enough to try to find out. Another option to try, try booting without the changes= option.
Also, can you explain how the .dat file works?
Does each and every action of mine in the OS saved in the .dat file and a history is maintained?
Or only the final settings and files?
It works just like the /home/guest/ directory. You change a file and save it, it also gets written to the .dat file. You change the file again it gets written to the /home/guest/ directory and the changed file also gets written to the .dat file. Every change you make gets written to the .dat file also. Not a history, just copies of what is current. Two writes for each change. And writes to a USB drive take time and add wear to the flash drive. With the EXIT option the writes to the .dat file all occur only one time, at shutdown. Does shutdown take longer, yes, several seconds on my systems but not that long.
How will I know if the dat file is getting full? Is it even possible for a 1.5 GB file to get full only due to settings?
Do you use a browser? Do you download files? Pictures? Visit websites? Your browser saves files, has backups and caches, for better performance, and they get saved to the .dat also. As for the fullness of the .dat file it is displayed when shutting down and there are scripts you can add and run that display the fullness also.

FWIW My .dat files are usually 524 MB or less. But files I download are moved to directories outside of my Porteus system.
Does the files saved outside the porteus folder on USB, but used while being logged on to the OS uses any space in the dat file?
No.

:)
Ed

meet
Black ninja
Black ninja
Posts: 88
Joined: 31 Mar 2020, 04:37
Distribution: Porteus 4.0

Start-up lag on KDE

Post#13 by meet » 17 Apr 2020, 03:08

Ed_P wrote:
16 Apr 2020, 16:28
meet wrote:
16 Apr 2020, 07:16
This is nice option. But will this reduce the lag on boot?
Dunno. Easy enough to try to find out. Another option to try, try booting without the changes= option.
I tried this. It didn't stop the lag that occurs as soon as KDE desktop is loaded. I think this is something specific to KDE. As porteus with other systems do not have this lag when desktop is loaded. Boot time is same irrespective of desktop. But KDE desktop just hangs for half to one minute as soon as it is loaded. And the log talks about something, but I don't understand what that is. Definitely something with the KDE.
(I see now why KDE is hated by some. :P)

And there was no considerable difference in boot time. The shutdown time, as you correctly mentioned, changed. Not that much.
Ed_P wrote:
16 Apr 2020, 16:28
How will I know if the dat file is getting full? Is it even possible for a 1.5 GB file to get full only due to settings?
Do you use a browser? Do you download files? Pictures? Visit websites? Your browser saves files, has backups and caches, for better performance, and they get saved to the .dat also. As for the fullness of the .dat file it is displayed when shutting down and there are scripts you can add and run that display the fullness also.
When I delete temp and cookie / history files from the browser, I hope that also deletes from the .dat file?
I would like to know more about the scripts you mentioned about checking the fullness.

Thank you so much Ed_P. :)

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Start-up lag on KDE

Post#14 by Ed_P » 17 Apr 2020, 04:01

I have this one I call spaceck.sh. It shows the percentage of the save.dat file used.

Code: Select all

#!/bin/sh
# Bogomips help: https://forum.porteus.org/viewtopic.php?f=140&t=6069&p=47591#p47589
#                https://forum.porteus.org/viewtopic.php?f=140&t=6069&p=47614#p47598

# du -BM -d3 /mnt/live/memory/images/changes 

# Color definitions
txtbld=$(tput bold)               # Bold
txtred=${txtbld}$(tput setaf 1)   # Red
rst=$(tput sgr0)                  # Reset

function redwarning() {
echo -e $txtred "$1" $rst
}

#set -x;

if [ -a /mnt/live/memory/images/changes ]; then
   SDspace=$(df -BM --output=size,used,avail,pcent /mnt/live/memory/images/changes | tail -n1)
   Changes=/mnt/live/memory/images/changes
else
   BOOTDEV=`grep -A1 "Booting" /var/log/porteus-livedbg|tail -n1|sed 's^//^/^g'`
   if [ "$BOOTDEV" == "/mnt/isoloop" ]; then
      BOOTDEV=`grep -A1 "ISO=" /var/log/porteus-livedbg`
      BOOTDEV=${BOOTDEV:4:9}
   fi
   VERSION=$(cat /etc/porteus-version)
   FOLDER=porteus${VERSION:9:3}
   Changes=$BOOTDEV/$FOLDER/changes
   if [ ! -d $Changes ]; then 
      Changes="$BOOTDEV/changes"
   fi
   if [ ! -f $Changes/porteussave.dat ]; then
      echo "No $Changes/porteussave.dat file."
      read
      exit
   fi

   echo guest | sudo -S -u root mloop $Changes/porteussave.dat &>/dev/null        
   SDspace=$(df -BM --output=size,used,avail,pcent /mnt/loop | tail -n1)
   Changes=$Changes/porteussave.dat
   echo guest | sudo -S -u root uloop &>/dev/null
fi
# echo $SDspace
read size used avail percent <<< $SDspace
if [ ${percent%\%} -gt  85 ]; then
   echo 
   redwarning "Warning! save.dat file $percent full.  Used: $used  Free: $avail"
   echo 
   sleep 5
else
#   echo "save.dat file $percent full.  Used: $used  Free: $avail"
   if [ "$(which kdialog &>/dev/null)" ]; then
      kdialog --msgbox "save.dat file $percent full....Used: $used....Free: $avail"  
      exit
   else
      Xdialog --msgbox "save.dat file $percent full.  Used: $used  Free: $avail" 33 128 
#      Xdialog --rc-file /home/guest/Savedat/bluetxt.rc --title $Changes --msgbox "save.dat file $percent full - Used: $used - Free: $avail" 5 60
      exit
   fi
fi
Two things to note, I boot all my systems from ISOs on my harddrive, not installs, and my folder structure for Porteus save.dat is porteus4.0/changes/porteussave.dat, which is standard Porteus naming convention except for the release number I added. If you run the script on your installed system it will probably work but if you run it on a different system the folder naming code will need to be changed to match your naming format.
Ed

meet
Black ninja
Black ninja
Posts: 88
Joined: 31 Mar 2020, 04:37
Distribution: Porteus 4.0

Start-up lag on KDE

Post#15 by meet » 17 Apr 2020, 15:53

Ed_P wrote:
17 Apr 2020, 04:01
If you run the script on your installed system it will probably work but if you run it on a different system the folder naming code will need to be changed to match your naming format.
Does this mean that the location /mnt/live/memory/images/changes basically opens the save.dat file?
Then that would mean that the properties of that folder will give me the details of usage (files and space) for dat file.

Post Reply