Page 1 of 12 12345611 ... LastLast
Results 1 to 20 of 221
  1. diomark's Avatar
    Posts
    752 Posts
    Global Posts
    770 Global Posts
       #1  
    EDIT - This patch is *not* needed with 1.3.5.

    I've been struggling with the "too many cards" error, especially because all it takes for me to get into that situation is drPodder streaming a high quality mp3 file (and maybe one or two other apps open)

    It looks like the LunaSysMgr uses the /etc/palm/luna.conf parameters for memory tweaking -

    Code:
    [Memory]
    MaxApplicationMemory=10MB
    # In MB. -1 to disable
    LowMemoryThreshold=-1
    # In MB. -1 to disable
    CriticalMemoryThreshold=-1
    FreeMemoryThreshold=16
    FreeSwapThreshold=64
    SwapRateThreshold=200
    CardLimit=-1
    EnableMemoryTracking=true
    UseMemchute=true
    AppsToAllowInLowMemory=com.palm.app.phone;com.palm.app.contacts;com.palm.app.messaging
    So it's basically looking at swap and free memory to see if it's able to startup a new app or not. Problem is, there's two partitions mapped during startup from RAM, which are basically swapped on a busy system. If we look at /etc/fstab - the following partitions come from RAM -

    Code:
    tmpfs   /tmp    tmpfs   size=64M,mode=1777      0       0
    tmpfs   /media/ram      tmpfs   defaults        0       0
    This maps to 192mb's that are used for tmp space (/tmp is set to 64mb's, /media/ram defaults to 128mb's..) (but swapped when there's not enough space on the system). Luna allows you to open cards until you start having less then 64mb's free in swap - which isn't much since you're using so much for tmp space.. I started tweaking the space here as it seemed like overkill.. specifically, went down to these settings -

    Code:
    tmpfs   /tmp    tmpfs   size=32M,mode=1777      0       0
    tmpfs   /media/ram      tmpfs   size=64M        0       0
    (using a total of 96mb RAM instead of the original 192mb's..) - and I have to say, so far so good.. Before, I could run drpodder while STREAMING) - downloaded files were fine..) and maybe one other app before hitting the too many cards error.. After making this change, I'm able to launch a ton of apps and not hit that error. (I launched almost every app I have - gave up after about 12 apps..)

    I'm guessing an alternative is to change luna.conf to be FreeSwapThreshold less then 64.. But I hate swap.. and I serioulsy don't think we need so much space for tmp partitions.. For me, this basically solves the problem around too many cards, and I don't think there's anything that uses that much tmp space (and if there was, it'd be easy to change it back later..)

    Would love for someone else to try this and see if they're seeing the same thing.. To make this change, vi /etc/fstab, and change the following two lines -

    Code:
    tmpfs   /tmp    tmpfs   size=32M,mode=1777      0       0
    tmpfs   /media/ram      tmpfs   size=64M        0       0
    (If you're not comfortable with vi, this should be easy to do as a patch later..)


    -mark
    (ps - for my test, I was running drpodder streaming a 192bitrate mp3 file, word ace, preware, comics, wobble words, accuradio, LOLcats, Feeds, m:Mafia, weather channel weather app, quick contacts, agenda, newsroom, and hadn't hit the error yet.. Prior to making this change I was able to run drPodder (streaming same mp3) along with quick contacts and agenda, the next app wouldn't load)

    NOTE - it's possible that the extra /tmp space is needed during patch installs/etc. But this is a simple change and only takes a reboot to revert. An alternative (which won't be give you as much ram as the above method, but might be safer) is to edit /etc/palm/luna.conf and change the line FreeSwapThreshold=64 to be FreeSwapThreshold=32 (giving apps an extra 32mb's ram - or roughly 2-3 apps more)

    EDIT 10/15/09 - there are two patches developed now. One based on the /etc/palm/luna.conf hack, one based on the /etc/fstab hack. The /etc/palm/luna.conf hack will allow you to open more applications (but may slow things down as your Pre is actually swapping more if you apply it just by itself..) - the second hack (/etc/fstab changes) will allocate more of the physical memory for apps (and less for tmp space) - which should speed things up considerably as it allows almost double the memory that Palm had allocated for app RAM usage. The two patches can be ran together, but the /etc/fstab patch is the one that will make the most noticeable difference. You can still hit the memory limit (as there seems to be a leak in luna..) - but at least this moves the ceiling higher.

    EDIT2 - been experimenting more and I think I might have been wrong w/ my assumptions. Setting the /media/ram to a lower value is not reducing ram usage. What doesn't make sense is that the hack *does* really improve things. Still experimenting.

    NOTE (10/26/09) - I'm not entirely convinced that this isn't a placebo effect. There is *no* reason for the /tmp /media/ram change to make a real difference (but everyone including myself is convinced it does make a difference..) - and I've seen myself unable to open a new card w/ 64mb swap free even with the second patch.
    Last edited by diomark; 01/13/2010 at 12:39 AM.
  2. diomark's Avatar
    Posts
    752 Posts
    Global Posts
    770 Global Posts
       #2  
    btw - a possible side-effect of this is that it makes the phone more responsive.. more memory is available to caching now.
    -mark
  3. #3  
    Quote Originally Posted by diomark View Post
    I've been struggling with the "too many cards" error, especially because all it takes for me to get into that situation is drPodder streaming a high quality mp3 file (and maybe one or two other apps open)

    It looks like the LunaSysMgr uses the /etc/palm/luna.conf parameters for memory tweaking -

    Code:
    [Memory]
    MaxApplicationMemory=10MB
    # In MB. -1 to disable
    LowMemoryThreshold=-1
    # In MB. -1 to disable
    CriticalMemoryThreshold=-1
    FreeMemoryThreshold=16
    FreeSwapThreshold=64
    SwapRateThreshold=200
    CardLimit=-1
    EnableMemoryTracking=true
    UseMemchute=true
    AppsToAllowInLowMemory=com.palm.app.phone;com.palm.app.contacts;com.palm.app.messaging
    So it's basically looking at swap and free memory to see if it's able to startup a new app or not. Problem is, there's two partitions mapped during startup from RAM, which are basically swapped on a busy system. If we look at /etc/fstab - the following partitions come from RAM -

    Code:
    tmpfs   /tmp    tmpfs   size=64M,mode=1777      0       0
    tmpfs   /media/ram      tmpfs   defaults        0       0
    This maps to 192mb's that are used for tmp space (/tmp is set to 64mb's, /media/ram defaults to 128mb's..) (but swapped when there's not enough space on the system). Luna allows you to open cards until you start having less then 64mb's free in swap - which isn't much since you're using so much for tmp space.. I started tweaking the space here as it seemed like overkill.. specifically, went down to these settings -

    Code:
    tmpfs   /tmp    tmpfs   size=32M,mode=1777      0       0
    tmpfs   /media/ram      tmpfs   size=64M        0       0
    (using a total of 96mb RAM instead of the original 192mb's..) - and I have to say, so far so good.. Before, I could run drpodder while STREAMING) - downloaded files were fine..) and maybe one other app before hitting the too many cards error.. After making this change, I'm able to launch a ton of apps and not hit that error. (I launched almost every app I have - gave up after about 12 apps..)

    I'm guessing an alternative is to change luna.conf to be FreeSwapThreshold less then 64.. But I hate swap.. and I serioulsy don't think we need so much space for tmp partitions.. For me, this basically solves the problem around too many cards, and I don't think there's anything that uses that much tmp space (and if there was, it'd be easy to change it back later..)

    Would love for someone else to try this and see if they're seeing the same thing.. To make this change, vi /etc/fstab, and change the following two lines -

    Code:
    tmpfs   /tmp    tmpfs   size=32M,mode=1777      0       0
    tmpfs   /media/ram      tmpfs   size=64M        0       0
    (If you're not comfortable with vi, this should be easy to do as a patch later..)


    -mark
    (ps - for my test, I was running drpodder streaming a 192bitrate mp3 file, word ace, preware, comics, wobble words, accuradio, LOLcats, Feeds, m:Mafia, weather channel weather app, quick contacts, agenda, newsroom, and hadn't hit the error yet.. Prior to making this change I was able to run drPodder (streaming same mp3) along with quick contacts and agenda, the next app wouldn't load)

    NOTE - it's possible that the extra /tmp space is needed during patch installs/etc. But this is a simple change and only takes a reboot to revert. An alternative (which won't be give you as much ram as the above method, but might be safer) is to edit /etc/palm/luna.conf and change the line FreeSwapThreshold=64 to be FreeSwapThreshold=32 (giving apps an extra 32mb's ram - or roughly 2-3 apps more)
    Quick question: how is you batterylife after this tweak? thanks
  4. diomark's Avatar
    Posts
    752 Posts
    Global Posts
    770 Global Posts
       #4  
    Quote Originally Posted by harold42483 View Post
    Quick question: how is you batterylife after this tweak? thanks
    It shouldn't effect battery life too much (might lower it actually as you're swapping less..) - of course running 10 apps at once can tax your pre

    -mark
  5. #5  
    I used to run into this issue quite a bit. Tried your patch and there's definitely an improvement in responsiveness. Applications transition much smoother than before, less lag. I opened up more than 12 apps and they all ran smoothly. This topic deserves more attention , IMO.
  6. #6  
    can someone build this into a patch for preware
  7. diomark's Avatar
    Posts
    752 Posts
    Global Posts
    770 Global Posts
       #7  
    Quote Originally Posted by joetemp75 View Post
    can someone build this into a patch for preware
    I'm not familiar with how to build a patch, but someone should.. It's a *very* simple hack.

    -mark
  8. #8  
    Quote Originally Posted by diomark View Post
    I'm not familiar with how to build a patch, but someone should.. It's a *very* simple hack.

    -mark
    how do you hack it with windows 7
  9. diomark's Avatar
    Posts
    752 Posts
    Global Posts
    770 Global Posts
       #9  
    Quote Originally Posted by joetemp75 View Post
    how do you hack it with windows 7
    I'm logging in using putty and editing the file manually.
    -mark
  10. #10  
    could i import it with webosqi if you sent me the edited file
  11. diomark's Avatar
    Posts
    752 Posts
    Global Posts
    770 Global Posts
       #11  
    joetemp75 - here you go - this file is /etc/fstab modified for this hack. NOTE the last line though - /var/opt line is only there if you've installed the optware packages.. (if you haven't, delete the /var/opt line)

    -mark

    Code:
    # <filesystem>  <mount point>   <type>  <options>       <dump>  <pass>
    rootfs  /       ext3    ro,suid,dev,exec,auto,nouser,async,noatime      1      1
    /dev/mapper/store-var   /var    ext3    noatime 0       0
    /dev/mapper/store-log   /var/log        ext3    noatime 0       0
    /dev/mapper/store-update        /var/lib/update ext3    noauto,noatime  0      0
    proc    /proc   proc    defaults        0       0
    devpts  /dev/pts        devpts  mode=0620,gid=5 0       0
    tmpfs   /tmp    tmpfs   size=32M,mode=1777      0       0
    tmpfs   /media/ram      tmpfs   size=64M        0       0
    /dev/mapper/store-media /media/internal vfat    utf8,shortname=mixed    0      0
    /var/opt /opt bind defaults,bind 0 0
    NOTE - a safer bet would be to download /etc/fstab and change the /media/ram and the /tmp lines manually to be the same as above.. (does webosqi let you download?) be careful as this file is what tells linux/webos to mount partitions. (so any mistakes in here can hose your phone)
  12. #12  
    This patch uses the /etc/palm/luna.conf method described by the OP.

    Save it to your computer, drag and drop onto WebOSQuickInstall (or use the "+" button to add it) and hit the "Install" button.
    Attached Files Attached Files
    Last edited by Jason Robitaille; 11/10/2009 at 07:49 PM.
  13. diomark's Avatar
    Posts
    752 Posts
    Global Posts
    770 Global Posts
       #13  
    Quote Originally Posted by Jason Robitaille View Post
    This patch uses the /etc/palm/luna.conf method described by the OP.

    http://filebin.ca/eqvfh/lower-swap-threshold.patch

    Save it to your computer, drag and drop onto WebOSQuickInstall (or use the "+" button to add it) and hit the "Install" button.

    Thanks. This will give the OS another 32mb's to use for apps (another 3-5 apps) - not as good as changing /etc/fstab and reducing /media/ram and /tmp though. Can someone make a patch which edits /etc/fstab and changes

    Code:
    tmpfs   /tmp    tmpfs   size=64M,mode=1777      0       0
    tmpfs   /media/ram      tmpfs   defaults        0       0
    to

    Code:
    tmpfs   /tmp    tmpfs   size=32M,mode=1777      0       0
    tmpfs   /media/ram      tmpfs   size=64M        0       0
    ?

    -mark
  14. #14  
    Quote Originally Posted by diomark View Post
    Thanks. This will give the OS another 32mb's to use for apps (another 3-5 apps) - not as good as changing /etc/fstab and reducing /media/ram and /tmp though. Can someone make a patch which edits /etc/fstab and changes?
    I can't find the original file in the webosdoctor. Could you upload the original somewhere I could download it?
  15. #15  
    Quote Originally Posted by Jason Robitaille View Post
    This patch uses the /etc/palm/luna.conf method described by the OP.

    http://filebin.ca/eqvfh/lower-swap-threshold.patch

    Save it to your computer, drag and drop onto WebOSQuickInstall (or use the "+" button to add it) and hit the "Install" button.
    sweet thanks alot. now will this make it snappier through out
  16. diomark's Avatar
    Posts
    752 Posts
    Global Posts
    770 Global Posts
       #16  
    Quote Originally Posted by Jason Robitaille View Post
    I can't find the original file in the webosdoctor. Could you upload the original somewhere I could download it?
    I don't have the original only my modified version.
    -mark
  17. diomark's Avatar
    Posts
    752 Posts
    Global Posts
    770 Global Posts
       #17  
    Quote Originally Posted by joetemp75 View Post
    sweet thanks alot. now will this make it snappier through out

    Actually, that particular patch just allows the phone to swap more (allow more cards to be opened while swapping..) - the /etc/fstab changes are needed to swap less and free up actual ram.
    -m
  18. #18  
    have to ask.....

    What happens if you do both?
  19. diomark's Avatar
    Posts
    752 Posts
    Global Posts
    770 Global Posts
       #19  
    Quote Originally Posted by Compusmurf View Post
    have to ask.....

    What happens if you do both?
    Then you're allowing more ram to swap (the ram to be swapped is usually /tmp partition anyways, so that's a good thing), AND you have more real memory freed up. (would be good to do both hacks..)

    -mark
  20. #20  
    i think jason is trying to set up a patch as we speak
Page 1 of 12 12345611 ... LastLast

Posting Permissions