Page 17 of 55 FirstFirst ... 7121314151617181920212227 ... LastLast
Results 321 to 340 of 1081
Like Tree13Likes
  1. #321  
    Quote Originally Posted by Unclevanya View Post
    I was unable to verify that webOS uses a page-size of 4KB due to the fact that the getconf command suggested by several sources doesn't seem to be included in the default shell and I didn't feel like digging around for another means of verification.

    I ran into the same thing. I even went through 'Psycho's .config and grep'ed the arch/arm tree of the kernel source. I don't see an actual "default" being set (though I'm no developer...). I do see one of the options in the source being set to 4k, and I found a post on LKML from a higher up kernel hacker (who's name escapes me at the moment) that arm is locked at 4k. That was from late 2010. Linux 2.6.24 is quite a lot older than that. Still, I think it's fairly safe to assume a default of 4k page size.


    M.
  2. #322  
    These latest sysctrl settings seem too aggressive.

    My swap is constantly at 0. I think this is too much, as its relying too heavily on RAM, which is not plentiful on the Pre-

    I'm going to try the settings with compcache disabled though, just to see how that works, considering its putting nothing in it anyways.
  3. #323  
    What newest settings are you talking about. There are a lot being thrown around now.

    -- Sent from my Palm Pre using Forums
  4. #324  
    Quote Originally Posted by rmausser View Post
    These latest sysctrl settings seem too aggressive. Ĥ

    My swap is constantly at 0. I think this is too much, as its relying too heavily on RAM, which is not plentiful on the Pre-

    I'm going to try the settings with compcache disabled though, just to see how that works, considering its putting nothing in it anyways.

    I've never seen that. Verify your swap even got initialized. "free -tm"

    M.
  5. #325  
    hmm maybe it didnt. Its hanging around 30mb now. (after reboot) With no compcache my phone is flying. Lets see if this lasts a day.
  6. #326  
    no compcache is no go. PDK games hang and stutter like crazy.

    Hmm...is there any way to give RAM priority to the UI? I dont mind if things are slow, I just hate when the whole OS is unresponsive.

    I'd like to be able to give priority to the UI so that even if an app locks up, you can still swipe it away or whatever.
  7. #327  
    So last night my pre- finally filled up all its swap and ram. Lets just say things were horrible. Nothing worked and battery pull was required. We have done an amazing job at avoiding swap as much as possible. However once stuff dumps into swap it just sits there. It seems like the vm stuff helps with memory but nothing really apply's to swap. Yeah it will drop 3 -4 mbs every now and then but when we dump 20mb into it when we open a a game or a ton of apps its not good enough. The only true way to ensure a clear swap is to turn it off and on again. however doing that manually sucks and doing by reading the total remaining or in use and just turning off and on could really suck if we are doing something. So I propose we try something. I'm trying to work on script that looks at the swap usage every x mins and then if its at a high point aka 50 mb out of 128 then look at the cpu / system load. if the load is blow a threshold we echo 3 > /proc/sys/vm/drop_caches and then swapoff /dev/ramzswap and swapon /dev/ramzswap. what does that do. The 3 drops everything not in use either to disk or swap. then we wipe out the swap. I figure setting the check value low ensures that it doesnt take long to clear and if the cpu load is high then we still have a good safe buffer of swap available until the phone is good again.

    I found this script to check for cpu load in percentage but I cant get it to work on the pre- i get errors that Im not sure how to solve. still learning. But if you know what your doing then feel free to drop it on /media/internal and run it. all it does is loop through every second and display the cpu utilization in %. I figure we can use some of this code and make the magic happen.

    Code:
    #!/bin/bash
    # by Paul Colby (http://colby.id.au), no rights reserved ;)
    
    PREV_TOTAL=0
    PREV_IDLE=0
    
    while true; do
      CPU=('cat /proc/stat | grep '^cpu '') # Get the total CPU statistics.
      unset CPU[0]                          # Discard the "cpu" prefix.
      IDLE=${CPU[4]}                        # Get the idle CPU time.
    
      # Calculate the total CPU time.
      TOTAL=0
      for VALUE in "${CPU[@]}"; do
        let "TOTAL=$TOTAL + $VALUE"
      done
    
      # Calculate the CPU usage since we last checked.
      let "DIFF_IDLE=$IDLE-$PREV_IDLE"
      let "DIFF_TOTAL=$TOTAL-$PREV_TOTAL"
      let "DIFF_USAGE=(1000*($DIFF_TOTAL-$DIFF_IDLE)/$DIFF_TOTAL+5)/10"
      echo -en "\rCPU: $DIFF_USAGE%  \b\b"
    
      # Remember the total and idle CPU times for the next check.
      PREV_TOTAL="$TOTAL"
      PREV_IDLE="$IDLE"
    
      # Wait before checking again.
      sleep 1
     done
    to run type bash what_ever_you_saved_as

    the errors I get are:

    cpu_usage: line 15: let: TOTAL=0 + : syntax error: operand expected (error token is " ")
    cpu_usage: line 21: let: DIFF_USAGE=(1000*(0-0)/0+5)/10: division by 0 (error token is "+5)/10")


    I figure 21 is because nothing happened on line 15.
    Sprint pre -> Motorola Photon 4G
  8. #328  
    Quote Originally Posted by theXfactor2011 View Post
    Code:
    #!/bin/bash
    # by Paul Colby (http://colby.id.au), no rights reserved ;)
    
    PREV_TOTAL=0
    PREV_IDLE=0
    
    while true; do
      CPU=('cat /proc/stat | grep '^cpu '') # Get the total CPU statistics.
      unset CPU[0]                          # Discard the "cpu" prefix.
      IDLE=${CPU[4]}                        # Get the idle CPU time.
    
      # Calculate the total CPU time.
      TOTAL=0
      for VALUE in "${CPU[@]}"; do
        let "TOTAL=$TOTAL + $VALUE"
      done
    
      # Calculate the CPU usage since we last checked.
      let "DIFF_IDLE=$IDLE-$PREV_IDLE"
      let "DIFF_TOTAL=$TOTAL-$PREV_TOTAL"
      let "DIFF_USAGE=(1000*($DIFF_TOTAL-$DIFF_IDLE)/$DIFF_TOTAL+5)/10"
      echo -en "\rCPU: $DIFF_USAGE%  \b\b"
    
      # Remember the total and idle CPU times for the next check.
      PREV_TOTAL="$TOTAL"
      PREV_IDLE="$IDLE"
    
      # Wait before checking again.
      sleep 1
     done
    to run type bash what_ever_you_saved_as

    the errors I get are:

    cpu_usage: line 15: let: TOTAL=0 + : syntax error: operand expected (error token is " ")
    cpu_usage: line 21: let: DIFF_USAGE=(1000*(0-0)/0+5)/10: division by 0 (error token is "+5)/10")


    I figure 21 is because nothing happened on line 15.

    Fist things first, the webOS's shell is not bash, it's ash. That first line should be changed to:

    #!/bin/sh

    I'm playing with the rest of it.

    M.
  9. #329  
    A week ago from this post:
    Quote Originally Posted by CptOx View Post
    After disabling all methods for a week and undergo several freeze ups, I have begun to use both methods theXfactor2011 mentioned in previous post. In some days I hope I will report some improvement as it seems initially.

    As some users are claiming what methods are being tested, I'm going to do the same now. I am using both methods at once:

    1) Swappiness (modifying /etc/event.d/LunaSysMgr and creating /etc/sysctl.conf). Post #74 of Xanadu73 in 05/02/2011, 10:53 PM (using the step-by-step instructions and files from Post #110 of NickVTPre in 05/06/2011, 05:56 AM).

    2) Softswap (install script creating /var/palm/event.d/SoftSwapEvent and enabling softswap). Post #234 of theXfactor2011 in 05/14/2011, 02:34 AM.
    Slowly, after three days all swap full and Pre- stuck. After that, disabling Method 2) Softswap but only with Method 1) Swappiness but stoppages appears. Also disabled Method 1).
    And as Sconix won't add support for executing commands in MS service the simple solution of run a set of commands to clearing swap memory with Mode Switcher is gone. I am officially lost now .
    Spanish translator of Outline Tracker, UberCalendar, sconix's advanced patches, and other MIA webOS apps. HP Pre 3 and HP TouchPad 64 GB (Espaņol_Espaņa, es_es)
  10. #330  
    Quote Originally Posted by CptOx View Post
    A week ago from this post:

    Slowly, after three days all swap full and Pre- stuck. After that, disabling Method 2) Softswap but only with Method 1) Swappiness but stoppages appears. Also disabled Method 1).
    And as Sconix won't add support for executing commands in MS service the simple solution of run a set of commands to clearing swap memory with Mode Switcher is gone. I am officially lost now .
    Since we are still in very early testing to see what works its all scripts and commands. Im sure after we figure out what works and what doesnt we can find a way to make it very easy for everyone.
    Sprint pre -> Motorola Photon 4G
  11. #331  
    Quote Originally Posted by Xanadu73 View Post
    Fist things first, the webOS's shell is not bash, it's ash. That first line should be changed to:

    #!/bin/sh

    I'm playing with the rest of it.

    M.
    I got the script working if I run it with bash. I think i installed it from the opt feed for the hell of it once before. I am now trying to get it to work with sh. Here are my updates for bash.

    Code:
    #!/bin/sh
    # by Paul Colby (http://colby.id.au), no rights reserved
    
    PREV_TOTAL=0
    PREV_IDLE=0
    
    while true; do
      CPU=(`cat /proc/stat | grep '^cpu '`) # Get the total CPU statistics.
      unset CPU[0]                          # Discard the "cpu" prefix.
      IDLE=${CPU[4]}                        # Get the idle CPU time.
    
      # Calculate the total CPU time.
      TOTAL=0
      for VALUE in "${CPU[@]}"; do
        let "TOTAL=$TOTAL+$VALUE"
      done
    
      # Calculate the CPU usage since we last checked.
      let "DIFF_IDLE=$IDLE-$PREV_IDLE"
      let "DIFF_TOTAL=$TOTAL-$PREV_TOTAL"
      let "DIFF_USAGE=(1000*($DIFF_TOTAL-$DIFF_IDLE)/$DIFF_TOTAL+5)/10"
      echo -en "\rCPU: $DIFF_USAGE%  \b\b"
    
      # Remember the total and idle CPU times for the next check.
      PREV_TOTAL="$TOTAL"
      PREV_IDLE="$IDLE"
    
      # Wait before checking again.
      sleep 1
     done
    of course if I run this with sh I get the following error:

    cpu_usage: line 8: syntax error: unexpected "(" (expecting "done")

    I believe that is because line 8 isnt wrapped in "" but if I do that then I get
    cpu_usage: line 10: syntax error: bad substitution

    most likely because the CPU array isnt correct
    Sprint pre -> Motorola Photon 4G
  12. #332  
    This looks sweet. Let me know if you need to test something.


    -- Sent from my Palm Pre using Forums
  13. #333  
    I am personally having good success right now with these settings:

    (Lunasysmanager hack on post 74 is applied)

    vm.swappiness = 90
    vm.vfs_cache_pressure = 200
    vm.dirty_expire_centisecs = 120000
    vm.dirty_writeback_centisecs = 60000
    vm.page-cluster = 5

    Compcache= 131270 (128MB) WITH disk swap.

    Why this setting?

    Well, I thought about it, and I am assuming that compcache is looked at as swap by the phone. But, its actually ram, thats compressed.

    So, I thought, what way can I increase the amount of ram? Well, why not treat compcache as RAM, by increasing swappiness, and so that we have a lot more, but slower RAM, and a separate swap on the disk for background tasks. Rather than limit how much swap is used, increase the swap size to a huge amount with compcache and use that as RAM by telling the kernel to use swap a lot.

    This way, my hope is the RAM is organised like this.

    Speed

    Fast [ Very few uncompressed RAM MB's for most important app (one being used) ]

    Slower [ 128MB of compressed RAM for less important tasks (other open apps) ]

    Slowest [ 100MB of disk swap for background tasks and services ]

    So that is my hope at least. Its working well so far.

    *EDIT*

    Now I am trying it with 96MB of compcache instead. Seems to work even better... hmm.
    Last edited by rmausser; 05/25/2011 at 01:21 AM.
  14. #334  
    Quote Originally Posted by rmausser View Post
    vm.swappiness = 90
    vm.vfs_cache_pressure = 200
    vm.dirty_expire_centisecs = 120000
    vm.dirty_writeback_centisecs = 60000
    vm.page-cluster = 5

    Compcache= 131270 (128MB) WITH disk swap.

    Just a note, if you didn't already know:

    Quote Originally Posted by /usr/src/linux/Documentation/sysctl/vm.txt

    swappiness

    This control is used to define how aggressive the kernel will swap memory pages. Higher values will increase aggressiveness, lower values decrease the amount of swap.

    The default value is 60.

    So putting that on 90 is telling the kernel to prefer to swap much more than it normally would.


    M.
  15. #335  
    Quote Originally Posted by theXfactor2011 View Post
    I got the script working if I run it with bash. Of course if I run this with sh I get the following error:

    cpu_usage: line 8: syntax error: unexpected "(" (expecting "done")

    I believe that is because line 8 isn't wrapped in "" but if I do that then I get
    cpu_usage: line 10: syntax error: bad substitution

    most likely because the CPU array isn't correct

    Do keep in mind also that bash and ash are two very different beasts. I have a couple scripts that I use on webOS that had to go through a few major changes to run in ash after having been written in bash. Mostly ash didn't support sine fancier things that bash does. There's the good chance that ash doesn't support arrays and that it would require some major awk'ing to work around that.

    Also, just as a side-note, the "#!/bin/sh" is NOT ash specific. /bin/sh is a symlink to your shell's executable. It's just a "good practice" thing to use that instead of specifying the shell directly (#!/bin/bash, #!/bin/ash, #!/bin/zsh, etc.). It's a bit more portable that way.


    M.
  16. #336  
    Quote Originally Posted by Xanadu73 View Post
    Just a note, if you didn't already know:




    So putting that on 90 is telling the kernel to prefer to swap much more than it normally would.


    M.
    yes I know, and by doing so its keeping the RAM much cleaner and thus there is more RAM to run tasks with and the phone is a lot faster.

    Since I have 196mb of swap (100 on disk and 96mb from compcache) the swap never gets full to the point of locking the phone.
  17. #337  
    Quote Originally Posted by rmausser View Post
    yes I know, and by doing so its keeping the RAM much cleaner and thus there is more RAM to run tasks with and the phone is a lot faster.

    Since I have 196mb of swap (100 on disk and 96mb from compcache) the swap never gets full to the point of locking the phone.

    I can follow the logic. The really good test to run is to call your voice mail (you can see with JSTop that the Phone app, once used, grabs a LOT of memory and hangs onto it indefinitely even after close), then open and close a couple large games (all the free versions of all the Angry Birds works fine), and browse the web for a bit. I can usually kill the phone after just a couple games. I'd recomend to also use Ampache Mobile for a while (caches songs to RAM), but that requires a lot more back-end work then you may be able to setup somewhere.


    M.
  18. #338  
    let us know the result. hoping we are getting somewhere
  19. #339  
    Also for those that are playing along, you are able to WATCH what the VM System is doing which is a huge help, and this is why I cobbled this together:

    Code:
    #!/bin/sh
    
    vmstat -S K 5 | awk '{print $3,"\t",$4,"\t",$5,"\t",$6,"\t",$7,"\t",$8}'
    That's it. It's just WAY too long of a command line to type all the time.

    It looks like this:

    Code:
    root@My Pre:/# prevmstat 
    ---swap--        -----io----     -system--       ----cpu----             
    swpd     free    buff    cache   si      so
    7932     5904    1472    54024   1       1
    7932     5904    1480    54024   0       0
    7932     5904    1488    54024   0       0
    7932     5904    1488    54024   0       0
    You'll have to ignore that first line with all the dashes. I've tried various ways to cut it out, but, nothing works yet. The rest of the output fits perfectly on our screens for use with "SDL Terminal". The output updates itself every 5 seconds.

    The first four columns are pretty self-explanatory, but 5 and 6 require a bit of typing:

    si = pages swapped back INTO RAM from Swap.
    so = pages swapped OUT TO Swap.

    The memory numbers are in K. Good stuff to watch while stress testing! (and having another PDK app open at the same time of testing is extra stress as well!)


    M.
  20. #340  
    Quote Originally Posted by rmausser View Post
    I am personally having good success right now with these settings:

    (Lunasysmanager hack on post 74 is applied)

    vm.swappiness = 90
    vm.vfs_cache_pressure = 200
    vm.dirty_expire_centisecs = 120000
    vm.dirty_writeback_centisecs = 60000
    vm.page-cluster = 5

    Compcache= 131270 (128MB) WITH disk swap.

    Why this setting?

    Well, I thought about it, and I am assuming that compcache is looked at as swap by the phone. But, its actually ram, thats compressed.

    So, I thought, what way can I increase the amount of ram? Well, why not treat compcache as RAM, by increasing swappiness, and so that we have a lot more, but slower RAM, and a separate swap on the disk for background tasks. Rather than limit how much swap is used, increase the swap size to a huge amount with compcache and use that as RAM by telling the kernel to use swap a lot.

    This way, my hope is the RAM is organised like this.

    Speed

    Fast [ Very few uncompressed RAM MB's for most important app (one being used) ]

    Slower [ 128MB of compressed RAM for less important tasks (other open apps) ]

    Slowest [ 100MB of disk swap for background tasks and services ]

    So that is my hope at least. Its working well so far.

    *EDIT*

    Now I am trying it with 96MB of compcache instead. Seems to work even better... hmm.
    Are you still having success with these settings?


    -- Sent from my Palm Pre using Forums

Posting Permissions