to disable zram or not? - Moto G6 Play Questions & Answers

I more or less just want other opinions lol but should I disable zram/swap or na? I feel like this would be a useful question to ask anyway because i already know if you look up stuff like "make moto g6 play run faster" zram/swap will be brought up lol so I guess I'm also willing to be the one to ask what sounds like a "dumb" question but in the end no question is dumb lol

ninjakira said:
I more or less just want other opinions lol but should I disable zram/swap or na? I feel like this would be a useful question to ask anyway because i already know if you look up stuff like "make moto g6 play run faster" zram/swap will be brought up lol so I guess I'm also willing to be the one to ask what sounds like a "dumb" question but in the end no question is dumb lol
Click to expand...
Click to collapse
I think that's a great question that doesn't get discussed enough.
If you disable zram then you'd probably want to disable swap along with it. Zram stores compressed data in the ram itself, where as swap uses your emmc. If you needed more ram then you had available, and zram is disabled, swap is going to write to storage far more often making it slower during heavy use. It'll also wear out your emmc faster.
Basically I think it'd work out like this.
Zram + swap = Standard speeds.
Zram + no swap = Usually a bit faster than stock.
No Zram + swap = A bit slower than stock.
No Zram + No swap = The fastest option, but apps will get purged from memory more often. If you're a gamer, or not multitasking heavily between many apps, then this is probably your best option.
On systems with more RAM (3gb+), you'd probably want to disable both regardless of how you use your device. You'll get more longevity and faster speeds. Thank you for reminding me about this! I've been meaning to disable both. I might actually do some benchmarks to show the difference. If I do I'll post them.

Spaceminer said:
I think that's a great question that doesn't get discussed enough.
If you disable zram then you'd probably want to disable swap along with it. Zram stores compressed data in the ram itself, where as swap uses your emmc. If you needed more ram then you had available, and zram is disabled, swap is going to write to storage far more often making it slower during heavy use. It'll also wear out your emmc faster.
Basically I think it'd work out like this.
Zram + swap = Standard speeds.
Zram + no swap = Usually a bit faster than stock.
No Zram + swap = A bit slower than stock.
No Zram + No swap = The fastest option, but apps will get purged from memory more often. If you're a gamer, or not multitasking heavily between many apps, then this is probably your best option.
On systems with more RAM (3gb+), you'd probably want to disable both regardless of how you use your device. You'll get more longevity and faster speeds. Thank you for reminding me about this! I've been meaning to disable both. I might actually do some benchmarks to show the difference. If I do I'll post them.
Click to expand...
Click to collapse
Right I don't see it talked about alot but I'll have to take the screenshots to but I disabled both zram and swap using aosip and boy howdy I def notice a difference. Also since flashing aosip I've noticed my phone is a bit more usable now once it hits 10% or lower battery, on stock the phone basically is unusable once the battery hits 10% or lower.

how c
Spaceminer said:
I think that's a great question that doesn't get discussed enough.
If you disable zram then you'd probably want to disable swap along with it. Zram stores compressed data in the ram itself, where as swap uses your emmc. If you needed more ram then you had available, and zram is disabled, swap is going to write to storage far more often making it slower during heavy use. It'll also wear out your emmc faster.
Basically I think it'd work out like this.
Zram + swap = Standard speeds.
Zram + no swap = Usually a bit faster than stock.
No Zram + swap = A bit slower than stock.
No Zram + No swap = The fastest option, but apps will get purged from memory more often. If you're a gamer, or not multitasking heavily between many apps, then this is probably your best option.
On systems with more RAM (3gb+), you'd probably want to disable both regardless of how you use your device. You'll get more longevity and faster speeds. Thank you for reminding me about this! I've been meaning to disable both. I might actually do some benchmarks to show the difference. If I do I'll post them.
Click to expand...
Click to collapse
Spaceminer said:
I think that's a great question that doesn't get discussed enough.
If you disable zram then you'd probably want to disable swap along with it. Zram stores compressed data in the ram itself, where as swap uses your emmc. If you needed more ram then you had available, and zram is disabled, swap is going to write to storage far more often making it slower during heavy use. It'll also wear out your emmc faster.
Basically I think it'd work out like this.
Zram + swap = Standard speeds.
Zram + no swap = Usually a bit faster than stock.
No Zram + swap = A bit slower than stock.
No Zram + No swap = The fastest option, but apps will get purged from memory more often. If you're a gamer, or not multitasking heavily between many apps, then this is probably your best option.
On systems with more RAM (3gb+), you'd probably want to disable both regardless of how you use your device. You'll get more longevity and faster speeds. Thank you for reminding me about this! I've been meaning to disable both. I might actually do some benchmarks to show the difference. If I do I'll post them.
Click to expand...
Click to collapse
how can I disable it? running on Android 9.. unisoc 9863a cpu ..1 GB of zram is enabled by default

Related

"ReadyBoost" for Android?

