Page 21 of 55 FirstFirst ... 11161718192021222324252631 ... LastLast
Results 401 to 420 of 1081
Like Tree13Likes
  1. #401  
    After about 10 hours of using ramzswap with a separate official linux swap I havent noticed the tiered effects. I see ram getting used it fills and clears and sometimes spills into compache. Compache grows over time and shrinks every now and then. once I filled up compache the swap on /dev/store started to be used. I predict in the long run compache will stay full and swap will grow. once swap is full then the phone will freeze and crash.

    is anyone seeing the ram use and swap to compcache and every now and then compcache dumps to swap, keeping compcache with available space?
    Sprint pre -> Motorola Photon 4G
  2. carrel's Avatar
    Posts
    425 Posts
    Global Posts
    426 Global Posts
    #402  
    I'm confused... You say you haven't seen a tiered effect, but then you describe a perfectly operating tiered operation of filling ram, then compcache and then physical swap. The only negative is your prediction. The rest all sounds perfect. WebOS does use more and more memory over time. But eventually it seems to top out. From there, usage goes up and down.

    And yes, I saw the compcache fill and then empty some even when swap was partially used. That is normal. No need to move every possible bit of unused memory from lower priority swap to higher priority swap.
  3. #403  
    After just using the newer idea(s) since yesterday afternoon, I have decided that high swappiness is a bad idea. Swap just fills and fills until the kernel reaches a point that it decides it has to start juggling things around and that's when our Pre- falls over dead.

    I'm sticking with this multi-swap idea but have dropped the swappiness down to 30 and put back in the higher dirty times (my corrected ones - not the lower carrel's - I still am convinced that Palm's defaults are WAY too fast, though).

    I'm thinking to use the 2nd swap as "emergency" swap. With the lower swappiness, the kernel should only decide to use that when it ABSOLUTELY HAS TO to keep itself alive. This is what swap is for, not for filling up just to fill up (which is what the high swappiness will/does do).

    Will report back.


    M.
  4. #404  
    Quote Originally Posted by Xanadu73 View Post
    After just using the newer idea(s) since yesterday afternoon, I have decided that high swappiness is a bad idea. Swap just fills and fills until the kernel reaches a point that it decides it has to start juggling things around and that's when our Pre- falls over dead.

    I'm sticking with this multi-swap idea but have dropped the swappiness down to 30 and put back in the higher dirty times (my corrected ones - not the lower carrel's - I still am convinced that Palm's defaults are WAY too fast, though).

    I'm thinking to use the 2nd swap as "emergency" swap. With the lower swappiness, the kernel should only decide to use that when it ABSOLUTELY HAS TO to keep itself alive. This is what swap is for, not for filling up just to fill up (which is what the high swappiness will/does do).

    Will report back.


    M.
    I agree completely.

    The Palm settings are better than high swapiness, but there are still some issues.

    Trying with a setting of 30 too.

    Im also gonna try it with both 96mb compcache, and 32mb compcache. Will report the differences.
  5. #405  
    Quote Originally Posted by rmausser View Post
    I'm also gonna try it with both 96mb compcache, and 32mb compcache. Will report the differences.
    My head was going there too. I'm currently using 96M. I think that with the second swap area, 96M might actually be too much. I haven't changed it yet because I don't want to reboot at this time. Not that we HAVE to reboot to change this, but, I am trying not to taint the experience too much yet by clearing out various swaps mid-run and all that.


    M.
  6. #406  
    I am trying this now:

    Code:
    vm.swappiness = 30
    vm.vfs_cache_pressure = 200
    vm.dirty_expire_centisecs = 18000
    vm.dirty_writeback_centisecs = 6000
    ramzswap disksize= 32768. (memlimit is messed up, will always show at 60mb in sbin/swapon -s)

    Will report back. If 32768 proves to not be enough I am going to switch to 96mb and just keep the same sysctl settings.
  7. #407  
    Just a recap for those following at home:

    Things we know for sure:

    1) LunaSysMgr is better without over committing memory

    2)A dedicated Linux Swap Disk is much better with Compcache than the default Backing Store.

    3) Setting Compcache to Memlimit rather than Disksize does not seem to work right with a Linux Swap Disk

    4) 10MB of Compcache is not enough under any circumstance on the Pre-

    What we arent sure of yet:

    1) What SysCtl.conf settings are ideal

    2) If 32mb or 96mb of compcache is ideal
  8. carrel's Avatar
    Posts
    425 Posts
    Global Posts
    426 Global Posts
    #408  
    Quote Originally Posted by rmausser View Post
    Just a recap for those following at home:

    Things we know for sure:

    1) LunaSysMgr is better without over committing memory

    2)A dedicated Linux Swap Disk is much better with Compcache than the default Backing Store.

    3) Setting Compcache to Memlimit rather than Disksize does not seem to work right with a Linux Swap Disk

    4) 10MB of Compcache is not enough under any circumstance on the Pre-

    What we arent sure of yet:

    1) What SysCtl.conf settings are ideal

    2) If 32mb or 96mb of compcache is ideal
    I think I would disagree with your #1 "things we know". From looking at what the overcommit does, I do not think it is really doing that much. I think it did help back with backing store. The setting of zero would actually cause some malloc()s to fail and that would slightly slow down the backing store getting totally clogged up and becoming useless. With backing store disabled and a swap partition enabled, I have never yet run into a situation where VM is full, so basically a setting of 0 or 1 would behave the same. (Now using a value of 2 might be helpful if we were experiencing the OOM killer, but I have no reason to believe that my usage is getting me there. Sure if I open enough cards, I will, but I don't.) This value is not effecting performance, just how the system will behave when it truly runs out of VM. This, and the overcommit ratio, should be the last parameters we tune, after all the others.

    I look at this "experiment" slightly differently. There are two things going on.

    First, there definitely seems to be a bug in compcache backing store, and using compache along with a true swap partition seems to fix this.

    Second, with a working VM system, we should be able to tune it to perform best on our devices. All the kernel variable changes (sysctl.conf and LunaSysMgr) and compcache sizing are working on that.

    The two parts are completely separable, but I do think we should re-think/reevaluate any tuning efforts that were done previously with backing store. The experiments were hugely helpful to me to better understand the VM system, but the answers are no longer relevant. We will almost certainly want different tuning parameters for compache and a swap partition.
  9. carrel's Avatar
    Posts
    425 Posts
    Global Posts
    426 Global Posts
    #409  
    Quote Originally Posted by Xanadu73 View Post
    After just using the newer idea(s) since yesterday afternoon, I have decided that high swappiness is a bad idea. Swap just fills and fills until the kernel reaches a point that it decides it has to start juggling things around and that's when our Pre- falls over dead.

    I'm sticking with this multi-swap idea but have dropped the swappiness down to 30 and put back in the higher dirty times (my corrected ones - not the lower carrel's - I still am convinced that Palm's defaults are WAY too fast, though).

    I'm thinking to use the 2nd swap as "emergency" swap. With the lower swappiness, the kernel should only decide to use that when it ABSOLUTELY HAS TO to keep itself alive. This is what swap is for, not for filling up just to fill up (which is what the high swappiness will/does do).

    Will report back.


    M.
    I'm very curious to hear how this works. One word of caution about the "emergency" swap idea. If you delay swapping until you absolutely need it, then you will get larger delays when you do need more memory. It's a delicate balance. You don't want to swap too early, but also not too late. I want my system using swap before it absolutely has to. That should give me smoother operation.

    Also note, that I don't think you can set VM configuration parameters that apply to the swap partition that are different than the compcache. Both are considered swap to the VM system. The compcache has a higher priority so it will get used first. But the swapiness (for example) that you set will apply to both the swap partition and the compcache swap.

    FWIW: I am not any longer using the lower values that I mentioned a while ago. I am using all Palm defaults. I'm not claiming that these are better. I'm just trying to get a baseline that I understand before I go tweaking. The palm values are
    Code:
    vm.swappiness = 60
    vm.vfs_cache_pressure = 100
    vm.page-cluster = 3
    vm.dirty_expire_centisecs = 6000
    vm.dirty_writeback_centisecs = 500
    vm.dirty_ratio = 10
    vm.dirty_background_ratio = 5
    Here's something else to consider. Take a look at swaphack.sh and at the end, Palm is setting some tuning parameters that they thought would be useful when using a swap partition. The one that interested me was the I/O scheduler. Palm is setting it to cfq, but most of us running a non-stock kernel probably have a different setting (noop, anticipatory or deadline). This one can be set with Govanah.

    The hard part with all this is doing truly objective testing. Changing more than one variable at a time makes it hard to learn how much effect each had. But, on the other hand, the variables are inter-related and each does effect the other. So you can't tune one variable, claim it is ideal and move on to the next. Sigh ... it's never easy.
  10. #410  
    I have to admit im having VERY good results with:

    Code:
    vm.swappiness = 70
    vm.vfs_cache_pressure = 180
    vm.dirty_expire_centisecs = 18000
    vm.dirty_writeback_centisecs = 6000
    Compcache: 32768kb (and Linux Swap Disk)
    Last edited by rmausser; 05/29/2011 at 11:00 PM.
  11. dave75's Avatar
    Posts
    796 Posts
    Global Posts
    806 Global Posts
    #411  
    Quote Originally Posted by rmausser View Post
    THESE NEW SETTINGS ARE AMAZING!!

    Just had to say. Good work everyone. My phone is usable again. THANK GOD.

    To recap so far: (use Internalz Pro on the phone if ur not good with terminal to change these files BUT FIRST MAKE SURE that Internalz Pro is set to LINUX mode. To switch to linux mode open Internalz Pro and "left drop down menu>Preferences>Text Editor>Newline format: LINUX") Also scroll to the bottom of preferences and enable Master mode. BE CAREFUL, you now have the ability to modify system files with Internalz. Turn this off after you hack your phone so you dont delete something by mistake.

    Step 1: Change /etc/event.d/LunaSysMgr from:

    Code:
    echo "1" > /proc/sys/vm/overcommit_memory".
    to

    Code:
     #echo "1" > /proc/sys/vm/overcommit_memory".
    Step 2: Make a file in /etc called "sysctl.conf". Open the file with a text editor and write:

    Code:
     
    vm.swappiness = 90
    vm.vfs_cache_pressure = 200
    vm.dirty_expire_centisecs = 6000
    vm.dirty_writeback_centisecs = 1500
    Step 3: Open /etc/event.d/compcache.

    edit line 10 to say:

    Code:
     modprobe ramzswap disksize_kb=98304
    change line 10 to say ONLY that. Remove the part that says: dev/store/swap after it.

    then, after the line 12 in Compcache (swapon /dev/ramzswap0 -p 100, add:

    Code:
    mkswap /dev/store/swap
    swapon /dev/store/swap
    Reboot the phone. Enjoy.

    **I would highly recommend using the thundercheif F105 kernel if you can, as it overclocks the RAM to 200mhz, which will help with the slow speed of Compcache.**

    Explanation:

    What we are doing, is making essentially a pyramid of memory.

    On the top, we have real RAM, but less of it available. This is reserved only for applications that are currently being open or run and used, so they are responsive to the users input.

    In the middle of the pyramid we have Compresses Cache, or RAM that is being used as a compressed swap file. It is slower, but since it compresses the pages, there is more available for the phone to use than the Pre came with. It has the second priority, and is used for applications in the background and things that are not at your immediate attention.

    At the bottom we have disk swap. This is the slowest memory, but since we essentially have 8GB of memory on the phone, we could eventually turn this up to be even larger in size. Dirty pages and memory that is currently not being used at all, but the kernel thinks might be available on short notice, like background processes, lives here.

    We have organized the kernel to as quickly as possible dump any pages that arent being used to compcache, so that the faster ram is available for the app or device the user is using, hopefully eliminating lag. The advantage is that compcache increases the available amount of memory by compressing the pages, and therefore the kernel doesnt have to clean out the swap and ram as often, which is what is causing those long and painful lags we keep experiencing.

    **EDIT**

    changed memlimit to disksize.

    memlimit isnt working right and is stuck on 60mb according to /sbin/swapon -s. Dont know why.

    Are the changes in this post still valid with the exception of what is in your last post?
  12. carrel's Avatar
    Posts
    425 Posts
    Global Posts
    426 Global Posts
    #412  
    Quote Originally Posted by dave75 View Post
    Are the changes in this post still valid with the exception of what is in your last post?
    Yes, those instructions will work.

    I think step #1 will actually have no effect, but it doesn't hurt. Step #2 is fine tuning. Several folks are playing with different numbers. Its still to be seen what the best settings are. You can do this or leave this step out. Step #3 will have the most impact. Those instructions use 96Megs of compcache. That's a fine starting value. Some folks are trying out smaller values too. Hopefully we can come up with an optimal value, but my guess is that "optimal" will end up being rather subjective and different people will prefer different values based on how they use their Pre.

    If you are just starting with this, I'd suggest just doing step #3. Try it a bit. Then try step #2 or a variation of #2 or try changing the compcache size in #3.
  13. #413  
    Quote Originally Posted by carrel View Post
    Those instructions use 96Megs of compcache. That's a fine starting value. Some folks are trying out smaller values too. Hopefully we can come up with an optimal value, but my guess is that "optimal" will end up being rather subjective and different people will prefer different values based on how they use their Pre.
    I completely agree with this. I have found that with 32MB of compcache the phone is overall mroe responsive, but with 96MB I can open more apps at once, but the whole UI overall is slightly laggy.
  14. #414  
    Personally though I am finding 96mb with linux disk swap to be the best overall.

    Cards sometimes take a little bit longer to load than with 32mb compcache, but overall things stay more responsive and snappy, and overall less huge "lockups"

    so I have to say that 96mb is appearing to be the magic number for compcache, at least with me.
  15. #415  
    I have personally found this to be the best so far.

    Code:
    vm.swappiness = 70
    vm.vfs_cache_pressure = 200
    vm.dirty_expire_centisecs = 18000
    vm.dirty_writeback_centisecs = 6000
    With compcache at 96MB and Linux Disk Swap

    I am sorry, but I do not like a low Swapiness setting personally. It causes constant hangs.
  16. snpalavan's Avatar
    Posts
    71 Posts
    Global Posts
    72 Global Posts
    #416  
    So far so good, but webOS still does not like getting texts, calls and doing things at the same time. Definitely have lots of hang ups doing that.
  17. #417  
    Quote Originally Posted by carrel View Post

    Code:
    vm.swappiness = 60
    vm.vfs_cache_pressure = 100
    vm.page-cluster = 3
    vm.dirty_expire_centisecs = 6000
    vm.dirty_writeback_centisecs = 500
    vm.dirty_ratio = 10
    vm.dirty_background_ratio = 5
    These defaults were essentially configured for the Pre Plus however. Which has 512 mb of ram. Palm never configured 2.1 to work on a Pre-, or at least the doctor we are using is essentially for a Pre Plus.

    where did you find this information? Would there be any way to find these values for 1.4.5 on a Pre Minus?

    Then we could use those values as a baseline because the values for 1.4.5 on a Pre Minus were infact designed for a Pre Minus.
  18. carrel's Avatar
    Posts
    425 Posts
    Global Posts
    426 Global Posts
    #418  
    Quote Originally Posted by rmausser View Post
    where did you find this information? Would there be any way to find these values for 1.4.5 on a Pre Minus?

    Then we could use those values as a baseline because the values for 1.4.5 on a Pre Minus were infact designed for a Pre Minus.
    Just run "sysctl -a | grep vm" and you will see all the VM settings. Some of these are at the kernel defaults and some have been configured in startup scripts. The command will show the settings as they are so your changes in sysctl.conf and LunaSysMgr will be reflected in the output.

    You should definitely be able to run this on a 1.4.5 Pre, though I don't have one I can try. However, I would bet that the 1.4.5 values are much less relevant than 2.1.0 Pre+ values. The reasoning is that 1.4.5 didn't have compcache. Nonetheless, it would be interesting to see what they are. My guess is that Palm has done very little tuning and is mostly using stock linux defaults. Hmmm, did 1.4.5 even have swap??

    Also keep in mind that most of us are NOT running stock kernels. So any settings that were not overridden in startup files may have been changed by psycho or whoever built your kernel. But it does seem that Palm is using startup files to make kernel parameter changes, so it's likely that what you see with sysctl is pretty close to what Palm did, even with a non-stock kernel.
  19. carrel's Avatar
    Posts
    425 Posts
    Global Posts
    426 Global Posts
    #419  
    Yay! I just broke 2 full days running with my config. I have run many programs including Angry Birds and much more. And my Pre- is pretty darn happy. I have not changed the config at all during this time just so I could test stability. The VM system is behaving properly, allocating swap and releasing it appropriately. And it is favoring compcache over physical swap. Quick summary: I am running 96 Meg of compcache, a separate physical swap and NO custom settings of the VM system.

    For anyone starting out I highly recommend that you start with just this one change: Edit the file /etc/event.d/compcache so that it looks like this:
    Code:
    # -*- mode: shell-script; -*-
    start on stopped swaphack
    stop on runlevel [!2]
    console none
    script
    if [ -e /etc/palm/preferences/compcache_enabled ]; then
            swapoff -a
            sleep 1
            modprobe xvmalloc
    #       modprobe ramzswap memlimit_kb=98304 backing_swap=/dev/store/swap
            modprobe ramzswap disksize_kb=98304
            sleep 3
            swapon /dev/ramzswap0 -p 100
            mkswap /dev/store/swap
            swapon /dev/store/swap
    fi
    end script
    I highlighted the lines to add in green and the line in red was there before and has to go (or you can add the # at the beginning to comment it out like I did).

    Do just that and try it for a while. In my next post I'll start a discussion about compcache size.

    WARNING: If you edit the file with Internalz make sure you set the Newline Format to "Linux" and NOT Windows!!!
    Last edited by carrel; 06/08/2011 at 02:36 PM. Reason: Added Internalz usage warning.
  20. #420  
    Quote Originally Posted by carrel View Post
    Yay! I just broke 2 full days running with my config. I have run many programs including Angry Birds and much more. And my Pre- is pretty darn happy. I have not changed the config at all during this time just so I could test stability. The VM system is behaving properly, allocating swap and releasing it appropriately. And it is favoring compcache over physical swap. Quick summary: I am running 96 Meg of compcache, a separate physical swap and NO custom settings of the VM system.

    For anyone starting out I highly recommend that you start with just this one change: Edit the file /etc/event.d/compcache so that it looks like this:
    Code:
    # -*- mode: shell-script; -*-
    start on stopped swaphack
    stop on runlevel [!2]
    console none
    script
    if [ -e /etc/palm/preferences/compcache_enabled ]; then
            swapoff -a
            sleep 1
            modprobe xvmalloc
    #       modprobe ramzswap memlimit_kb=98304 backing_swap=/dev/store/swap
            modprobe ramzswap disksize_kb=98304
            sleep 3
            swapon /dev/ramzswap0 -p 100
            mkswap /dev/store/swap
            swapon /dev/store/swap
    fi
    end script
    I highlighted the lines to add in green and the line in red was there before and has to go (or you can add the # at the beginning to comment it out like I did).

    Do just that and try it for a while. In my next post I'll start a discussion about compcache size.
    Awesome work Carrel!

    I agree with you that 96mb compcache seems to be the best, and what people should just be doing right now.

    At least, anything below 96mb is no good, Im going to try 128mb and 160mb just to be adventurous,

    But, I have to admit, that today I am finding this setting in sysctl.conf very good.

    Code:
    vm.swappiness = 50
    vm.vfs_cache_pressure = 200
    vm.dirty_expire_centisecs = 18000
    vm.dirty_writeback_centisecs = 6000
    I am constantly sitting at about 16mb of swap cache at idle, and the phone is staying snappy. When I do things the swap cache goes up, but then it clears itself out pretty quickly.

    Its just a tad swappier than palms.

    (I am using 96mb compcache)

    Does anyone have a Pre Minus with the stock kernel running 1.4.5?

    Can you please run this command and give us the results:

    "sysctl -a | grep vm"

    Thanks

Posting Permissions