WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: sce-update: RAM-usage  (Read 2056 times)

Offline sm8ps

  • Sr. Member
  • ****
  • Posts: 337
sce-update: RAM-usage
« on: August 23, 2016, 04:55:03 AM »
I launched ''sce-update -nars'' an a netbook with 1.5 GB of RAM, thinking this should be plenty enough. While checking for updates, i.e. before actually updating any package, available RAM went down below 150 MB which did not suffice for the update of my X11 meta-package. There was a total of 42 packages needing updates, some major ones like firefox among them.

Then I re-booted into the command line and started over. The checking process made RAM consumption grow towards 1.3 GB and the remaining 200+ MB were just barely enough for the updates to take place. After this all has taken place, ''free -h'' shows still 1.3 GB used.

So it seems that sce-update does consume a lot of RAM and does not yield it. Is this expected behavior?

Thanks for your consideration!

Offline sbaguz

  • WikiUser
  • *
  • Posts: 42
Re: sce-update: RAM-usage
« Reply #1 on: August 23, 2016, 05:02:34 AM »
Having just done a sce-update -snar, I can confirm this behavior: sce-update is showing low RAM amounts and it stops asking if the user wants to proceed anyway, whereas other tools show some GB free.
What I did was closing any other application (just to be on the safe side) and ignoring sce-update warnings: everything went fine.

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: sce-update: RAM-usage
« Reply #2 on: August 23, 2016, 11:12:22 AM »
This is normal behavior for all processes in Linux that use RAM.  Unused RAM is used, and then kept in cache until another process needs it or the cache is cleared, "cache-clear" in Tinycore will do it.  The warning given by sce-import or sce-update in regards to RAM is on the safe side and is not considering cached RAM or swap space, and can usually be ignored.   Hard drive or other storage space is another situation and the warning should be heeded there.

I don't see sce-update occupying more RAM on my desktop system after already browsing the web and other RAM consuming activities, as cached RAM that is no longer needed is used instead of empty or free RAM.  Below is before and after the cache-clear command:

EDIT: I don't see the checking part of sce-update use much RAM, of course if the -r option is used then .deb unpacking happens in RAM, the total of which is the size of the uncompressed contents of what will be in the resulting SCE.

Code: [Select]
jason@box:~$ /bb/free
             total         used         free       shared      buffers
Mem:       3860916      3715100       145816       322424        81264
-/+ buffers:            3633836       227080
Swap:      2047996            0      2047996
jason@box:~$ sudo cache-clear
jason@box:~$ /bb/free
             total         used         free       shared      buffers
Mem:       3860916      1012004      2848912       324508          156
-/+ buffers:            1011848      2849068
Swap:      2047996            0      2047996
jason@box:~$

« Last Edit: August 23, 2016, 12:42:56 PM by Jason W »

Offline patrikg

  • Sr. Member
  • ****
  • Posts: 466
Re: sce-update: RAM-usage
« Reply #3 on: August 23, 2016, 11:53:31 AM »
I always use the Unix sync command to write out, don't know if this could be some tips on this.

Offline sm8ps

  • Sr. Member
  • ****
  • Posts: 337
Re: sce-update: RAM-usage
« Reply #4 on: August 24, 2016, 11:59:07 PM »
This is normal behavior for all processes in Linux that use RAM.  Unused RAM is used, and then kept in cache until another process needs it or the cache is cleared, "cache-clear" in Tinycore will do it.  The warning given by sce-import or sce-update in regards to RAM is on the safe side and is not considering cached RAM or swap space, and can usually be ignored.   Hard drive or other storage space is another situation and the warning should be heeded there.

I don't see sce-update occupying more RAM on my desktop system after already browsing the web and other RAM consuming activities, as cached RAM that is no longer needed is used instead of empty or free RAM.  Below is before and after the cache-clear command:

EDIT: I don't see the checking part of sce-update use much RAM, of course if the -r option is used then .deb unpacking happens in RAM, the total of which is the size of the uncompressed contents of what will be in the resulting SCE.

Thanks for the briefing about the kernel's handling of RAM usage! I must confess that I did not have that kind oversight before. It makes sense now.

Still the warning about insufficient RAM is troubling, and if it can usually be disregarded then it should not really appear, should it? I see that considering swap space is not desirable but the way I understand your explanations, cached RAM should be considered. Is there a reasonably simple way to make ''sce-update'' take that into account? I think that would be helpful here.

I have another system in about the same state that I could use for testing purposes. My approach was watching ''free -h'' while launch ''sce-update -arns'' was running. Is there any more concise way of testing RAM usage?

I always use the Unix sync command to write out, don't know if this could be some tips on this.
Thanks for the tip! Though, I do not think that disk cache is the real issue here but maybe I am wrong. Does anybody know better?