Hello,
Why isnt it possible to use SDCRAM as sort of RAM in android? same as VISA/7 Using ReadyBoost to expand the ram with an USB disk on keys?
thanks!
Why would you want that?
since you only use flash based memory anyway: that's called swaping
And is Swap enabled in all froyo roms today?
rommark said:
And is Swap enabled in all froyo roms today?
Click to expand...
Click to collapse
But why would you need it? You have 512MB of RAM, with a clean boot you have around 200-220MB of it free for whatever you want to do with it. Not enough for you?
martino2k6 said:
But why would you need it? You have 512MB of RAM, with a clean boot you have around 200-220MB of it free for whatever you want to do with it. Not enough for you?
Click to expand...
Click to collapse
won't heavy 3d games eat that?
rommark said:
won't heavy 3d games eat that?
Click to expand...
Click to collapse
No. Smartphones =/= PCs. And if you are really out of space for a short amount of time, unneeded processes get killed automatically. Swap was only really needed on the G1 but definitely not on the Desire.
rommark said:
won't heavy 3d games eat that?
Click to expand...
Click to collapse
No, that's a bit too much even for a game... unless the code has memory leaks. With so much RAM it'd make more sense to use ramdisk (but who knows for what good use)
martino2k6 said:
No, that's a bit too much even for a game... unless the code has memory leaks. With so much RAM it'd make more sense to use ramdisk (but who knows for what good use)
Click to expand...
Click to collapse
RamDisk could be insane for 3d gaming as then the textures would have fast extraction means less delay in rendering....
What Readyboost is NOT
Hey folks. I've only recently discovered Readyboost as I'm primarily a Linux guy. I got all hot and bothered about it immediately as well as it is (despite Microsofts constant onslaught of horrific failures) an absolutely brilliant and elegant technology/idea.
HOWEVER!!!
Nearly everyone is confused about what RB actually does, so I thought I'd take a minute to explain.
ReadyBoost is NOT swap. NOT SWAP!, not swap.
Swap is not something to get excited about, it is a last resort for when you're out of RAM and it's excruciatingly slow. In the land of IT, one of the first things we check for when a server is experiencing horrible performance, is "IS THIS MACHINE SWAPPING". Everyone's gotta learn that swap, while it is more useful than "not enough memory" it is nor more useful than utilizing the memory you already have, and it will always result in poor performance.
ReadyBoost is an additional disc cache for small, non-sequential reads/writes. It works with your existing FS cache but is faster in some cases because FLASH has a much lower seek time. Most FLASH chips have a seek time of <1ms while most rotational discs have a seek time of around 8ms. This adds up on a large number of small non-sequential r/w.
ReadyBoost takes any caching operations which fit it's strength profile (small, non-sequential) and offloads them to your FLASH device. This can increase load speed of some files/application dramatically (2-20x faster).
So, when someone asks you if they can use Readyboost because they don't have enough memory, please, take a moment to explain that RB is not swap, but is in fact a supplementary disc cache for small, non-sequential reads and writes.
That said, I haven't had time to dig into the question of whether or not RB would benefit Linux FS's.
I know this is a really old thread but I just wanted to put my two cents in. Memory boosting apps like ReadyBoost do have a viable purpose. That is keeping older hardware viable as minimum specs increase. There is an Android app that is equivilant to ReadyBoost called Roehsoft RAM Expander. There are mixed reviews for its performance but that is to be expected. If this app helps my aging 8227_Demo head unit work well enough for me to not replace it I will update this post.

Freeing more ram on Galaxy S

