Page 6 of 6 FirstFirst 123456
Results 101 to 118 of 118
  1. #101  
    Quote Originally Posted by rwhitby View Post
    Can you report on total memory usage numbers (ram plus swap) for the same scenarios?

    -- Rod
    I shortened the play session so I could report two games in one post for comparison. Previously I have played one game for as much as over two hours.

    Default boot setup:

    Boots with mode switcher launches battery monitor, calendar, agenda, comics, card ace blackjack, save/restore, and govnah (in that order). Performed this normal boot

    Memory: 205/23

    Close all of that stuff and then open govnah again

    Memory: 203/22

    Close govnah and launch assassin's creed open govnah

    Memory: 236/50

    Play assasin's creed for one hour open govnah

    Memory: 236/72

    To my surprise the first number isn't 20 or 30MB higher (might be less than that not sure I didn't keep the info) like in my previous tests with assassin's creed. I'm not sure if longer play time was a factor before or if something else was.

    Close govnah and assassin's creed then open govnah

    Memory: 170/62

    Close govnah reboot

    Repeat same process for dungeon hunter.

    210/27 after boot
    204/27 after closing launched at boot apps
    236/33 after opening DH
    236/59 after one hour of game play
    185/56 after closing DH


    -------------EDIT:------------------

    Not as extensive as the other two but here are some numbers for after open and after at least an hour of play and I'm pretty sure no reboot prior to play.

    hero of sparta
    234/20
    236/39
    Last edited by StoneRyno; 06/24/2010 at 01:11 AM. Reason: added more stats I just remebered I had written down
    As requested: for my works on webOS patches and apps. Twitter: @larryboytw Patches: Small icons browser start page, 5x5 launcher. I have an AAS CIS Programming degree. I enjoy working on open source projects and alpha and beta testing.
    http://install.preware.org/ for easy to get up and running for patches and apps.
  2. #102  
    Linux noob question:
    How do I create a "shortcut" so I don't have to re-type in
    sync; echo 3 > /proc/sys/vm/drop_caches
    all the time?
    Seems to help a bit clearing the memory.

    Thanks
    Check out my My Medical webOS Apps
    Featured free apps: DrugView | Eponyms | eMed | Dosecalcfree | Beeb News
  3.    #103  
    Quote Originally Posted by palmdoc2005 View Post
    Linux noob question:
    How do I create a "shortcut" so I don't have to re-type in
    sync; echo 3 > /proc/sys/vm/drop_caches
    all the time?
    Seems to help a bit clearing the memory.

    Thanks
    Does it change the values on the *second* line of the output from running 'free'? (the line which takes into account memory which is temporarily marked as in use for transient buffers and caches and adds it to the unused memory)

    Just moving memory from free memory to linux buffers or caches doesn't actually change the amount of memory available to applications, because Linux drops buffers and caches automatically when an application requests more memory.

    Linux aggressively uses memory for buffers and caches to do things like reading ahead on files and leaving previously used pages in memory, just in case an application is going to access them in a loop. It also aggressively gives up those buffers and caches the instant that they are needed to service a memory allocation request from a running process.

    Note that the Linux buffers and caches are completely different from the LunaSysMgr internal caching or Javascript garbage collection.

    -- Rod
    WebOS Internals and Preware Founder and Developer
    You may wish to donate by Paypal to donations @ webos-internals.org if you find our work useful.
    All donations go back into development.
    www.webos-internals.org twitter.com/webosinternals facebook.com/webosinternals
  4. #104  
    OK here's a test with three apps running

    Code:
    root@palm-webos-device:/# free
    free
                 total       used       free     shared    buffers     cached
    Mem:        244784     229256      15528          0       3988      56128
    -/+ buffers/cache:     169140      75644
    Swap:       131064      65532      65532
    then I closed the three apps

    Code:
    root@palm-webos-device:/# free
    free
                 total       used       free     shared    buffers     cached
    Mem:        244784     219752      25032          0       4212      60956
    -/+ buffers/cache:     154584      90200
    Swap:       131064      64944      66120
    then I flushed the mem cache

    Code:
    root@palm-webos-device:/# free
    free
                 total       used       free     shared    buffers     cached
    Mem:        244784     182016      62768          0        752      25704
    -/+ buffers/cache:     155560      89224
    Swap:       131064      64944      66120
    I don't know what all the numbers mean
    Check out my My Medical webOS Apps
    Featured free apps: DrugView | Eponyms | eMed | Dosecalcfree | Beeb News
  5.    #105  
    Quote Originally Posted by palmdoc2005 View Post
    OK here's a test with three apps running

    Code:
    root@palm-webos-device:/# free
    free
                 total       used       free     shared    buffers     cached
    Mem:        244784     229256      15528          0       3988      56128
    -/+ buffers/cache:     169140      75644
    Swap:       131064      65532      65532
    Here you have 169MB used, and 75MB free (see the second line, where it says -/+ buffers/cache).

    then I closed the three apps

    Code:
    root@palm-webos-device:/# free
    free
                 total       used       free     shared    buffers     cached
    Mem:        244784     219752      25032          0       4212      60956
    -/+ buffers/cache:     154584      90200
    Swap:       131064      64944      66120
    Here you have 154MB used, and 90MB free, showing that closing apps allows webOS to return the memory used by those apps back to Linux.


    then I flushed the mem cache

    Code:
    root@palm-webos-device:/# free
    free
                 total       used       free     shared    buffers     cached
    Mem:        244784     182016      62768          0        752      25704
    -/+ buffers/cache:     155560      89224
    Swap:       131064      64944      66120
    I don't know what all the numbers mean
    Here you still have 155MB used, and 89MB free - virtually the same amount of memory available to Linux to give to processes (like the webOS UI) that make memory allocations.

    As you access files, the cached number on the first line will start to rise again, as Linux aggressively caches data in case you reuse it. But note that the real amount of free memory on the second line will not change as a result.

    Here's an extreme result from a Pre Plus that has just been doctored and is currently reloading all my applications from the app catalog:

    Code:
    root@palm-webos-device:/# free
                 total       used       free     shared    buffers     cached
    Mem:        504680     500332       4348          0       1292     308624
    -/+ buffers/cache:     190416     314264
    Swap:       131064        312     130752
    root@palm-webos-device:/#
    That's with a single app running (the app catalog client) on a freshly doctored device. The reason why the cached value is so high is because Linux is working with lots of big package files that are being installed, and Linux keeps that data in caches just in case you go an re-read the same file from disk again (it's much faster to access a cached file in memory than it is to re-read it from slow flash disk). But it's a transient cache, which is dropped instantaneously and automatically by the Linux virtual memory management system if the memory is required for something more important (like a memory allocation request from a running process).

    Note that this device has 314MB free, not 4MB free as others in this thread would have you believe.

    -- Rod
    Last edited by rwhitby; 06/25/2010 at 12:11 AM.
    WebOS Internals and Preware Founder and Developer
    You may wish to donate by Paypal to donations @ webos-internals.org if you find our work useful.
    All donations go back into development.
    www.webos-internals.org twitter.com/webosinternals facebook.com/webosinternals
  6. #106  
    Thanks for the explanation. Is there any other command line way to free memory?
    Check out my My Medical webOS Apps
    Featured free apps: DrugView | Eponyms | eMed | Dosecalcfree | Beeb News
  7. #107  
    Quote Originally Posted by rwhitby View Post
    OK, back to the original topic of this thread - investigation of the Too Many Cards error.

    I now have a good idea of what causes it, why it occurs, and why it may be a good thing (yes, I did say that). Read on for the details ...

    Palm have put a mechanism called "memchute" or "lowmemnotify" in place to alert the UI and applications when memory is getting low.

    This allows apps to dump caches (e.g. grayed out browser windows), stop requesting memory allocations (e.g. Too Many Cards errors), and in a worst case, for some apps to sacrifice themselves for the good of others.

    Your webOS device has limited memory. Some of that memory is required to run things like receiving a phone call or SMS or email. Some of that memory is required to open web browser pages. Some of that memory is required to run 3D games. Some of that memory is required to load all the feed information in Preware.

    The point is that you can't expect to keep opening cards for ever without running out of memory.

    For a non-Plus Palm Pre, once the whole operating system and user interface has loaded, there is only about 100MB free for applications in normal RAM space.

    Note that your average 3D game uses about 70MB of RAM space. So two 3D games takes you well over the free ram limit of a normal Palm Pre.

    For a Palm Pre Plus, this increases to about 350MB free ram. This is the reason why you can open many more cards on a Pre Plus compared to a Pre.

    Note that there is an additional 130MB swap space available, but using this swap space means reading and writing to ssssllllloooowwww flash memory instead of relatively fast ram. This is one cause of a jerky responsiveness where things hang for a couple of seconds and then come back to life (the other major cause is garbage collection).

    Now, the algorithm that Palm uses to determine whether to allow you to open another card or not seems to be as follows:


    and



    Those are both approximations (there are some other finer details), but they give the general flavour of what is happening. We're far more fuzzy about the details of the second formula than the first (since we have the kernel source code for the first, but are relying on experimentation and other information to determine the second).

    So, it seems that Palm have made a decision for their total customer base, that they don't want you to ever go into swap as a result of opening applications. The rationale for this is likely to be that if the code which receives phone calls goes into very slow flash memory swap space, then there's a chance that you might miss a phone call as a result.

    Palm have decided that getting phone calls on a smartphone is more important than playing 3D games. You personally may or may not agree with that, but you probably would agree that it's a reasonable position for a smartphone company to hold on behalf of the 95+% of users who don't visit PreCentral - they usually expect a phone to work like a phone.

    So, what can we, the homebrew power users, do about this?

    Well, the first thing we can do is change the formula.

    The F102 and F104 kernels change the first formula to never ever report the out of memory condition and therefore never give a TMC error when opening normal Mojo applications. I believe the second formula is still in play (try opening more than 2 3D games on a normal Palm Pre, or about 5 or 6 3D games on a Palm Pre Plus) but may be modified slightly due to the lack of out of memory condition reporting allowing 1 or 2 additional 3D games to be opened.

    The UberKernel 1.4.x-37 which is in alpha testing changes the first formula to:



    and also does not change the second formula much other than via the expanded total (ram + swap) size which seems to allow for 1 or 2 additional 3D games to be opened.

    The second thing we can do is make swapping more efficient.

    The compcache kernel modules trade off normal memory space for faster compressed swap space.

    What this means is that you use maybe 20MB of your normal memory space (yes, that's 1/5th of the space you have for applications normally on a Palm Pre), and you create a compressed swap device that can store about 60MB of data in that 20MB space, but at the cost of taking some time to compress and uncompress the data. After the 60MB is used up, any more swap data goes out to the slow flash area.

    So this effectively increases your "fast" memory area by another 40MB (that's an extra 40% more space for new cards on a Palm Pre) before spilling over to the "slow" flash-based swap area, at the cost of accessing the last 20MB of your normally lightning fast ram at a slower speed due to compressing and uncompressing (but still much much faster than the flash swap area).

    Note that the compcache kernel modules don't actually stop the Too Many Cards errors - it's our changing of the formulas which does that. The compcache kernel modules just make the transition from very fast ram area to very slow flash swap a bit more gradual, but adding a larger (due to compression) still-fairly-fast ramzswap area in the middle.

    Now what are the downsides of all of this?

    Well, if you go and open too many cards, your device is going to get bogged down and you are going to miss phone calls or have sluggish cameras and other similar effects. You will still be able to open new cards, but nothing comes for free, and things getting bogged down is the cost you will pay.

    Now, if you have a Pre Plus, that cost won't start being paid until you've filled up the 350MB of available ram space. If you have a normal Palm Pre, then you'll start paying the cost much earlier.

    Note also that the cost will differ for different people, depending on what order you open applications, and when you last used certain applications, and how much memory your most used applications require, and how often you get emails and phone calls and twitter notifications. So don't try and compare your costs too closely with other people, cause there is unlikely to be exact correlations.

    So, what does WebOS Internals intend to do about this?

    Well firstly, Marco (uNiXpSyChO, our main kernel developer) will continue with the experimental stream of kernels (F102 and F104) which are used to experiment with new features and explore the boundaries, and some people will find those kernels to be the best choice for them.

    As far as the UberKernel goes, I've created a kernel modification to change the formula to take swap space into account, and I'm incorporating the compcache kernel modules into UberKernel in a configurable way. And Govnah is being updated to be able to control all this stuff.

    Alpha testing continues ...

    -- Rod
    hi, I'm trying to figure out when it is a good idea to manually reboot-- right now, through Govnah 0.6.7, I'm running screenstate 500/1000 with compcache at 32MB.
    my current memory/swap is 215/33... which of these two numbers will give me an indication that I've used up my RAM and am now using "too much" flash swap (thus resulting in either/both a TMC error or the phone getting bogged down)... are there approximate values to be aware of my Sprint Pre? for example, memory below 200, or swap above 50, or combined value of the two above 275?

    I read in another thread something to the effect that since our phones run linux that we shouldn't really need to restart the phones, but restarting is the only way I know how to "re-free up" memory-- a luna restart doesn't seem to do the trick... perhaps I need to study up on using J-stop?

    anyways, I hope this makes sense... thanks in advance for your help!

    edit:
    so reading a little further, I see that disabling/enabling compcache flushes the memory-- much more efficient than manually rebooting!
    Last edited by booyapre; 09/01/2010 at 10:27 AM. Reason: more info
  8. #108  
    I reboot my sprint pre every day. Currently my memory is at 219/67 and a few seconds after launching govnah the system must have done a garbage collect thing as that went down to 201/67. I'm not sure what the maximum swap is but I do know RAM is 256MB (comp cache would use part of this), however I have never seen it get real close to that. Ideally you would never need to reboot a device however since software isn't perfect and there is always the possibility of issues even if all the software appears to be bug free etc there is always a chance that one or more things leak memory. Since smartphones have far less than a PC, laptop, or netbook reboots will be more frequent if anything is leaking.

    You have the option of waiting for TMCs to occur to reboot or reboot on a schedule using preset reset or what not to periodically reboot. I wouldn't worry about monitoring the amount of memory in use and using that to decide when to reboot it seems to much of a hassle. Jstop would allow you to garbage collect manually or more frequently automatically and even close things if you know what your doing when closing stuff that way. Personally I didn't find Jstop to be of any use to me. It's all a matter of how and what you want to do. I prefer to use preset reset to reboot every day in combination with mode swticher launching a set of apps on boot it reminds me to perform tasks I need to do every day.
    As requested: for my works on webOS patches and apps. Twitter: @larryboytw Patches: Small icons browser start page, 5x5 launcher. I have an AAS CIS Programming degree. I enjoy working on open source projects and alpha and beta testing.
    http://install.preware.org/ for easy to get up and running for patches and apps.
  9. #109  
    Hi,

    I completely turned off mem swapping via the swapoff command in the terminal app. I then used my Pixi a couple of days. For me the responsivness of my most used apps felt very consistent and robust. I quickly got used to keeping 5 or 6 of them opened all the time. I'm talking of a Pixi, you know. It felt better then compcache.

    Here my question. Does the TMC formula calculate correctly in case of disabled swap? I would guess that it does not. Because when I tried to push it to the card limit by viewing some email attachments with the DocViewer, the device just froze and then rebooted (self-repairing the swap setup).

    Now I think about putting a customized 32MB swap space in place. I'd really like to have some TMC warning. I hope it does mitigate the risks of playing with the swap size What do you think?

    Pixi+ UK 1.4.5-74

    Regards,
  10. #110  
    Honestly I would not turn off the swap and use compcache of 32MB. This should allow you the option of having the number of cards you would like open with less impact on performance when swap space otherwise would be used. Then swap is there just in case too much is opened. You could also go with a larger amount of compcache. This is something you'll have to play with. I suspect the reason you experienced freeze up is because in general no swap meant abrupt out of memory. Even on my PC with 4GB of RAM I don't disable swap for this same reason.
    As requested: for my works on webOS patches and apps. Twitter: @larryboytw Patches: Small icons browser start page, 5x5 launcher. I have an AAS CIS Programming degree. I enjoy working on open source projects and alpha and beta testing.
    http://install.preware.org/ for easy to get up and running for patches and apps.
  11. #111  
    @StoneRyno: ACK for normal Hardware. But we're talking of the Pixi, a handicaped device, nevertheless worth of trying to get the most for a productive work out of the hardware we have. Productivity IMO comes mainly from responsiveness and predictable GUI behavior.

    Again my question: 190MB RAM + 32MB swap file (instead of 200MB swap partition on Pixi). Is the TMC calculation ready for such a scenario?


    btw: 190MB RAM + 32MB swap is similar to 4GB RAM + 512MB swap
  12. #112  
    Unfortunately I dont know enough about the internal workings behind TMC to answer your question regarding turning off swap space. I can only offer the recommendation to not disable the swap space since your described outcome is consistent with a sudden reaching of the memory limit with no recourse to alleviate the situation which commonly is done with the swap space. The pixi and pre have the same physical memory the plus models may be different compared to each other but have more physical memory than the original models of the pre and pixi. Outside of that the only performance difference would be in overclocking. If you are inclined to disable swap space I would increase compcache more than 32MB and perform a wide range of test scenarios to make sure your device will remain stable with the swap space turned off for all possible use scenarios that could occur in your day to day routines.
    As requested: for my works on webOS patches and apps. Twitter: @larryboytw Patches: Small icons browser start page, 5x5 launcher. I have an AAS CIS Programming degree. I enjoy working on open source projects and alpha and beta testing.
    http://install.preware.org/ for easy to get up and running for patches and apps.
  13. #113  
    Quote Originally Posted by StoneRyno View Post
    Unfortunately I dont know enough about the internal workings behind TMC to answer your question regarding turning off swap space. I can only offer the recommendation to not disable the swap space since your described outcome is consistent with a sudden reaching of the memory limit with no recourse to alleviate the situation which commonly is done with the swap space. The pixi and pre have the same physical memory the plus models may be different compared to each other but have more physical memory than the original models of the pre and pixi. Outside of that the only performance difference would be in overclocking. If you are inclined to disable swap space I would increase compcache more than 32MB and perform a wide range of test scenarios to make sure your device will remain stable with the swap space turned off for all possible use scenarios that could occur in your day to day routines.
    Having a 32MB+ compcache size will lead to some things not working on a Pre, a Pre+ would be fine with that.

    If you disable swap you are disabling compcache. Technically things would run faster if swap is disabled since no virtual memory calculations need to be done by the OS and CPU. This will test how good the OS VM subsystem under severe memory pressure. But if you have a process with a memory leak then you will be doomed eventually without swap that would mask it a little longer.
    Live free or DIE!
  14. #114  
    Quote Originally Posted by wiwa View Post
    190MB RAM + 32MB physical swap file (instead of 200MB swap partition on Pixi). Is the TMC calculation ready for such a scenario?
    No it is not. I Just tested it; no TMC warning before the device hangs.

    Sorry for bothering.
  15. #115  
    Quote Originally Posted by unixpsycho View Post
    Having a 32MB+ compcache size will lead to some things not working on a Pre, a Pre+ would be fine with that.
    I must not be doing anything that would cause having a 32MB compcache on my sprint pre then. I've been using that since compcache was added to uber kernel. I've packed out quite a bit of memory from open apps. I've had as many as 5 or 6 browser cards open at the same time and a few other apps running along with them. A 3D game such as assassin's creed open along with several other apps. In the case of the 5 or 6 browser cards with some other apps running attempting to open another browser card or app will cause TMC. I'm curious to know what it could have caused problems with since I haven't noticed any problems. Though I'm not often loading up that much stuff. Usually when I'm without access to a PC and need to reference a lot of stuff all at the same time that I would normally do on my PC.
    As requested: for my works on webOS patches and apps. Twitter: @larryboytw Patches: Small icons browser start page, 5x5 launcher. I have an AAS CIS Programming degree. I enjoy working on open source projects and alpha and beta testing.
    http://install.preware.org/ for easy to get up and running for patches and apps.
  16. #116  
    Quote Originally Posted by StoneRyno View Post
    I must not be doing anything that would cause having a 32MB compcache on my sprint pre then. I've been using that since compcache was added to uber kernel. I've packed out quite a bit of memory from open apps. I've had as many as 5 or 6 browser cards open at the same time and a few other apps running along with them. A 3D game such as assassin's creed open along with several other apps. In the case of the 5 or 6 browser cards with some other apps running attempting to open another browser card or app will cause TMC. I'm curious to know what it could have caused problems with since I haven't noticed any problems. Though I'm not often loading up that much stuff. Usually when I'm without access to a PC and need to reference a lot of stuff all at the same time that I would normally do on my PC.
    There are some functions that require enough low memory in order to function. Like the camera or anything DSP related. The kernel uses a weird 2.5/1.5GB split which would give more lower memory. If you use most of that in compcache then you *might* run into problems if the OS runs out of free low memory. 64bit kernels dont have this problem.

    There are reports of users with a 32MB+ compcache that had problems.
    Live free or DIE!
  17. #117  
    Quote Originally Posted by unixpsycho View Post
    There are some functions that require enough low memory in order to function. Like the camera or anything DSP related. The kernel uses a weird 2.5/1.5GB split which would give more lower memory. If you use most of that in compcache then you *might* run into problems if the OS runs out of free low memory. 64bit kernels dont have this problem.

    There are reports of users with a 32MB+ compcache that had problems.
    So as long as one doesn't experience the side effects then it would be fine if they were to use 32MB compcache. Until you brought it up I wasn't aware of potential issues. My sprint pre functions excellently with it set at that. In combination with overclock using uber kernel, it's been almost impossible for me to do anything to cause TMC or cause UI lag. I'm guessing that there isn't anything that can be done for those who experience these problems other than reduce compcache size?
    As requested: for my works on webOS patches and apps. Twitter: @larryboytw Patches: Small icons browser start page, 5x5 launcher. I have an AAS CIS Programming degree. I enjoy working on open source projects and alpha and beta testing.
    http://install.preware.org/ for easy to get up and running for patches and apps.
  18. #118  
    Hi, everyone ~
    A few weeks ago my system OS was updated on my phone (a Palm Pre Plus), and before that I never saw this error. It keeps happening when I have nothing else open on my phone (I don't play games, all I use my phone for besides calling is scheduling, contacts, and texting. Well, the scheduling and especially the contacts part has been EXTREMELY limited by the fact that the googlecloud software -- which really seems to have its proverbial "head in the clouds," I guess, with how well it has worked for me! -- refused to bring most of my contacts and schedule items from my Palm 680 to the Palm Pre. And if ONLY the phone would let me answer when someone calls when it is locked... Okay, you get the picture. I'm really HATING this phone. I still use my 680 to wake me up when I need it to because the scheduling alarm is so lame, I miss reminders constantly because I never notice it doing anything, have put the volume up completely HIGH and have even downloaded the "newer" supposedly "louder" rings... all to no avail.).

    Anyhow, this error is really bugging me because I have nothing open and then the phone won't let me use my schedule or check the web for something, even when nothing else is open.

    Any ideas would be MUCH appreciated!
Page 6 of 6 FirstFirst 123456

Posting Permissions