Page 1 of 2 12 LastLast
Results 1 to 20 of 30
  1.    #1  
    ~~~
    Download FreeMemory.sh Put it in /var/home/root/
    FreeMemory.sh
    use Terminus to run: sh /var/home/root/FreeMemory.sh
    ~~~

    The script was created by me and can be freely modified if you so choose.

    I found the commands in the script on LinuxInsight and have been using it without issues and great success for a month now and figured it would be good for everyone to use that gets the TMC error all to often. When run with the last line of code un-commented (no #) I gain approximately 30Mb of memory that is then reallocated slowly to currently open/running operations. When run with line 2 uncommented and line 4 commented I only gain about 6Mb & for line 3 approximately 18Mb. So of course my suggestion is line 4 for the maximum memory gain.
    Last edited by demetry14; 09/08/2010 at 01:32 AM.
    16 Candles, The Breakfast Club SB, Friday SB, App Catalog Fix, Palm Pre/Pixi - USB Modem, TMC Workaround, SCRIM Changing OTF

    The fastest way to install Preware on your WebOS device.
    Put your device in Developer mode.
    From your PC download the Preware installer from http://get.preware.org
    Run the Preware installer while the WebOS device is connected with the USB cable to your PC.
    Vualla Preware is installed.]
  2. GTMI1's Avatar
    Posts
    40 Posts
    Global Posts
    41 Global Posts
    #2  
    Nice Job! I just tried it with over 20 apps open. (On a Sprint Pre) It worked fine. Before it would've given me the TMC.
  3. #3  
    have you run this in conjuction with one of the Kernels?
  4. #4  
    Question... Would this script only have to be run once? Or would it have to be run every time my Pre is rebooted? Reason I'm asking, I use PresetReset every night, so, if this has to run at each reboot, then that would be a pretty big PITA for me.
  5. #5  
    Here is the specific link:

    drop_caches | LinuxInsight

    You could also set this up as a cronjob to run in intervals. We also need to see how this is handled with compcache.


    If I helped you or you have downloaded one of my files,
    then least you could do is click the "Thanks" button.
  6. #6  
    Quote Originally Posted by Rwhitby
    So running a command which clears these caches has absolutely no effect on the amount of memory available for loading apps.
    Taken from: http://forums.precentral.net/webos-i...ml#post2521460 when talking about the command

    There is also the idea that the cache it clears could also be native apps which would cause the apps to take longer to load.


    If I helped you or you have downloaded one of my files,
    then least you could do is click the "Thanks" button.
  7.    #7  
    Quote Originally Posted by mamouton View Post
    have you run this in conjuction with one of the Kernels?
    I have UberKernel and use it while clocked at any speed. Never had an issue as it is a kernel incorporated command. The only way i see this not working is if the kernel Dev's took out the functionality.
    16 Candles, The Breakfast Club SB, Friday SB, App Catalog Fix, Palm Pre/Pixi - USB Modem, TMC Workaround, SCRIM Changing OTF

    The fastest way to install Preware on your WebOS device.
    Put your device in Developer mode.
    From your PC download the Preware installer from http://get.preware.org
    Run the Preware installer while the WebOS device is connected with the USB cable to your PC.
    Vualla Preware is installed.]
  8.    #8  
    Quote Originally Posted by prolongexistence View Post
    Question... Would this script only have to be run once? Or would it have to be run every time my Pre is rebooted? Reason I'm asking, I use PresetReset every night, so, if this has to run at each reboot, then that would be a pretty big PITA for me.
    You will have to run this every time your Pre feels laggy as it is an instant recovery and does not run in any kind of background.
    16 Candles, The Breakfast Club SB, Friday SB, App Catalog Fix, Palm Pre/Pixi - USB Modem, TMC Workaround, SCRIM Changing OTF

    The fastest way to install Preware on your WebOS device.
    Put your device in Developer mode.
    From your PC download the Preware installer from http://get.preware.org
    Run the Preware installer while the WebOS device is connected with the USB cable to your PC.
    Vualla Preware is installed.]
  9.    #9  
    Quote Originally Posted by Abyssul View Post
    Here is the specific link:

    drop_caches | LinuxInsight

    You could also set this up as a cronjob to run in intervals. We also need to see how this is handled with compcache.

    I use UberKernel with compcache enabled. Works fine for me. if you have a different outcome please let me know.
    16 Candles, The Breakfast Club SB, Friday SB, App Catalog Fix, Palm Pre/Pixi - USB Modem, TMC Workaround, SCRIM Changing OTF

    The fastest way to install Preware on your WebOS device.
    Put your device in Developer mode.
    From your PC download the Preware installer from http://get.preware.org
    Run the Preware installer while the WebOS device is connected with the USB cable to your PC.
    Vualla Preware is installed.]
  10.    #10  
    Quote Originally Posted by Abyssul View Post
    Taken from: http://forums.precentral.net/webos-i...ml#post2521460 when talking about the command

    There is also the idea that the cache it clears could also be native apps which would cause the apps to take longer to load.
    I have noticed that all app's take just as long to load as they do after a reboot, this is due to the memory being free'd for the current operations.

    I personally don't have an issue with this as I run at 800MHz and have the cron for it running every hour on the hour just to see how it handles after some time. "I am currently doing this to see if I have any side effects like irritatingly slow or still get a TMC, but everything has been fine for me".
    16 Candles, The Breakfast Club SB, Friday SB, App Catalog Fix, Palm Pre/Pixi - USB Modem, TMC Workaround, SCRIM Changing OTF

    The fastest way to install Preware on your WebOS device.
    Put your device in Developer mode.
    From your PC download the Preware installer from http://get.preware.org
    Run the Preware installer while the WebOS device is connected with the USB cable to your PC.
    Vualla Preware is installed.]
  11.    #11  
    If you have anymore questions, let me know. If your currently using this as needed or have a cron job setup give everyone feedback so they know what your cron job looks like and what your experience is.
    16 Candles, The Breakfast Club SB, Friday SB, App Catalog Fix, Palm Pre/Pixi - USB Modem, TMC Workaround, SCRIM Changing OTF

    The fastest way to install Preware on your WebOS device.
    Put your device in Developer mode.
    From your PC download the Preware installer from http://get.preware.org
    Run the Preware installer while the WebOS device is connected with the USB cable to your PC.
    Vualla Preware is installed.]
  12. #12  
    is there anyway to implement this as a patch that auto runs this every couple of hours?
  13.    #13  
    Quote Originally Posted by Garage91 View Post
    is there anyway to implement this as a patch that auto runs this every couple of hours?
    This can be done by using crontab as I stated I have this script running every hour on the hour via a cron job. As for making an ipk or patch i have no knowledge of the WebOS system, just the underlying linux. So if anyone can help out an package this up in an ipk or patch that would be great.
    16 Candles, The Breakfast Club SB, Friday SB, App Catalog Fix, Palm Pre/Pixi - USB Modem, TMC Workaround, SCRIM Changing OTF

    The fastest way to install Preware on your WebOS device.
    Put your device in Developer mode.
    From your PC download the Preware installer from http://get.preware.org
    Run the Preware installer while the WebOS device is connected with the USB cable to your PC.
    Vualla Preware is installed.]
  14. #14  
    Great script - thanks!
  15. #15  
    Would anyone care to explain how to set this up as a cron job? I'm not real familiar with linux commands, but I'm not a computer ***** either.
  16.    #16  
    Google "Man Crontab" for the Man Pages on Crontab w/o ""
    crontab -e
    add your runtime & what to run "* * * * * SCRIPT TO RUN" minus the ""

    SAMPLE:
    15 * * * * ./var/home/root/FreeMemory.sh >/dev/null 2>&1
    My FreeMemory.sh is symlinked from /media/internal/Scripts/ for easy editing from the zUSB partition when mounted.
    Last edited by demetry14; 07/11/2010 at 01:51 AM.
    16 Candles, The Breakfast Club SB, Friday SB, App Catalog Fix, Palm Pre/Pixi - USB Modem, TMC Workaround, SCRIM Changing OTF

    The fastest way to install Preware on your WebOS device.
    Put your device in Developer mode.
    From your PC download the Preware installer from http://get.preware.org
    Run the Preware installer while the WebOS device is connected with the USB cable to your PC.
    Vualla Preware is installed.]
  17. #17  
    It's been a while since I used Linux frequently, but I think I remember a discussion once about how Linux appears to "use" more memory than Windows. But the philosophy behind Linux seems to be that the memory is there to be used, so it caches more things for later use to speed everything up, while requests for new memory will automatically throw out older cached data if it's not being used.

    Maybe webOS is not using the Linux memory properly (I think perhaps pure SDK apps run under the UI which appears as one single Linux app), but shouldn't the cached memory be easily freed for new (PDK) apps that need it? If I recall correctly, the Ubuntu standard memory graph shows different levels of memory use--one for currently open apps, one for cached data, and another for something else I can't remember, and the point was that all (or a large fraction) of the memory was being used, but only the currently in-use memory was unavailable for new applications.

    Again, I don't necessarily know what I'm talking about, so feel free to school me.
    Palm III-->Handspring Visor-->Sony Clie PEG-NR70-->no PDA -->Palm Treo 755p-->Palm Pre-->HP Veer
  18. tcurtin's Avatar
    Posts
    150 Posts
    Global Posts
    151 Global Posts
    #18  
    This is a cool tip! One question for ya:
    Do the contents of /proc/sys/vm/drop_caches ever switch back from 3 to 0? Or are you just rewriting a three to that file over and over (without actually changing anything)? I think from the description that setting it once should be enough. I changed it on my Pre and it hadn't switched back after ten minutes...
  19. #19  
    Quote Originally Posted by jbg7474 View Post
    It's been a while since I used Linux frequently, but I think I remember a discussion once about how Linux appears to "use" more memory than Windows. But the philosophy behind Linux seems to be that the memory is there to be used, so it caches more things for later use to speed everything up, while requests for new memory will automatically throw out older cached data if it's not being used.

    Maybe webOS is not using the Linux memory properly (I think perhaps pure SDK apps run under the UI which appears as one single Linux app), but shouldn't the cached memory be easily freed for new (PDK) apps that need it? If I recall correctly, the Ubuntu standard memory graph shows different levels of memory use--one for currently open apps, one for cached data, and another for something else I can't remember, and the point was that all (or a large fraction) of the memory was being used, but only the currently in-use memory was unavailable for new applications.

    Again, I don't necessarily know what I'm talking about, so feel free to school me.
    You are correct, Linux does grab extra memory and use it for cache. The phone has swap on flash and is supposed to maintain a certain amount of free RAM by performing occasional flushes and swapping out resident memory that isn't active (dirty pages).

    Each WebOS app has a memory requirement programmed into it. When the app is launched, Luna checks the value for the app. If there isn't enough free RAM it gives you the TMC error.

    Demetry's script appears to tell the kernel to clear the system cache which on my phone is currently about 45MB.

    It might make more sense to just use compcache and flush to swap more often. I believe that's what unixpsycho's F10x kernels do. I don't get the TMC error with the f105 kernel and I can overclock to 1GHz.

    In the /proc/sys/vm folder there are a bunch of other files you can tweak to change memory handling:

    dirty_ratio
    lowmem_reserve_ratio
    min_free_kbytes
    overcommit_memory
    overcommit_ratio
    swappiness
    vfs_cache_pressure
  20.    #20  
    Quote Originally Posted by tcurtin View Post
    This is a cool tip! One question for ya:
    Do the contents of /proc/sys/vm/drop_caches ever switch back from 3 to 0? Or are you just rewriting a three to that file over and over (without actually changing anything)? I think from the description that setting it once should be enough. I changed it on my Pre and it hadn't switched back after ten minutes...
    The file is rewritten and you are changing a current state to 3 everytime your run it.

    If you make the file system rw you could then make the file read a perm 3 but I do not know if this will work as I have not tried nor will I.
    16 Candles, The Breakfast Club SB, Friday SB, App Catalog Fix, Palm Pre/Pixi - USB Modem, TMC Workaround, SCRIM Changing OTF

    The fastest way to install Preware on your WebOS device.
    Put your device in Developer mode.
    From your PC download the Preware installer from http://get.preware.org
    Run the Preware installer while the WebOS device is connected with the USB cable to your PC.
    Vualla Preware is installed.]
Page 1 of 2 12 LastLast

Posting Permissions