Hypothesis:
The memory for this device is contiguous with memory holes. This holes are for DMA for front/back camera, video decoding/encoding, etc. In 99.99% of time this is wasted memory.
Proposal:
Why not allocating all ram and dynamically allocating memory for DMA only when needed?
For example this could be like this:
1.The phone boots and the mm allocates all memory but lies the driver for camera that he could use a portion of ram for DMA
2.The system use normally all memory (maybe allocating last the reserved memory)
3.The user starts the camera
4.A hook in camera's driver instruct the mm that he needs the reserved memory
5.The MM frees a portion of ram(other than the one needed by the camera and equal with that) and moves everything from the reserved memory in that
6.The MM updates it's maps(virtual memory ↔ real memory)
7.The camera uses normally in DMA the reserved memory
8.The user closes the camera, the camera driver notifies the MM that he doesn't need memory anymore
9.The MM allocates normally the reserved memory
Pros: You'll have like 50% more ram in user space
Cons: Some lag when starting camera
I'm ready to start implementing this but I don't have lots of experience with the linux's mm and I don't really know if this is possible so I'm asking:
How crazy this idea is and it could be implemented? And if yes, how hard?
WOW! Your the first to suggest it. After everybody else here on forum, that is.
dupel said:
WOW! Your the first to suggest it. After everybody else here on forum, that is.
Click to expand...
Click to collapse
Yes, I know, the idea is not revolutionary or smth ) but I'm ready to try to implement it...
So please respond only if you can provide some useful information.
Not sure anyone really knows how easy it is to do for sure, but it has been mentioned a few times (but sounds like you have done it in further detail).
Personally, I've always believed that it's something which Samsung is working on, but maybe not. Could be awesome if you managed to make it work reliably.
Check out Hardcore's Speedmod kernel here in the development section.
His kernel gives you 341 RAM instead of the default 304. Might give you some ideas.
I know this isn't a bounty thread, but I would be willing to donate $20 if you could get this working. I wouldn't mind a slightly delay when launcher camera. I'd much rather have more free RAM.
andars05 said:
I know this isn't a bounty thread, but I would be willing to donate $20 if you could get this working. I wouldn't mind a slightly delay when launcher camera. I'd much rather have more free RAM.
Click to expand...
Click to collapse
I seriously think Samsung messed up a very good phone by allotting ONLY 512 MB ram. With 16/8 GB at their disposal, they could have easily allotted at least 1 gb
ragin said:
I seriously think Samsung messed up a very good phone by allotting ONLY 512 MB ram. With 16/8 GB at their disposal, they could have easily allotted at least 1 gb
Click to expand...
Click to collapse
+1 here!
I have the 16GB version so I wish Sammy gave this version at least 2GB RAM and 1 GB ROM
android.francis said:
+1 here!
I have the 16GB version so I wish Sammy gave this version at least 2GB RAM and 1 GB ROM
Click to expand...
Click to collapse
Can any developer DO THIS?
Seems simple. I think you need hack the pit file.
hi . . .
I dont want to be rude, but seeing these comments I couldn't stop myself -
Dudes, if you dont know what you are talking about STFU!!!
Seriously?? Allocate more to RAM from 16/8 GB??????? And edit the PIT file for this???? I am assuming that you all would've used computers, are you allocating more to RAM from the free space in your Hard Disk?? What you are suggesting is the same!!!
Please think for a moment before you post stuff.
And to the original query regarding how hard this would be - it would be pretty hard. You will have to touch upon everything that uses and reserves RAM. And this would also include modifying firmware of individual components on the phone. And if there are parts in this for which Samsung has not released source code, it would be very difficult. Not to say that - you could end up damaging the phone.
Good thoughts - but it would need a lot of work to get going.
Cheerios!!
Actually, using a swap partition on flash isn't that bad an idea, they are low latency. It would be pretty slow compared to physical ram though
Sent from my GT-I9000 using XDA App
coooolboyz said:
hi . . .
I dont want to be rude, but seeing these comments I couldn't stop myself -
Dudes, if you dont know what you are talking about STFU!!!
Seriously?? Allocate more to RAM from 16/8 GB??????? And edit the PIT file for this???? I am assuming that you all would've used computers, are you allocating more to RAM from the free space in your Hard Disk?? What you are suggesting is the same!!!
Please think for a moment before you post stuff.
And to the original query regarding how hard this would be - it would be pretty hard. You will have to touch upon everything that uses and reserves RAM. And this would also include modifying firmware of individual components on the phone. And if there are parts in this for which Samsung has not released source code, it would be very difficult. Not to say that - you could end up damaging the phone.
Good thoughts - but it would need a lot of work to get going.
Cheerios!!
Click to expand...
Click to collapse
My response: VIRTUAL RAM. And yes, I think before I post. My response was more of wishful thinking. So as an added response: ANALYZE and comprehend BEFORE you react. And I orginally was not suppose to reply but similar to you, I JUST COULDN'T STOP MYSELF
Now as for the topic of more RAM, I said before to check out Hardcore's SPEEDMOD KERNEL. It is fully functional and your RAM goes from 304MB to 341MB. Yes, it is hard but Hardcore already did it.

killed all for ground apps TouchWiz UI uses up 2gb of ram?

