So i downloaded an app called "Quick System Info". And it shows memory as:
Total: 386MB, Free: 284MB, Idle: 135MB
Any idea why the total amount of RAM not 512MB?
I am running 2.2.1 stock on a S-LCD N1.
syl0n said:
So i downloaded an app called "Quick System Info". And it shows memory as:
Total: 386MB, Free: 284MB, Idle: 135MB
Any idea why the total amount of RAM not 512MB?
I am running 2.2.1 stock on a S-LCD N1.
Click to expand...
Click to collapse
..maybe this helps http://forum.xda-developers.com/showpost.php?p=8330592&postcount=48
OK. So essentially a 126MB RAM disk is created by the boot up process?
syl0n said:
So i downloaded an app called "Quick System Info". And it shows memory as:
Total: 386MB, Free: 284MB, Idle: 135MB
Any idea why the total amount of RAM not 512MB?
I am running 2.2.1 stock on a S-LCD N1.
Click to expand...
Click to collapse
Using free at the command line I get:
Code:
free
total used free shared buffers
Mem: 416188 343684 72504 0 12272
Swap: 0 0 0
Total: 416188 343684 72504
The the rest of the 512 is mapped for the Radio/gpu/sound after that there is the kernel and the framework and that's before you run anything.
I'd like to get to the bottom of this too.
1) I don't think the zimage takes up a lot of memory when decompressed. Its about 2MB compressed.
2) Is it possible that the memory address space is only 512MB?
i.e. the address bus is only 29 bits wide?
edit:
This explains it: http://forum.xda-developers.com/showpost.php?p=5298630&postcount=5
To me its akin to an on-board video card on your PC reserving 16/32/x MB of video.
britoso said:
I'd like to get to the bottom of this too.
1) I don't think the zimage takes up a lot of memory when decompressed. Its about 2MB compressed.
2) Is it possible that the memory address space is only 512MB?
i.e. the address bus is only 29 bits wide?
edit:
This explains it: http://forum.xda-developers.com/showpost.php?p=5298630&postcount=5
To me its akin to an on-board video card on your PC reserving 16/32/x MB of video.
Click to expand...
Click to collapse
Um yeah, so the 256 memory limtation was fixed in 2.2. That post is from January. The top part of it I'd assume is still the same. Must allocate memory to various things. My N1 shows 400M total from free or /proc/meminfo, (408600 bytes).
Hi,
i'm new to this forum, therefor a noob (yeah, i've watched the video )
And here's a first question :
I've noticed that several custom roms come with preconfigured ramdisks, and knowing that this phone "only" has 512M of ram, i guess that it could be usefull in some cases, so:
if you have tried, have you noticed a difference in performance/usage?
is it possible to add a ramdisk to a stock rom (V20o)? if yes, how? (link?)
does the OS view really a larger quantity of RAM (ie: device manager shows 1Gig of ram with a 512M ramdisk?) ?
Thank you for your futur replies
_
| |
| |
/ |___
______/ ____)
____)
____)
-------.______)
up!
Ramdisk/RAM hack
Hi/Salut
I looks to me like you're confusing ramdisk and RAM...
This post explains how to modify a ramdisk and explains what it is (by alansj): http://forum.xda-developers.com/showpost.php?p=2885020&postcount=1
"A ramdisk is basically a small filesystem containing the core files needed to initialize the system. It includes the critical init process, as well as init.rc, which is where you can set many system-wide properties."
On the other hand, the 512Mb amount of Ram remains the same. More precisely, 128Mb of those 512 are allocated to GPU, the amount of RAM left (~370Mb) is for applications/system. There are some tweaks (RAM hack, compcache...) that developpers have implemented to optimize the relatively small RAM, but no custom Rom actually increases it.
More in-depth:
RAM hack: devs modified the kernel to decrease the amount of RAM allocated to GPU (e.g: 128-32=96Mb allocated to GPU resulting in ~370+32~402Mb of RAM available for apps/system)
compcache: it virtually increases the amount of available RAM by allocating a specified amount of RAM to compressed swap. http://code.google.com/p/compcache/
Hope it helps you!
I have posted this in development, but thought General may be a better place for me peeps to see...YMMV!!!
SO...I wanted to give some performance enhancments that i have implemented on my NC. These have come from settings I have tweaked on my Epic 4G, that have seemed to GREATLY improve the smoothness and increased my wifi speeds. The first set of tweaks come courtesy of marcusant. His thread can be found here In the Epic 4G forums http://forum.xda-developers.com/show....php?t=1346680 This is to be copied into the sysctl.conf file located in /system/etc/. If its not there just create it.
net.ipv4.tcp_ecn=0
net.ipv4.route.flush = 1
net.ipv4.tcp_rfc1337 = 1
net.ipv4.ip_no_pmtu_disc = 0
net.ipv4.tcp_sack = 1
net.ipv4.tcp_fack = 1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_rmem = 4096 39000 187000
net.ipv4.tcp_wmem = 4096 39000 187000
net.ipv4.tcp_mem = 187000 187000 187000
net.ipv4.tcp_no_metrics_save = 1
net.ipv4.tcp_moderate_rcvbuf = 1
The first 4 tests in the attachment were prior to this tweak on CM9.
The next set of tweaks is courtesy of this thread http://forum.xda-developers.com/show...42047&page=439.
In Rom Toolbox (Note: to make changes using ROM Toolbox, you will need to purchase the pro version) I also changed some other settings as follows:
Under Kernel Tweaks, sysctl Conf:
Min Free: 4096
Dirty Ratio: 90
Background Ratio: 70
VFS Cache: 1
Oom Kill is checked
Under build.prop tweaks:
LCD: 240 (this is not used for the NC)
Ring Delay: 0 (this is not used for the NC)
VM Heap: 32m
Scan Interval: 300
Max Events: 150 (this is not used for the NC)
Under Auto Memory Manager:
Foreground: 6 MB
Visible: 8 MB
Secondary: 16 MB
Hidden: 30MB
Content: 40 MB
Empty: 50 MB
SD Boost value is at 4096 kb
And the changes to build.prop that I got from Biggoron:
Change:
davlik.vm.heapsize=92m (should originally be 32m)
Add: (these do not exist and must be manually added)
davlik.vm.heapstartsize=5m
davlik.vm.heapgrowthlimit=32m (thanks Bigoron)
I take NO credit for these tweaks, and no responsibility if it melts your NC! But I have found these tweaks to bring a HUGE improvement to my NC.
Also, my performance settings for CM9 are:
Governor: InteractiveX
CPU Steps: 300, 600, 825, 1100, 1300
All at stock voltages.
Good luck and let me know any results or changes that may work better!
This is very intriguing. Quick questions:
Is there any way to do this without the ROM Toolbox?
Also, are these related or overlapping (even conflicting) with the changes in the V6 Supercharger script?
FWIW, I think most of this could likely be compiled into a script that would apply the changes all at once, right?
mr72 said:
This is very intriguing. Quick questions:
Is there any way to do this without the ROM Toolbox?
Also, are these related or overlapping (even conflicting) with the changes in the V6 Supercharger script?
FWIW, I think most of this could likely be compiled into a script that would apply the changes all at once, right?
Click to expand...
Click to collapse
I haven't looked, but honestly, these are probably all housed in build.prop. I already had ROM Toolbox, so I just went with it. I know tnpapadakos complied the tweaks into the latest CM9 nightly here
The Auto Memory Manager portion is exactly what V6 changes for the OOM limits. So there may be some conflicts there. I dont believe the rest would conflict. I am definitely no dev, but have poked around in enough of the files to almost act like I know what I am doing!
adamdelozier said:
This is to be copied into the sysctl.conf file located in /system/etc/. If its not there just create it.
net.ipv4.tcp_ecn=0
net.ipv4.route.flush = 1
net.ipv4.tcp_rfc1337 = 1
net.ipv4.ip_no_pmtu_disc = 0
net.ipv4.tcp_sack = 1
net.ipv4.tcp_fack = 1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_rmem = 4096 39000 187000
net.ipv4.tcp_wmem = 4096 39000 187000
net.ipv4.tcp_mem = 187000 187000 187000
net.ipv4.tcp_no_metrics_save = 1
net.ipv4.tcp_moderate_rcvbuf = 1
Click to expand...
Click to collapse
That can easily be done with a script. Maybe I will try my hand at it and see how it works.
FWIW, I plan to research some of this and determine precisely what it is doing besides the default. I did a lot of this kind of work with a linux networking appliance that I developed for at my last job.
In Rom Toolbox (Note: to make changes using ROM Toolbox, you will need to purchase the pro version) I also changed some other settings as follows:
Under Kernel Tweaks, sysctl Conf:
Min Free: 4096
Dirty Ratio: 90
Background Ratio: 70
VFS Cache: 1
Oom Kill is checked
Click to expand...
Click to collapse
These are also in sysctl.conf. You could just add these lines, in addition to the ones you listed above:
vm.min_free_kbytes = 4096
vm.dirty_ratio = 90
vm.dirty_background_ratio = 70
vm.vfs_cache_pressure = 1
vm.oom_kill_allocating_task = 1
Under build.prop tweaks:
LCD: 240 (this is not used for the NC)
Ring Delay: 0 (this is not used for the NC)
VM Heap: 32m
Scan Interval: 300
Max Events: 150 (this is not used for the NC)
Click to expand...
Click to collapse
These can be done by editing build.prop manually.
you want:
dalvik.vm.heapsize=32m
wifi.supplicant_scan_interval=300
(you say the others are not used)
Under Auto Memory Manager:
Foreground: 6 MB
Visible: 8 MB
Secondary: 16 MB
Hidden: 30MB
Content: 40 MB
Empty: 50 MB
SD Boost value is at 4096 kb
Click to expand...
Click to collapse
These, I am guessing, are similar or in the similar vein as the V6Supercharger script.
And the changes to build.prop that I got from Biggoron:
Change:
davlik.vm.heapsize=92m (should originally be 32m)
Add: (these do not exist and must be manually added)
davlik.vm.heapstartsize=5m
davlik.vm.heapgrowthlimit=32m (thanks Bigoron)
Click to expand...
Click to collapse
Note the heapsize 92m is an overwrite of your other suggested setting from above.
Also, my performance settings for CM9 are:
Governor: InteractiveX
CPU Steps: 300, 600, 825, 1100, 1300
All at stock voltages.
Click to expand...
Click to collapse
In my guide, I shared my settings which are similar, but I don't go past 1200. Tweaking the voltages down will probably improve your battery life.
I am going to try the tweaks for build.prop and sysctl.conf.
mr72 said:
That can easily be done with a script. Maybe I will try my hand at it and see how it works.
FWIW, I plan to research some of this and determine precisely what it is doing besides the default. I did a lot of this kind of work with a linux networking appliance that I developed for at my last job.
These are also in sysctl.conf. You could just add these lines, in addition to the ones you listed above:
vm.min_free_kbytes = 4096
vm.dirty_ratio = 90
vm.dirty_background_ratio = 70
vm.vfs_cache_pressure = 1
vm.oom_kill_allocating_task = 1
These can be done by editing build.prop manually.
you want:
dalvik.vm.heapsize=32m
wifi.supplicant_scan_interval=300
(you say the others are not used)
These, I am guessing, are similar or in the similar vein as the V6Supercharger script.
Note the heapsize 92m is an overwrite of your other suggested setting from above.
In my guide, I shared my settings which are similar, but I don't go past 1200. Tweaking the voltages down will probably improve your battery life.
I am going to try the tweaks for build.prop and sysctl.conf.
Click to expand...
Click to collapse
thanks for the detail. I am the type to try and ask questions later. Tats how I learn best! Any improvements you can make give us all a better experience.
Sent from my NookColor using xda premium
Interesting thread.
There is also a sysctl config app in the market that allows tweaking of the values.
For those that like to play with fire
from Terminal
su
sysctl -a > /sdcard/sysconfig.txt
will create a dump of all the known current values that the kernel is using.
Well, most of the sysctl.conf and build.prop stuff is included in the ROM, and furthermore will likely be overwritten when you update the ROM, I would think.
And while I really like the V6Spercharger script, I think combining just the things it does for Nook Color, along with some of these things that make sense, all into one script, would really help. I might try my hand at this and see how it goes. This is all routine stuff for shell scripts.
mr72 said:
Well, most of the sysctl.conf and build.prop stuff is included in the ROM, and furthermore will likely be overwritten when you update the ROM, I would think.
And while I really like the V6Spercharger script, I think combining just the things it does for Nook Color, along with some of these things that make sense, all into one script, would really help. I might try my hand at this and see how it goes. This is all routine stuff for shell scripts.
Click to expand...
Click to collapse
If you can do it great! In the mean time, however conflicting the info may be, I will stick with it, because it sure is working damn good on both my devices!
Sent from my SPH-D700 using xda premium
adamdelozier said:
If you can do it great! In the mean time, however conflicting the info may be, I will stick with it, because it sure is working damn good on both my devices!
Click to expand...
Click to collapse
I am not disputing that it works!
I looked into the V6 Supercharger script, and it appears to be trying to be all things to all people, which makes it perhaps overkill for the NC. I might try and make a stripped version of it. My shell scripting is not exactly stellar.
I tell you what, this would all be a breeze to do in ruby. Do we have ruby working well on Android yet? I can't remember. If it was ruby, I could have the whole thing done in no time.
mr72 said:
I am not disputing that it works!
I looked into the V6 Supercharger script, and it appears to be trying to be all things to all people, which makes it perhaps overkill for the NC. I might try and make a stripped version of it. My shell scripting is not exactly stellar.
I tell you what, this would all be a breeze to do in ruby. Do we have ruby working well on Android yet? I can't remember. If it was ruby, I could have the whole thing done in no time.
Click to expand...
Click to collapse
Lol! I guess I wish I knew what ruby is?! I really want to learn programming and scripting on android. I just don't have enough time in the day with a 7 year old, 3 month old, and a pita job...not too mention the wife!! Haha. I would be more than happy to help test anything you can come up with. I may even try something myself if I can squeeze it in!
Sent from my SPH-D700 using xda premium
i can't attest to the ui smoothness yet but the wifi changes are insane... in my room my computer maxes out my broadband speed over wifi(30mbps) and i was getting around 15 on my nook(nothing to complain about) and 3mbps maximum on my galaxy nexus which apparently has a very low power wifi chip. i am now getting around 25 on my nook and 12 on my gnex. this is exactly what i've needed. i know you didnt find the tweaks but tremendous thanks for passing this on to us
ohshaith55 said:
i can't attest to the ui smoothness yet but the wifi changes are insane... in my room my computer maxes out my broadband speed over wifi(30mbps) and i was getting around 15 on my nook(nothing to complain about) and 3mbps maximum on my galaxy nexus which apparently has a very low power wifi chip. i am now getting around 25 on my nook and 12 on my gnex. this is exactly what i've needed. i know you didnt find the tweaks but tremendous thanks for passing this on to us
Click to expand...
Click to collapse
glad it worked for ya. Don't forget to hit that thanks button ;-)
Sent from my SPH-D700 using xda premium
If you are willing to put the packages into your davlik cache you can get Ruby through the Botbrew package manager. I know nothing about nothing, but it works for imagemagick and gcc.if you need dependencies to run, there is a growing list of available packages through opkg.
Inportb has done some cool stuff...
This is great, I am going to try this as soon as I can. Wifi always seems a little wonky for me.
Along with the previous sentiments - it would be great to package this up in a script or app or something. I don't know if it would be possible to bundle it into the CM9 builds, but that would be even better.
I am working on a script to do the build.prop and sysctl.conf changes. I'll leave the memory manager stuff to the V6 Supercharger.
Fwiw I have had a number of hard crashes, nook dies while asleep even for just one minute, since making these changes. I didn't notice any speed improvements. So I plan to study this some more for my own use. I think the network settings are a good idea but I'm not sure the vm tweaks are worth it.
Here's what I'm trying now, hopefully deals with the crashes:
build.prop:
wifi.supplicant_scan_interval=300
davlik.vm.heapsize=92m
davlik.vm.heapstartsize=5m
davlik.vm.heapgrowthlimit=32m
sysctl.conf:
# Changes added for network tweaking
net.ipv4.tcp_ecn=0
net.ipv4.route.flush = 1
net.ipv4.tcp_rfc1337 = 1
net.ipv4.ip_no_pmtu_disc = 0
net.ipv4.tcp_sack = 1
net.ipv4.tcp_fack = 1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_rmem = 4096 39000 187000
net.ipv4.tcp_wmem = 4096 39000 187000
net.ipv4.tcp_mem = 187000 187000 187000
net.ipv4.tcp_no_metrics_save = 1
net.ipv4.tcp_moderate_rcvbuf = 1
# Changes added for virtual memory tweaking
vm.min_free_kbytes = 4096
vm.dirty_ratio = 90
vm.dirty_background_ratio = 55
vm.vfs_cache_pressure = 20
vm.oom_kill_allocating_task = 1
and run the V6 Supercharger for the minfree settings (option 9)
mr72 said:
Here's what I'm trying now, hopefully deals with the crashes:
build.prop:
wifi.supplicant_scan_interval=300
davlik.vm.heapsize=92m
davlik.vm.heapstartsize=5m
davlik.vm.heapgrowthlimit=32m
sysctl.conf:
# Changes added for network tweaking
net.ipv4.tcp_ecn=0
net.ipv4.route.flush = 1
net.ipv4.tcp_rfc1337 = 1
net.ipv4.ip_no_pmtu_disc = 0
net.ipv4.tcp_sack = 1
net.ipv4.tcp_fack = 1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_rmem = 4096 39000 187000
net.ipv4.tcp_wmem = 4096 39000 187000
net.ipv4.tcp_mem = 187000 187000 187000
net.ipv4.tcp_no_metrics_save = 1
net.ipv4.tcp_moderate_rcvbuf = 1
# Changes added for virtual memory tweaking
vm.min_free_kbytes = 4096
vm.dirty_ratio = 90
vm.dirty_background_ratio = 55
vm.vfs_cache_pressure = 20
vm.oom_kill_allocating_task = 1
and run the V6 Supercharger for the minfree settings (option 9)
Click to expand...
Click to collapse
Hey...just as an fyi...this is the link to the epic cm9 blog http://epiccm.blogspot.com/p/cm9-status.html
they show on the latest alpha release some of the VM.dalvik tweaks are now being built into the cm9 releases for the epic. I have not looked yet to see if these are specific to the epic or coming from upstream.
Sent from my SPH-D700 using xda premium
adamdelozier said:
Hey...just as an fyi...this is the link to the epic cm9 blog http://epiccm.blogspot.com/p/cm9-status.html
they show on the latest alpha release some of the VM.dalvik tweaks are now being built into the cm9 releases for the epic. I have not looked yet to see if these are specific to the epic or coming from upstream.
Sent from my SPH-D700 using xda premium
Click to expand...
Click to collapse
That's very interesting. I would think those settings in particular are likely device-specific, but it is good to know that some of these are making it into the CM repo. Probably will also happen for the NC.
However, I can verify that these settings were neither default nor automatically set by the CM7.20 build I am running, and I suspect they are not set for CM7.10 either. So for the NC on CM7, these are likely different.
Whether they are a good idea or not, I don't know.
I put some tweaks into sysctl.conf but they don't appear to be applied on boot. Specifically,
net.ipv4.tcp_wmem = 4096 16384 131072
net.ipv4.tcp_rmem = 4096 87380 524288
Anyone else verify if sysctl.conf is being used on boot? CM7.2 here. I see the init.d script but I don't know how to figure out if those are enabled on Android. Running sysctl -p as superuser definitely works.
Hi,
I have Lancelot phone (4gb) running Miu 13.0.2 global - android 12
After latest update..
I have some issues:
Reboot takes really long.
My WiFi router keeps disconnecting me it's a Fritzbox.. random Mac is disabled but router logs says not?
Multi tasking no-longer works,
Power save Miu optimization is off
I have "auto start" on.
I have "lock icon" above app ( using security app)
But as soon as I go from say chrome browser to a notepad app.. it reloads the app Vs keeping it running in the background
Other things:
Screenshot with scroll doesn't work.
Chrome browser/ share icon / save as jpeg crashes browser.
Listening long periods you get a notification warning about listening to long?
Random wallpaper app keeps running.. sending notifications..why?
I appreciate the help.
Solved:
Share app : I deleted..it just caused chrome to crash
The auto wallpaper changer app: deleted
The warning headphones app: I disabled
I have the same. The phone ran better on MIUI 12 than on 13. I looked into the issue and it is RAM-starved on MIUI 13. The firmware just uses so much RAM by itself, that not enough is left for your apps. At least on my model wiht 3GB RAM.
I have a few things installed that run in background (Blokada ad blocker, Whatsapp, Threema, GMX mail) and there's not enough RAM that I reliably get a notification when someone sends me a Whatsapp message.
I plan to switch to LineageOS soon.
Yesterday, I took the time to deep dive in the settings
Yet..no clue what's going on..
Free User available ram = 1.5 GB says phone
Sad..that there is no..revert update function.
It did send a bug report..let's hope it gets fixed
As for security, I use netguard with adguard DNS. ( Blocking lots of apps from phoning home or using my mobile data while blocking ads )
Mitchell4you. said:
Free User available ram = 1.5 GB says phone
Click to expand...
Click to collapse
Yeah, but that doesn't seem correct. I currently have no foreground apps open, just on the launcher the UI says "1.2 GB of 3.0 GB available".
But top shows this:
Tasks: 695 total, 1 running, 694 sleeping, 0 stopped, 0 zombie
Mem: 2758004K total, 2692880K used, 65124K free, 10536K buffers
Swap: 2097148K total, 905024K used, 1192124K free, 1167604K cached
...
2.69GB of 2.76GB used. 65MB free, 10MB buffers, and even 905MB swap are used already.
Same with "free -m":
total used free shared buffers
Mem: 2693 2606 86 52 9
-/+ buffers/cache: 2597 95
Swap: 2047 812 1235
Only 86MB RAM free without any user foreground app running, and 812MB swap already used.
I guess the available RAM display in MIUI is just wrong. It seems to count the free swap space as free RAM. (But doesn't count swap size towards total size.
I stumbled upon the option to disable apps via adb pm. There one can also disable apps where it is greyed out in the settings/manage apps UI.
See e.g. https://selivan.github.io/2020/02/25/removing-bloatware-from-xiaomi-miui-android.html
I noticed that "com.google.android.googlequicksearchbox" uses about 300MB RAM although I do not use it.
Do "adb shell" and then e.g. "pm disable-user com.google.android.googlequicksearchbox".
I disabled some more (Google One, Google Wallet, GMail, com.google.android.apps.turbo, com.xiaomi.joyose. com.facebook.system, Mi browser, Mi Health, MIUI ads, MIUI analytics, ...) Will see how it works out.
There several packages using up RAM which are useless for me (support for NFC payment on WeChat or fingerprint payment in AliExpress).
Code:
:/ $ free -m
total used free shared buffers
Mem: 3701 3546 154 64 37
-/+ buffers/cache: 3509 191
Swap: 2251 1033 1218
:/ $
Indeed..
Code:
:/ $ cat /proc/meminfo
MemTotal: 3790152 kB
MemFree: 138952 kB
MemAvailable: 1219616 kB
Buffers: 18420 kB
Cached: 1252720 kB
SwapCached: 125024 kB
Active: 1422752 kB
Inactive: 733888 kB
Active(anon): 763628 kB
Inactive(anon): 288660 kB
Active(file): 659124 kB
Inactive(file): 445228 kB
Unevictable: 95936 kB
Mlocked: 95936 kB
SwapTotal: 2306044 kB
SwapFree: 1290616 kB
Dirty: 72 kB
Writeback: 0 kB
AnonPages: 967296 kB
Mapped: 949036 kB
Shmem: 71896 kB
KReclaimable: 111464 kB
Slab: 218172 kB
SReclaimable: 60940 kB
SUnreclaim: 157232 kB
KernelStack: 57776 kB
PageTables: 90692 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 4201120 kB
Committed_AS: 91750508 kB
VmallocTotal: 263061440 kB
VmallocUsed: 106608 kB
VmallocChunk: 0 kB
CmaTotal: 327680 kB
CmaFree: 40196 kB
:/ $