Page 3 of 55 FirstFirst 123456781353 ... LastLast
Results 41 to 60 of 1081
Like Tree13Likes
  1. #41  
    I will spend some more time on this tonight. T-minus 6 hours approximately.
  2.    #42  
    thanks for all your effort and time NickVTPre
  3. #43  
    Deleted this post text as it is out of date. See post #74 and beyond for the state of the art.
    Last edited by NickVTPre; 05/05/2011 at 07:10 PM.
  4. #44  
    Sorry for the delay in reply, the work takes all my free time.
    I have posted only the source code, because he is not ready for everyday use (!!), it's just a concept, which currently does not work as well as we would like. If there is a desire to test the script, I do not advise immediately place it in the UpStart, just run it in the terminal and follow the work for some time. Here is an updated code, reset the cache before cleaning the swap-file and working with all kernel governors:
    Code:
    #!/bin/sh
    limit=51200
    
    tail -f /var/log/messages \
      | awk '/Turning screen off/ { print; fflush() }' \
      | while read -r line; do
    	swap_used_space="$(swapon -s | grep store-swap | awk '{ print $4 }')"
    	if [ "$swap_used_space" -gt "$limit" ]
    	then
    		#echo "$swap_used_space is bigger than $limit"
    		sync
    		echo 3 > /proc/sys/vm/drop_caches
    		swapoff -a && swapon -p 1 /dev/mapper/store-swap
    	fi
      done
    No entries in the log script does not produce. The string "echo "$swap_used_space is bigger than $limit"" in the script commented out the hash, when removing the hash it just displays the information in the console, which is running the script.
    But with time swap even after cleaning it is filled with almost instantly to a certain level, that is why the best variant of the decision of problems with swap, IMHO - tuning of vm.* parameters using sysctl (for example, vm.swappiness). Try this only if you feel confident in their abilities =)
    Sorry for my English =)
  5. #45  
    Quote Originally Posted by Xamil View Post
    Sorry for the delay in reply, the work takes all my free time.
    I have posted only the source code, because he is not ready for everyday use (!!), it's just a concept, which currently does not work as well as we would like. If there is a desire to test the script, I do not advise immediately place it in the UpStart, just run it in the terminal and follow the work for some time. Here is an updated code, reset the cache before cleaning the swap-file and working with all kernel governors:
    Code:
    #!/bin/sh
    limit=51200
    
    tail -f /var/log/messages \
      | awk '/Turning screen off/ { print; fflush() }' \
      | while read -r line; do
    	swap_used_space="$(swapon -s | grep store-swap | awk '{ print $4 }')"
    	if [ "$swap_used_space" -gt "$limit" ]
    	then
    		#echo "$swap_used_space is bigger than $limit"
    		sync
    		echo 3 > /proc/sys/vm/drop_caches
    		swapoff -a && swapon -p 1 /dev/mapper/store-swap
    	fi
      done
    No entries in the log script does not produce. The string "echo "$swap_used_space is bigger than $limit"" in the script commented out the hash, when removing the hash it just displays the information in the console, which is running the script.
    But with time swap even after cleaning it is filled with almost instantly to a certain level, that is why the best variant of the decision of problems with swap, IMHO - tuning of vm.* parameters using sysctl (for example, vm.swappiness). Try this only if you feel confident in their abilities =)
    Thanks for your response Xamil. As i've said i am good at writing instructions, but know almost nothing about coding (yet). I've added your revised script to a .zip file and attached it to this post.

    I understand that the "echo" command doesn't echo to the /var/log/messages, but if the swapcleanup.sh is run on upstart where does it echo? Are those "echo"s only useful if it's run from the command line?

    When i was playing around with this last night i found that if i launch the swapcleanup.sh in a terminal window it will continue to run if i leave that card open. That seems like a workable solution, though not as convenient as having it automatically execute on upstart.

    If you have any suggestions on how to improve this further, or how to test whether this is working or not, and why, please let me know and i'll try to do so.

    UPdate: removed the file because this method is out of date. See post #74 and beyond for the state of the art.
    Last edited by NickVTPre; 05/05/2011 at 07:22 PM.
  6. #46  
    thanks everyone for working on this. cant wait for a finished project. this will be amazing for those of us with a pre-.
  7. #47  
    Quote Originally Posted by graffix31 View Post
    thanks everyone for working on this. cant wait for a finished project. this will be amazing for those of us with a pre-.
    If you can help test that would be useful.

    You could run the swapcleanup.sh from sdl terminal and leave that card open and report how well that works. Seems a good starting point.
  8. #48  
    I have been following this thread closely. Launch day sprint pre minus, webos 2.1.0. I do have a question, do you all think that this will help the phone run faster and less buggy? (I know that is the point, just curious to see if you have results yet to see if it works/helps)

    Thanks for all your work!
  9. lupos's Avatar
    Posts
    276 Posts
    Global Posts
    289 Global Posts
    #49  
    Im very interested in this. My launch day pre- is in serious need of a hand. I'd be happy to test but I cant get terminal working. Isn't there a terminal tool in wosqi? Would that work?
  10. #50  
    the terminal will not load from preware. download it from the post and install, it works perfect. sdl terminal
  11. #51  
    Quote Originally Posted by jkreisberg22 View Post
    I have been following this thread closely. Launch day sprint pre minus, webos 2.1.0. I do have a question, do you all think that this will help the phone run faster and less buggy? (I know that is the point, just curious to see if you have results yet to see if it works/helps)

    Thanks for all your work!
    Are you overclocking? if not, stop what you're doing and overclock to at least 800 with Uberkernel.

    This will not solve the software issues that exist with 2.1, or the lack of memory on the Pre-, but it may help your phone from "thrashing around" when it tries to dump ram to the compressed swap.
  12. #52  
    @NickVTPre: overclocked??? (kidding), UK 1G/500mhz
  13. #53  
    Testing with:
    F102B Delta Dagger 2.1.0-37 with default Governor ScreenState2 500/800MHz
    swapcleanup and swapcleanup.sh version 4-29-11.
    If you can't see the screencapture:
    1) A lot of apps running
    2) free -tm: Used Mem/Swap: 236/60
    3) run swapcleanup.sh
    4) turn off screen, wait a second or two. Turn it back on with results:
    Code:
    sh: bad number
    swapcleanup.sh: line 17: echo is less than 51200: not found
    
    Broadcast message from root (Fri Apr 29 18:29:36 2011): 
    
    powerd: System going to sleep now
    
    Broadcast message from root (Fri Apr 29 18:29:52 2011): 
    
    powerd: System woke up
    5) ctrl-c and free -tm: Used Mem/Swap: 236/82

    I include a second screenshot of other try with similar results:
    Used Mem/Swap: 236/103
    ...
    swapcleanup.sh: line 17: echo is less than 51200: not found
    ...
    Used Mem/Swap: 223/91
    Attached Images Attached Images
    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)
  14. #54  
    ok i was about to test this but i guess it doesnt work
  15.    #55  
    finally have time to test this and I see Cptox's post. Is there any benefit to me testing or should I just wait? Hmmm gonna go get some dinner and will check back in, if I haven't seen anything I might try it just to see
  16. #56  
    Not really going to spend any time on this tonight. Frankly since this isn't an issue for my device i don't have a lot of motivation to continue. Running the .sh file from my CLI worked fine on my device, but as i've said i have no swap.

    I would recommend that folks experiment with the code that Xamil posted. copy/paste it into a .sh file and put it on your device, run it from SDL Terminal, and see if it clears the swap for you. If it does you should be able to leave the terminal card open and whenever you turn off the screen it will clear your swap if it's hit the limit.

    I think the real problem is the fact that the Pre- is not really up to the task of running 2.1... sorry to say that, but 256mb ram is pretty lean.

    Folks should continue to test and report results here. But post detailed reports so that others can help, as CptOx did.

    I'll check in tomorrow and see if anyone's had luck/failure.

    Update: Just for folks information, the code above basically just waits until you've turned off the screen, then checks if your swap is larger than the limit, and if so runs this code: "swapoff -a && swapon -p 1 /dev/mapper/store-swap", which can also be run from the CLI, and it should clear your swap.
  17. #57  
    First I have to thank NickVTPre time so generously devoted to us. You think of how many people who know spend as much time to complete strangers without receiving anything in return.

    May be the method proposed by NickVTPre to split testing is better to find the problem.
    In my case I can say that the code:
    swapoff -a && swapon -p 1 /dev/mapper/store-swap
    is working for me.

    In the screencapture:
    1) free -tm reports used Mem/Swap: 233 / 55
    2) run "swapoff -a && swapon -p 1 /dev/mapper/store-swap"
    3) The Terminal waits at least 10 seconds. May be the 3 games working at once is too much for my Pre-.
    The command ends with:
    swapon: /dev/mapper/store-swap: Invalid argument
    4) But free -tm reports used Mem/Swap: 236 / 0 !
    The command clears my swap memory!

    Update: Although it also has a side effect, it seems that "swapoff..." command disables the memory swap. Although I start many applications "free-tm" command always shows 0 for the memory swap. I checked in Govnah and even turn it off and turn back on Advanced Settings, the swap remains at 0.
    After a Luna restart swap memory is enabled.
    Attached Images Attached Images
    Last edited by CptOx; 04/30/2011 at 03:09 AM.
    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)
  18. #58  
    OK, with CptOx's feedback i have a suggestion:
    - first run "swapon -s". This lists the swap spaces that are on. It should say something like /dev/mapper/store-swap with size/used/priority. write down the path, and priority of all swaps (i think there will only be one).
    - run "swapoff -a". This turns off all swap spaces.
    - run "swapon -v -p 1 /dev/mapper/store-swap" which turns on the /dev/mapper/store-swap with priority 1.
    - run "swapon -s". Results should be similar to the first run of "swapon -s". If the swap had been full, it should now be 0.
  19. #59  
    Xanadu73 is our benefactor, and did a bit of work on the code which Xamil wrote. See his post here: http://forums.precentral.net/showthr...=1#post2950329.

    This may get the upstart version of this working. First step will be to test the new .sh file, then if that works to get it working on upstart. I'll add those files on this post in a few minutes.

    Update: OK. I attached the .zip with the updated .sh file, and the same swapcleanup upstart file. My advice is to download the new .sh file and put it somewhere on your device, run it from SDL terminal and see if it works with the terminal window open (the echo commands are commented out, so you'll need to use free -tm to see what your swap status is). If it works, the next step will be to try getting the upstart to work. Report your results!

    Update 2: removed the file because this method is outdated. See post #74 and beyond for the state of the art.
    Last edited by NickVTPre; 05/05/2011 at 07:23 PM.
  20. snpalavan's Avatar
    Posts
    71 Posts
    Global Posts
    72 Global Posts
    #60  
    verified .sh file works, not sure about the upstart yet though

    And as far as swap size, it didn't go down to zero, just went much lower. My reasoning for this is that as soon as the swap is cleaned, the pre fills it up as much as needed soon after.
Page 3 of 55 FirstFirst 123456781353 ... LastLast

Posting Permissions