So this is pretty crazy and weird but I killed all the apps running in the background and it says I'm using up 2.07gb of Ram how is that possible?
gator9422 said:
So this is pretty crazy and weird but I killed all the apps running in the background and it says I'm using up 2.07gb of Ram how is that possible?
Click to expand...
Click to collapse
Why does it matter? There is a ton of memory in this phone, and the OS manages it very, very well. You don't need spare memory. This isn't Windows, you won't run out of memory. It stores what it thinks it needs in RAM and keeps it there for quick access. It uses all the memory all the time (or at least it should). One of the things that prevents lag is to have the stuff loaded and ready at a moments notice.
Its a question of how the OS runs, not how much memory its taking. I would prefer if they hid that stat all together, then people would stop fixating on it, and loading efficiency killing memory manager apps.
Much like running defrag on a modern hard drive (they are supposed to be fragmented, they work better and faster that way) Android is supposed to run 90-95% used memory.. ALL THE TIME. Its the way its designed, and it works better that way.
One of the biggest misconceptions on all of XDA is about used RAM in a phone. People are always saying "OMG, there is only 500mb of unused RAM on my phone, it's going to slow down to a crawl!".
Just to be clear and hopefully people will understand it....unused RAM is wasted RAM. It does NOT have anything to do with slowing your phone down or anything like that. If there is 1gb of free RAM on your Note 4, that's totally fine.
Android manages RAM very well, don't stress. That's actually way more than it needs. You can only have 200mb of RAM free and your phone would still run fine. It's the way it's supposed to work. We have more than enough RAM in this phone.
I just hope this misconception will finally go away. I see at least a few RAM threads in every device forum.
It doesn't matter to me it's just the fact that I don't have any apps open and TouchWiz itself uses up 2gb of Ram to me that's a lot js
gator9422 said:
It doesn't matter to me it's just the fact that I don't have any apps open and TouchWiz itself uses up 2gb of Ram to me that's a lot js
Click to expand...
Click to collapse
It truly is a misconception. Android, windows, nix, any OS, for that matter. You would want too see your RAM being utilized. I would prefer to have my RAM used than not used at all because any unused RAM is a wasted RAM. This is also same with CPU. Unutilized cores are wasted cores. When writing software, one of the best practices is to learn how to use the memory to its full potential. You would want necessary stuff in RAM because using them when needed is faster if they are already loaded in memory than reinitializing the modules again and again every time for use. As far as memory location, RAM still provides the fastest. This is why in many companies that used gigabytes of data in their databases, a common practice in databadse engine technology is that they would actually load entire gigabytes of frequently accessed tables in memory for extremely fast access.
In short, don't worry
Thank you for the replies like they say you learn something new everyday. I appreciate the input
I'm more curious to know how the system manages to use more RAM every year with every new device released. Are there really that many more new features every year where they gobble up RAM?
gator9422 said:
Thank you for the replies like they say you learn something new everyday. I appreciate the input
Click to expand...
Click to collapse
http://searchstorage.techtarget.com/definition/cache-memory
Techweed said:
I'm more curious to know how the system manages to use more RAM every year with every new device released. Are there really that many more new features every year where they gobble up RAM?
Click to expand...
Click to collapse
My first computer had 512 mb RAM and it was fine at the time. Of course, with newer releases, they develop more features. With more features, more modules are created to support those features. Hence, more RAM usage.
^Wow, I think my first PC might have had 512 kb of RAM.
fbauto1 said:
My first computer had 512 mb RAM and it was fine at the time. Of course, with newer releases, they develop more features. With more features, more modules are created to support those features. Hence, more RAM usage.
Click to expand...
Click to collapse
That's true but with Kit Kat we were supposed to get a leaner running OS so that it would run on even old devices with minimum RAM. And I don't see how Touchwiz by itself could add 1 GB of RAM usage between the Note 2 and Note 4.
I would disagree on wanting all the ram to be being used... On previous rooted phones I have had (GS2, GS3, GSA4) getting rid of bloatware/useless apps eating up my ram made it much more responsive and fluid when opening new programs while significantly increasing battery life. Seems people just spew the bull**** marketing lines of Google across the internet and expect people to take it as truth. User experience is what is important, and getting rid of the garbage on any android version will make it faster. Not a difficult concept to understand.
rcracer_tx said:
I would disagree on wanting all the ram to be being used... On previous rooted phones I have had (GS2, GS3, GSA4) getting rid of bloatware/useless apps eating up my ram made it much more responsive and fluid when opening new programs while significantly increasing battery life. Seems people just spew the bull**** marketing lines of Google across the internet and expect people to take it as truth. User experience is what is important, and getting rid of the garbage on any android version will make it faster. Not a difficult concept to understand.
Click to expand...
Click to collapse
There is no bull**** here. Attend college and find out.
It is proven practice to use RAM
My source:
Myself with 15+ years as a software engineer
^^^This man speaks the truth. In my final year of my degree in software development and RAM utilization is common practice. User experience is different for everyone and what you "feel" is faster may or may not be an improvement.
Sent from my SAMSUNG-SM-N910A using XDA Free mobile app
I think the goal of debloating should be to reduce the use of cpu by unwanted applications and reducing the amount of RAM taken up by them so that other applications may be cached instead. Whenever I debloat I start with watching applications that load and try to trim of the ones I know I don't need at all. I then move onto greenifying applications that run or cache themselves that I'll rarely use. Never in this process do I try to maximize free memory since doing so means applications that are not cached will take longer to launch. Im not sure if this is the right philosophy but it seems effective to me.
fbauto1 said:
There is no bull**** here. Attend college and find out.
It is proven practice to use RAM
My source:
Myself with 15+ years as a software engineer
Click to expand...
Click to collapse
I already have two degrees from a major big 12 university. And do a good amount of IT work for the business I work at. If you think that having your ram eaten up by programs you never use is good practice, maybe you need to re-evaluate the school you got your education. Using your logic our computers should be faster when they are full of **** running in the background... That's asinine. Full AND EFFICIENT utilization of ram is proven practice, not filling up ram full of bloatware.
muzzy996 said:
I think the goal of debloating should be to reduce the use of cpu by unwanted applications and reducing the amount of RAM taken up by them so that other applications may be cached instead. Whenever I debloat I start with watching applications that load and try to trim of the ones I know I don't need at all. I then move onto greenifying applications that run or cache themselves that I'll rarely use. Never in this process do I try to maximize free memory since doing so means applications that are not cached will take longer to launch. Im not sure if this is the right philosophy but it seems effective to me.
Click to expand...
Click to collapse
Well said, I agree. I guess I didn't make the distinction of when freeing up ram being eaten up by crap that will never be opened, What I mean is that cached memory being freed up is then able to be used by apps that I actually use. If over 2gb out of 2.92gb is being used all the time, (with the vast majority being eaten up by bloatware and the rest just being the base OS/UI) then that is not efficient utilization of ram. If you have to kill cached programs constantly and then load the new program you begin using, its going to take longer than having that program already having everything cached. In most times this is only milliseconds difference, but the fluidity of the transition is important to many as it is a significant factor in user experience. Who wants a phone that lags whenever a user input is made?
rcracer_tx said:
Well said, I agree. I guess I didn't make the distinction of when freeing up ram being eaten up by crap that will never be opened, What I mean is that cached memory being freed up is then able to be used by apps that I actually use. If over 2gb out of 2.92gb is being used all the time, (with the vast majority being eaten up by bloatware and the rest just being the base OS/UI) then that is not efficient utilization of ram. If you have to kill cached programs constantly and then load the new program you begin using, its going to take longer than having that program already having everything cached. In most times this is only milliseconds difference, but the fluidity of the transition is important to many as it is a significant factor in user experience. Who wants a phone that lags whenever a user input is made?
Click to expand...
Click to collapse
It is interesting that the vast majority of 2GB of your RAM is being using by bloatware. Between the Touchwiz function for turning off unneeded apps and Android's algorithms for determining what should be kept in memory, I find that "bloatware" apps (i.e., app I don't use) are practically non-existent in RAM...at least for me. That said, even if you still have 0.92 GB free, Android is not likely to decide it needs to kill an existing process to accommodate another program.
rcracer_tx said:
I already have two degrees from a major big 12 university. And do a good amount of IT work for the business I work at. If you think that having your ram eaten up by programs you never use is good practice, maybe you need to re-evaluate the school you got your education. Using your logic our computers should be faster when they are full of **** running in the background... That's asinine. Full AND EFFICIENT utilization of ram is proven practice, not filling up ram full of bloatware.
Well said, I agree. I guess I didn't make the distinction of when freeing up ram being eaten up by crap that will never be opened, What I mean is that cached memory being freed up is then able to be used by apps that I actually use. If over 2gb out of 2.92gb is being used all the time, (with the vast majority being eaten up by bloatware and the rest just being the base OS/UI) then that is not efficient utilization of ram. If you have to kill cached programs constantly and then load the new program you begin using, its going to take longer than having that program already having everything cached. In most times this is only milliseconds difference, but the fluidity of the transition is important to many as it is a significant factor in user experience. Who wants a phone that lags whenever a user input is made?
Click to expand...
Click to collapse
You are comparing RAM utilization to bloatware?
Where did you get your degrees, eBay?
fbauto1 said:
You are comparing RAM utilization to bloatware?
Where did you get your degrees, eBay?
Click to expand...
Click to collapse
No... he's not. Read it again. His point is that programs he doesn't need utilizing ram is bad.
We're playing a game of semantics here. He is working the angle that the original posts saying 'using ram is good' isn't true if it is crap that is using it.
Silly discussion at this point as both sides are correct based on the parameters of their view point.
Sent from my SAMSUNG-SM-N910A

