[Google Pixel 2 XL ROMs, Kernels, Recoveries, & Oth] Freak07:
Preview for Release 4.4.0

Hello guys and girls,

A long time without any posts on this thread here. I guess that´s good, because nobody faced any issues after backporting the oom_reaper in the latest 4.1.1 release.

In case you missed it have a read at the release post of 4.1.1.

The hangs when loading apps, that weren´t stored in RAM previously, seem to be completely gone for me. That was the goal when implementing these changes.

Since I saw no issues in my beta testing group, on my own device or posted here in the thread I decided to move on with all further releases with the base of 4.1.1.

However the Pixel 2 XL still has "only" 4GB of RAM. Google decided last year and this year again that this is enough for the Pixel Phones.

This opens a topic with quite a lot of controversy. While it is always nice for the user to open an app exactly where he left it, it might not be that beneficial to just up the RAM up to 8GB.

With that said I don´t mind a redraw here and there as the Pixel 2 XL is a very fast device. For "light" apps like the clock app or Dialer for example there is only a fraction of a split second needed to load that app again into memory.

That said I´m open to any change if it proves to be needed. As you already know if you follow this thread, I decided on nearly all my kernels to disable ZRAM.

Have a read what exactly ZRAM is here.

I disabled ZRAM because it uses CPU-Power to compress the unneeded resources and also to decompress them again, in case they are needed. This was done in order to save a bit of battery.

However I found a more recent ZRAM implementation implemented by CAF in their source from kernel/common. I decided to give that implementation a chance and see how it goes.

Additionally there are different compression algorithms available for ZRAM. The most used on is lz4. It offers the fastest compression and decompression speed.

The new ZRAM implementation introduces a "new" algorithm called ZSTD. Think of it as a more balanced algorithm. It has not quite as fast compression/decompression speeds as lz4 but it offers a higher compression ratio. The usage of ZSTD allows to store more "unneeded" resources in the 512MB of available space for ZRAM on the Pixel 2 XL than ZRAM that uses lz4 (default for Pixel 2 XL).

For reference here is a benchmark verifying this:

https://github.com/mavam/compbench

Well that´s the theory.

You can say, that theory sounds to good to be true. However I did a little "real life" experiment to see how the kernel runs with zram enabled plus zstd algorithm and was positively surprised!

Here is a little video showing a test run:

You can see the device is now able to hold all these apps in memory. I was even able to reload a few apps from memory that were used prior to doing this little experiment.

The conjunction of the oom_reaper and the new zram implementation seems to really work well! I decided to enable ZRAM back again, because this seems like a definite improvement!

So I´m proud to release this version, hoping multitasking on the Pixel 2 XL improved quite a bit.

Have a nice weekend all!

Release will be soon, hopefully today :)