Closed fxmbsw7 closed 2 months ago
Let's firstly format that ps
output more nicely.
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
u0_a425 17038 2.3 1.1 18833088 186260 ? R<l 1970 0:17 com.termux
Alright let's have a look here.
VSZ
18833088
As described in man 1 ps
:
virtual memory size of the process in KiB (1024-byte units).
If we do the math that works out to ~17.96GiB[^1] of virtual memory that has been allocated by Android to be available to Termux if required.RSS
186260
As described in man 1 ps
:
resident set size, the non-swapped physical memory that a task has used (in kilobytes).
This is the actual memory currently being used by Termux and all of its subprocesses.
If we do the math again[^2], that works out to ~181.9MiB being used to run Termux and all of the subprocesses you have running in it.
This seems perfectly reasonable, though seems to be marginally higher than the ~150MiB on a fresh session I'm seeing on my device on average, though this may vary based on the services you are running and your configuration.This is not a bug, this is Termux working as expected.
[^1]: 18833088KiB / 1024^2B = 17.9606323242GiB
[^2]: 186260KiB / 1024B = 181.89453125MiB
what does this mean
On Thu, Sep 12, 2024, 9:45 AM TomIO @.***> wrote:
Closed #4148 https://github.com/termux/termux-app/issues/4148 as not planned.
— Reply to this email directly, view it on GitHub https://github.com/termux/termux-app/issues/4148#event-14228155538, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMLP3LQNTN7L63C6JXHKMTZWFBBZAVCNFSM6AAAAABOCOARNCVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJUGIZDQMJVGU2TGOA . You are receiving this because you authored the thread.Message ID: @.***>
Virtual memory, resident memory, memory overcommit and other Linux memory subsystem quirks are not a small topic which can be explained in a comment under GitHub issue ticket. Google it if you are really interested in this.
You already got an answer for original question: yes, the numbers you see are normal.
Problem description
i start termux , and type ps auxww , then the termux emulator entry looks like this
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND u0_a425 17038 2.3 1.1 18833088 186260 ? R<l 1970 0:17 com.termux
thats 1.1 % of 14.9gb ram .. and the number looks rather way too high .. ?
plz tell me is this normal
thanks
Steps to reproduce the behavior.
open termux and enter ps auxww < enter >
What is the expected behavior?
less ram usage
System information