source of lag due to zram?

I've been experiencing random lagging with my nexus 5x and I just noticed that the stock nexus 5x kernel implements zram.
Here's screenshot:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
For those that don't know, zram is basically a compressed in RAM swap space.
Everytime the kernel saves to and from zram, it has to compress/decompress the contents and that could be the source of some of the lag people are seeing.
https://en.wikipedia.org/wiki/Zram
I plan on rooting my phone as soon as I get my usb c to usb a cable and disable zram and see if that helps with the random lags that i've been experiencing.
Very interesting theory....I am experiencing lag too with my 5X. It is very frustrating to compare with my two year old Nexus 5 which performs lightening fast and noticeably smoother.
Keep us posted when you root and disable zram :good:
The fact that google added the swap space seems to confirm that 2gb isn't enough for these 64bit SOCs. They shouldn't have skimped.
dwang said:
The fact that google added the swap space seems to confirm that 2gb isn't enough for these 64bit SOCs. They shouldn't have skimped.
Click to expand...
Click to collapse
If there is zram enabled in the 6P, then Google must have seen other problems. This is interesting though, thanks for informing us
0.0 said:
If there is zram enabled in the 6P, then Google must have seen other problems. This is interesting though, thanks for informing us
Click to expand...
Click to collapse
Good point.... Can anyone confirm is zram is enabled in the 6P?
Hi
dwang said:
The fact that google added the swap space seems to confirm that 2gb isn't enough for these 64bit SOCs. They shouldn't have skimped.
Click to expand...
Click to collapse
That's not the reason. Swap space takes up memory! The reason it is added is because it protects the flash memory and improves performance. Rather than having the swap drive all on flash memory, it is compressed and kept in RAM (because 2Gig is plenty), this improves performance because any pages swapped out are swapped to DRAM which is considerably faster (and uses less power), and saves lots of small writes to the flash memory, which stops it wearing out.
Google and LG haven't just thrown the Nexus 5X together without knowing what they are doing
Regards
Phil
seems like the encryption is the source of the bottleneck. the encryption with no easy way to disable. i cant wait till sources are released and i can get off android.
That makes no sense.
Hi
m4r0v3r said:
seems like the encryption is the source of the bottleneck. the encryption with no easy way to disable. i cant wait till sources are released and i can get off android.
Click to expand...
Click to collapse
I've disabled encryption (so I could root it) and the phone performs identical, besides I'm not seeing any lag or problems. Only user data is encrypted anyway, it's not the whole device that is encrypted, so any performance loss is negligible as it is only a tiny amount of data that is going through a decrypt/encrypt process.
The Nexus 5X is as fast for me as the graphical animations allow, if people are seeing lag have they tried a factory reset, leaving the phone to update all the apps without choosing to restore previous apps/data and trying the phone out? It could be an app problem/service that isn't compatible and eating CPU cycles.
Regards
Phil
I remember ZRam being used in the Jolla phone by some of the community, and in that instance it actually improved the performance.
My experience was the opposite. Back in the g2 days there were roms that enabled zram and it was smooth at first but then it got laggy after a few days.
I'm coming from the nexus 6, and the nexus 6 is smoother than the nexus 5x. This is in terms of input latency, scrolling, and load times.
It may very well that I have a defective phone, but a lot of other people have reported these issues as well. If you aren't experiencing this, more power to you, but don't disregard other people's experience.
dwang said:
My experience was the opposite. Back in the g2 days there were roms that enabled zram and it was smooth at first but then it got laggy after a few days.
I'm coming from the nexus 6, and the nexus 6 is smoother than the nexus 5x. This is in terms of input latency, scrolling, and load times.
It may very well that I have a defective phone, but a lot of other people have reported these issues as well. If you aren't experiencing this, more power to you, but don't disregard other people's experience.
Click to expand...
Click to collapse
Whatever the cause is, I've got this problem and I'm considering returning it as faulty and using my Nexus 5 for another year or two, because it's really bugging me now.
PhilipL said:
Hi
That's not the reason. Swap space takes up memory! The reason it is added is because it protects the flash memory and improves performance. Rather than having the swap drive all on flash memory, it is compressed and kept in RAM (because 2Gig is plenty), this improves performance because any pages swapped out are swapped to DRAM which is considerably faster (and uses less power), and saves lots of small writes to the flash memory, which stops it wearing out.
Google and LG haven't just thrown the Nexus 5X together without knowing what they are doing
Regards
Phil
Click to expand...
Click to collapse
Why there should be any swap space in the first place? Zram does indeed improve multitasking on systems with limited amounts of ram but there should be no reason to put it on an expensive device with "plenty of ram". Zram comes at a cost, cpu power and usable ram that is. If you do multi task a lot it's going to use more resources than necessary to keep up. If you are using an app that requires lots of ram it will slow your device down and cause a lot of heat because it is compressing/decompressing active pages. This is the reason most reviewers report that 5x is slower than the G4 (that has 1 more gb of ram) even though they have the same SoC.
It's the same Nexus 9 story all over again isn't it? Once again they used the absurd amount of 500+ MB which will cause the Low Memory Killer to kill everything except for the foreground app because there is no free ram.
But why did they do that? The 64bit android builds consume much much more ram than 32bit. If you disable zram on nexus 9 you will notice that it heats up much less and that it is faster with ram hungry applications but apps start dying even faster. Chrome will crash even with 1 tab open if the website is heavy. Launcher redraws will be everywhere. So we go from borderline usable to absolutely terrible.
I think they should have used 32bit builds on their 2gb devices. They would be faster and much more usable. There are no immediate benefits with 64bit anyway...
Hi
kdoul said:
Why there should be any swap space in the first place?...
Click to expand...
Click to collapse
Because it is breathing space should memory run short for whatever reason. We don't know the ZRAM is even being used, we just know it is there. There is a lot of complicated stuff going on with the Linux kernel and memory management, but typically in order to not waste memory, memory gets filled with all sorts of cached data until it is fall. Think of memory like an infinity swimming pool where the water goes right to the top edge, it doesn't matter how small or large that pool is, the whole point is to fill it to the brim. If you look over the edge of an infinity pool it has a catch channel and drain, because as soon as you use it, some water gets pushed out because it is fall. Memory is the same, because the idea is to use it all, there is always something getting pushed out, and rather than discard that completely, it gets swapped out, so when there is space again, it can be brought back in as required. The ZRAM is a friendly way of doing that to avoid lots of writes to flash memory, and because it is compressed, we might lose 500Meg to ZRAM, but the compression means it holds more than is lost, so we get a net gain.
Generally as I understand it, it's main purpose is to stop a constant trickle of writes to flash memory, which otherwise is wear on the flash memory and uses more power. It's job is a buffer for all the ebs and flows of a complex memory management system.
All major operating systems do this sort of thing, regardless of the amount of RAM available, because if you want to fill something to the brim, you've got have a way of dealing with an overflow in the most efficient manner.
You are correct in that 64bit is really a complete waste in smart phones and uses more memory, we have it because it's marketing, however the move to 64bit also brings some new instructions that aren't in the 32bit architecture in ARM, so there are improvements to be had as a consequence, but we don't need 64bit in smartphones really.
Regards
Phil
zram is being used by the phone. You can just do a "free" from the terminal and you can see that the zram swap space is being used. I have zram disabled on my 5x, or I would paste the output here, but its very easy to do even without root.
Also, there is no swap space on the flash enabled regardless of whether zram is enabled or not, so there is no risk that the flash memory will wear out.
If you disable zram, it doesn't mean that a swap space is automatically enabled on the flash.
PhilipL said:
Hi
Because it is breathing space should memory run short for whatever reason. We don't know the ZRAM is even being used, we just know it is there. There is a lot of complicated stuff going on with the Linux kernel and memory management, but typically in order to not waste memory, memory gets filled with all sorts of cached data until it is fall. Think of memory like an infinity swimming pool where the water goes right to the top edge, it doesn't matter how small or large that pool is, the whole point is to fill it to the brim. If you look over the edge of an infinity pool it has a catch channel and drain, because as soon as you use it, some water gets pushed out because it is fall. Memory is the same, because the idea is to use it all, there is always something getting pushed out, and rather than discard that completely, it gets swapped out, so when there is space again, it can be brought back in as required. The ZRAM is a friendly way of doing that to avoid lots of writes to flash memory, and because it is compressed, we might lose 500Meg to ZRAM, but the compression means it holds more than is lost, so we get a net gain.
Generally as I understand it, it's main purpose is to stop a constant trickle of writes to flash memory, which otherwise is wear on the flash memory and uses more power. It's job is a buffer for all the ebs and flows of a complex memory management system.
All major operating systems do this sort of thing, regardless of the amount of RAM available, because if you want to fill something to the brim, you've got have a way of dealing with an overflow in the most efficient manner.
You are correct in that 64bit is really a complete waste in smart phones and uses more memory, we have it because it's marketing, however the move to 64bit also brings some new instructions that aren't in the 32bit architecture in ARM, so there are improvements to be had as a consequence, but we don't need 64bit in smartphones really.
Regards
Phil
Click to expand...
Click to collapse
PhilipL said:
~text~
Click to expand...
Click to collapse
Memory management on your desktop or laptop computer is vastly different than that of android. On a desktop you try not to kill anything, because if you do something might break. If you run out of ram it is preferable to use some sort of swap space (pagefile in windows) in your hard drive to temporarily store inactive bits of memory until you need to use them later. It is slow but it gets the job done.
On android devices, storage is (maybe used to be) slow to read and write on so you want to use it the least possible. The solution is to maximize ram usage and fill it all the way at all times. If you have no apps open and lots of unused ram android will start caching your most used apps in the unused space to reduce loading times. If you do have apps opened they will stay frozen in the background until you access them again. But what happens when the unused ram goes low? Ask a special program to go on a killing spree. The idea is that you care about what you see and everything past that is not critical. Frozen apps die first, then some background services, then the foreground services and at last, the foreground app.
Then there comes the zram. The idea is that you cut a part of your physical ram and make it work like the swap partition on your hard dive, but you compress the data first before you put them there. Since ram is much faster than your hard drive zram, if configured correctly, can save you from swap slowdowns when using more than 100% of your physical ram.
Zram is problematic on android. How do you decide what to swap and what to kill when you are low on memory?
Battery and processing power are also limited. Heat when constantly using the cpu for compression is an issue that can cause slowdowns because of thermal throttling. On this scenario you are taking a huge piece for that purpose (more than 1/4) of the available physical ram when you should be taking less than half of that.
The only acceptable place for zram on android is on budget phones/tablets that simply can't afford to have more than 1gb of ram and you want them to run memory hungry applications without crashing. But then again, they do slow down when it is used. A lot.
When you have an expensive (flagship) device and you see that it can't run properly with the amount of ram you have already supplied the only way to ensure it will work optimally is to add more freaking ram. Not enable zram or any other software feature to try and bypass that. Google was stupid with the Nexus 9 and once again they are being stupid with the 5X. Cheaper or equally priced devices have tons of ram nowadays so I just can't see a reason other than Google wanting to either save peanuts from using less or promote their higher end model because it feels faster???
I can accept bad cameras, ugly design, small batteries, ****ty audio or even mediocre processing power. What I can't accept is (purposely?) crippled devices that they are broken out of the box in a way that you can't possibly fix.
Small edit: I believe that you can use the new crypto instructions from the ARMv8 instruction set and still run android in Aarch32 (32 bit) mode. In that case everyone is happy except for the marketing team of course.
So I've been running with zram disabled (in addition to disabling encryption) for about a day now, and I've not noticed any problems. The random lag I've been experiencing before are now largely gone and the phone is just as fast and smooth as my n5 and n6.
When i first got the n5x and experiencing the random lag, I was seriously considering returning it, but now that I've disabled zram and decrypted the phone, I'm fairly happy now. Though there are still issues related to charging and battery life.
If you don't use live wallpapers, facebook chatheads and keep the background junk in check it should work just fine. If you have problems with chrome killing tabs too often, try firefox.
Custom kernels should help with the rest.
okay im unencrypted and rooted, how can i disable zram? I've looked everywhere and cant find an answer. thanks!
Hey Guys I am unlocked but not rooted as i want to keep using android pay and keep my phone encrypted. Some here said there is a way to disable zram without root...how would one do that?
MY girls nexus 5x is lagging pretty hard and just an FYI my Nexus 6P also has ZRAM enabled. i like to turn that off as well. No need for it with 3gb ram!

Will doing a factory reset and disabling encryption speed up the phone at all?

I've heard that doing so alleviates some lag that people have been complaining about. Any truth to this?
First of all, please note that disabling decryption requires root, which also requires doing a factory reset. While disabling encryption will certainly speed up the phone, Google has improved encryption in Android Marshmallow so that it doesn't decrease performance as much as it did in Lollipop. You may not notice the difference. As for a factory reset, it will certainly get rid of any lag caused by any changes you made to the phone, but not any caused by Android.
Sent from my Nexus 5X using Tapatalk
Root and decryption are two different things. It seems you can have either or both. I'm curious to know if decryption carries a better experience myself also. I don't really care about benchmarks, mostly if it eliminates lag.
Every post I've read has said that they haven't noticed a difference between decrypted and encrypted with the 5X - though I haven't seen any benchmarks comparing. If it helps, the Ars Technica review shows how the I/O performance compares to previous phones. (3rd graph set in the Performance section)
I'm not sure whether it is actually a Marshmallow specific feature or not, but the 5X and the 6P are using the cryptography extensions that are part of the ARMv8 instruction set to perform encryption and decryption. The performance hit should be negligible.
Everyone clearly remembers the bad rep the N6 has for this, but it just didn't have proper support for this feature, though it apparently got a bit better later on. Right now it seems like jumping at ghosts for the 5X & 6P.
OP, which android build are you on? I'm wondering if the I build makes a difference. At least one person has returned their phone due to the lag, and had a replacement that didn't have that issue.
i was experiencing random lag with my n5x and I ended decrypting the phone and disabling zram and it made a big difference.
Before doing this, my phone was noticeably laggier and slower than my nexus 6 (decrypted). After decrypting and disabling zram, my n5x is now just as fast as my n6.
I did a speed test like those youtube videos, where you open apps at the same time and see which one finishes first, and now the n6 and n5x both finish opening apps almost exactly at the same time.
My build is mda89e. I don't have any noticeable lag, I was just curious if it would change anything.
How would you characterize the lag if it were present?
I decrypted and rooted, did not notice any difference in daily use. (dont care for benchmarks) I did however notice that the phone boots much faster after decryption.
dwang said:
i was experiencing random lag with my n5x and I ended decrypting the phone and disabling zram and it made a big difference.
Before doing this, my phone was noticeably laggier and slower than my nexus 6 (decrypted). After decrypting and disabling zram, my n5x is now just as fast as my n6.
I did a speed test like those youtube videos, where you open apps at the same time and see which one finishes first, and now the n6 and n5x both finish opening apps almost exactly at the same time.
Click to expand...
Click to collapse
How'd you disable zram?
lysm bre said:
How'd you disable zram?
Click to expand...
Click to collapse
I'd like to know this as well
Use trickster mod or kernel auditor to disable it.
Sent from my Nexus 5X using Tapatalk
Hi
Disabling ZRAM will wear out your flash memory quicker, the whole point of ZRAM is to speed up the phone and protect flash memory from hundreds or thousands of tiny write operations.
From the Wiki (https://en.wikipedia.org/wiki/Zram)
zram increases performance by avoiding paging to disk and using a compressed block device in RAM instead, inside which paging takes place until it is necessary to use the swap space on a hard disk drive. Since using RAM is an alternative way to provide swapping on RAM, zram allows Linux to make more use of RAM when swapping/paging is required, especially on older computers with less RAM installed.[1][2]
Even when the cost of RAM is low, zram still offers advantages for low-end hardware devices such as embedded devices and netbooks. Such devices usually use flash-based storage that has limited lifespan due to its nature, which is also used to provide swap space. The reduction in swap usage as a result of using zram effectively reduces the amount of wear placed on such flash-based storage, resulting in prolonging its usable life. Also, using zram results in a significantly reduced I/O for Linux systems that require swapping.[3][4]
Click to expand...
Click to collapse
Decryption doesn't make much difference (it will speed up boot times if you had a power on password, but that is simply because it is booting twice to offer us a protected Android environment first to get the password, and this was optional anyway, we get the choice during setup). The whole phone isn't encrypted anyway, just user data, hence overall the difference between encrypted and decrypted isn't that wide.
Unless we have some evidence of the speed up, I'm tempted to put down any suggestion of speed up down to the placebo effect :laugh:
If there is an improvement, It might be as simple as a factory reset is good for the phone due to some optimization undertaken with the flash memory at that time, or recompiling apps, that has been skipped when loading the device with an image at the factory. Perhaps that is why some people are seeing no problems with lag because they've played about first and had a mess around, then did a factory reset at some point to set up their device up as a daily driver.
A true test would be to do factory reset with everything at defaults, run a measured test, then decrypt and remove ZRAM and do a second test.
Regards
Phil
This is wrong. Disabling zram doesn't mean u are adding a swap to the flash, so the kernel isn't going to write to the flash.
You have no idea what you are talking about.
Sent from my Nexus 5X using Tapatalk

Categories

Resources