Page 16 of 55 FirstFirst ... 6111213141516171819202126 ... LastLast
Results 301 to 320 of 1081
Like Tree13Likes
  1. #301  
    Well so far so good. things have been running pretty smooth. no real issues. this is changing the line in compcache and addind the page cluster line to sysctl. everything else was the same. the swap memory does get high but i dont see the huge lag when it does. continues to run smooth with a few momentary lags here and there.
  2. #302  
    OK well after using it for a while swap hit about 85 and it had a good freeze. came back after about a minute. anyone try the new settings for sysctl? wondering how that is.
  3. snpalavan's Avatar
    Posts
    71 Posts
    Global Posts
    72 Global Posts
    #303  
    I of course appreciate all of the time and effort people are putting into this, however, noting the title, there has yet to be any reduction of the memory haha. I have tested all of these various methods, but they each attempt to get the phone to manage memory better, but there hasn't been a solid solution on how to get the phone to lose unncessary/unused memory.

    With that said, i want to reurge the fact that I appreciate all the hard work and also that I am not even sure it is possible to tell Linux to throw away memory.
  4. #304  
    I definitely think there has been progress, my phone is much better.

    However, I feel that the options in post 74 really help, as well as the very latest sysctrl, BUT I honestly think that softswap is crap.

    Its good until a lot of tasks happen at once, and then your phone just bogs down like crazy, freezes, and you gotta battery pull.

    Honestly, so far I have found that keeping the compcache at 10mb has proved the best, with the settings in post 74.

    Why? Because that is how 2.1 was written with memory management in mind by Palm.

    Changing compcache changes the swap size and the RAM size, and thus it really messes up how the kernel and OS was set to manage memory.

    That being said, this OS was really written to use 256mb of ram, not 512, but compcache isnt going to solve that.

    What we need is to find out where to possibly change the ram size to 256mb, if there are settings like that. (I hope)

    Also I would like to note that the RAID buffer settings in bootmisc.sh to 0 does have a detrimental effect: playing music over bluetooth stutters and skips. I think thats what the buffer is for.
  5. #305  
    when you say latest systctl did you just change the 3 values and leave the other 2 alone or does it only consist of the three values noted?
  6. #306  
    I to just took off the softswap. everything seems to be working well, still wondering what settings you are using when you say new sysctl settings.
    thanks
  7. #307  
    Quote Originally Posted by rmausser View Post
    That being said, this OS was really written to use 256mb of ram, not 512, but compcache isnt going to solve that.

    What we need is to find out where to possibly change the ram size to 256mb, if there are settings like that. (I hope)
    'eh?

    Why on Earth would you reduce your RAM from 512 to 256?
  8. #308  
    no he is talking about in the software everything is set for 512 because 2.1 was designed for a pre+ or pre2 not a pre minus with 256mb therefor the memory allocation is off.
  9. #309  
    Sorry to be missing in action for a few days but I'm back. So I decided to mix and mangle some of the recent tweaks. So here is what I got

    1. Softswap with the 128mb swap size
    2. my sysctl.conf (/etc/sysctl.conf)

    Code:
    vm.swappiness = 20
    vm.vfs_cache_pressure = 200
    vm.dirty_expire_centisecs = 120000
    vm.dirty_writeback_centisecs = 60000
    vm.page-cluster = 5
    vm.dirty_background_ratio = 60
    vm.dirty_ratio = 95
    vm.dirty_ratio - The highest % of your memory that can be used to hold dirty data. If you set this to a low value, the kernel will flush small writes to the disk more often. Higher values allow the small writes to stack up in memory. They'll go to the disk in bigger chunks.

    vm.dirty_background_ratio - The lowest % of your memory where pdflush is told to stop when it is writing dirty data. You'll want to keep this set as low as possible.

    In short, when your memory begins filling with little pieces of data that needs to be written to the disk, it will keep filling until it reaches the dirty_ratio. At that point, pdflush will start up, and it will write data until it reduces the dirty data to the value set by dirty_background_ratio.


    So why did I choose a high value for dirty_ratio: Its a phone with very little memory and our swap shares that memory. Also most of the things we do on our phone only increments the memory by a little bit. We dont want to be constantly firing up disk I/O every time we open a program or close it. So using a high number we will up the memory and then once we hit the 95% marker it all purges.

    So why not set dirty_background_ratio to some thing lower: Once the flush begins its going to cause the phone to slow up. So by making it a 60% dump I believe we can clear out what we need fast enough to avoid too much lag.

    Both of these values are experimental. Feel free to try them and let us know if you see any improvement.

    ps.
    the page-cluster = 8 seems like it might be a little high. I may mess with that a little more.
    Last edited by theXfactor2011; 05/23/2011 at 10:26 AM. Reason: updated my sysctl.conf settings & fixed typo
    Sprint pre -> Motorola Photon 4G
  10. #310  
    interesting settings. look forward to some results. i dont have a linux system to change sysctl with so i cant try it while i am at work. i have the original sysctl settings but i added page-cluster = 1. running that with with no softswap.
  11. #311  
    My thoughts on the page-cluster

    I came across this link. The key part I found was this:

    page-cluster

    The kernel attempts to read multiple pages from disk on a page fault to avoid excessive seeks on the hard drive. This parameter defines the number of pages the kernel tries to read from memory during each page fault. The value is interpreted as 2page-cluster pages for each page fault. A page fault is encountered every time a virtual memory address is accessed for which there is not yet a corresponding physical page assigned or for which the corresponding physical page has been swapped to disk. If the memory address has been requested in a valid way (for example, the application contains the address in its virtual memory map), then the kernel associates a page of RAM with the address or retrieves the page from disk and places it back in RAM. Then the kernel restarts the application from where it left off. By increasing the page-cluster value, pages subsequent to the requested page are also retrieved, meaning that if the workload of a particular system accesses data in RAM in a linear fashion, increasing this parameter can provide significant performance gains (much like the file readahead parameters described earlier). Of course if your workload accesses data discreetly in many separate areas of memory, then this can just as easily cause performance degradation.
    So would we say the palm pre is more linear memory loading or discreetly accessing separate areas. with a page-cluster = 8 we could load a max loading 256mb of memory worth of cache every time we swap out. Since we dont use 256mb of cache normally we basically touch every thing. possibly never making the cache dirty hence it will never clear.

    I'm trying a new setting in sysctrl.conf
    page-cluster = 5

    Reasoning is that this will pull in 32mb of cache around the program we have loaded. Most likely in our case of phone use and phone apps should be plenty. That should also leave the unused stuff to be wiped out. On that note a page-cluster = 4 would be 16mb and would be a good test also.
    Sprint pre -> Motorola Photon 4G
  12. #312  
    other than using terminal to edit thie sysctl file is there another app you can use? it opens up in quick office and not internalz so i worry about the line formatting not being in linux.
    thanks

    trying to use the vi command but fumbling a bit. thank god i figured out how to exit without saving. just having a hard time with all of the cursor position and text editing commands
    Last edited by graffix31; 05/23/2011 at 12:59 PM.
  13.    #313  
    open up launcher, tap upper left for drop down, select default applications. All the extensions are listed, tap on the one you want (.conf) and select internalz pro. I don't know if this holds through a reset ( I think it does) now, as long as you have chosen text editing, linux, in internalz preferences, the file should open through Internalz.
  14. #314  
    Awesome Thanks :-)
    i knew you could change the defaults like that. didnt even think to look there for something like this.
  15. #315  
    This swap getting filled up makes me think its why the Pre minus gets slow w/ 2.1, a memory/swap bug, not the hardware. I redoctored a spare pre to wifi only 2.1 and it was snappy again. Its just after time the OS slows itself down for some reason and gets more bugs that cause it to slow down. If we didnt have these kind of bugs, I almost feel 2.1 would be more stable/less lag, but the 256mb ram isnt helping. I may read more into this swap discussion because mines getting unbearable at times, but not always.
  16. #316  
    Quote Originally Posted by theXfactor2011 View Post
    So would we say the palm pre is more linear memory loading or discreetly accessing separate areas. with a page-cluster = 8 we could load a max loading 256mb of memory worth of cache every time we swap out. Since we dont use 256mb of cache normally we basically touch every thing. possibly never making the cache dirty hence it will never clear.

    I'm trying a new setting in sysctrl.conf
    page-cluster = 5

    Reasoning is that this will pull in 32mb of cache around the program we have loaded. Most likely in our case of phone use and phone apps should be plenty. That should also leave the unused stuff to be wiped out. On that note a page-cluster = 4 would be 16mb and would be a good test also.

    I agree 100% with the logic as this is where my mind was going with it all: QUICKLY dump/grab "memory" for current allocation needs - HUGE I/O hit, yes, but it'd be over with "faster" because it's one/two LARGE reads/writes rather than a bunch of small ones (in theory).

    However, I don't understand your math because the Linux page size is (usually) only 4K. So, (8*2)*4096 == 65,536K == 64M. Agreed that's kind of large, I've dropped it down as well to 5: (5*2)*4096 == 40,960K == 40M.

    The "times two" is from the Kernel Documentation:

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

    page-cluster controls the number of pages which are written to swap in
    a single attempt. The swap I/O size.

    It is a logarithmic value - setting it to zero means "1 page", setting
    it to 1 means "2 pages", setting it to 2 means "4 pages", etc.
    (I'm not a math major... That pattern looks like "times two" to me! )


    I'll see how this goes!




    M.
  17. #317  
    Quote Originally Posted by Xanadu73 View Post
    I agree 100% with the logic as this is where my mind was going with it all: QUICKLY dump/grab "memory" for current allocation needs - HUGE I/O hit, yes, but it'd be over with "faster" because it's one/two LARGE reads/writes rather than a bunch of small ones (in theory).

    However, I don't understand your math because the Linux page size is (usually) only 4K. So, (8*2)*4096 == 65,536K == 64M. Agreed that's kind of large, I've dropped it down as well to 5: (5*2)*4096 == 40,960K == 40M.

    The "times two" is from the Kernel Documentation:



    (I'm not a math major... That pattern looks like "times two" to me! )


    I'll see how this goes!




    M.
    I'll admit I pulled my math out of no where lol. It was monday morning and I completely forgot that we were talking about page sizes. I also over looked the proper formula. I was thinking logs. 2^8 in mb. But at least we aimed for the same goal.
  18. #318  
    Quote Originally Posted by Xanadu73 View Post
    The "times two" is from the Kernel Documentation:

    (I'm not a math major... That pattern looks like "times two" to me! )
    From another source:
    Code:
    page-cluster
    
    page-cluster controls the number of pages which are written to swap in
    a single attempt.  The swap I/O size.
    
    It is a logarithmic value - setting it to zero means "1 page", setting
    it to 1 means "2 pages", setting it to 2 means "4 pages", etc.
    
    The default value is three (eight pages at a time).  There may be some
    small benefits in tuning this to a different value if your workload is
    swap-intensive.
    2x would mean 3 = 6 but it clearly = 8 per the source I found. While it clearly says LOG it doesn't say what base but after looking it's clear this is LOG2 not LOG10. So to figure out the impact of a given setting simple raise 2 to that value. Thus 0=1;1=2; 2=4; 3=8; 4=16; 5=32; 6=64; 7=128; 8=256.

    NOTE: This indicates the number of pages not KB or MB of RAM as pointed out earlier in the thread.
  19. #319  
    Quote Originally Posted by graffix31 View Post
    no he is talking about in the software everything is set for 512 because 2.1 was designed for a pre+ or pre2 not a pre minus with 256mb therefor the memory allocation is off.
    Thank you - I read that backwards from what he was meaning - english (while my first and only really proficient language) is a loosely interpreted thing.
  20. #320  
    Quote Originally Posted by theXfactor2011 View Post
    My thoughts on the page-cluster

    So would we say the palm pre is more linear memory loading or discreetly accessing separate areas. with a page-cluster = 8 we could load a max loading 256mb of memory worth of cache every time we swap out. Since we dont use 256mb of cache normally we basically touch every thing. possibly never making the cache dirty hence it will never clear.

    I'm trying a new setting in sysctrl.conf
    page-cluster = 5

    Reasoning is that this will pull in 32mb of cache around the program we have loaded. Most likely in our case of phone use and phone apps should be plenty. That should also leave the unused stuff to be wiped out. On that note a page-cluster = 4 would be 16mb and would be a good test also.
    Is page size 1MB? Page-Cluster setting of 5 = 32 pages - each page would have to be 1MB for your concerns to be true. Page-Cluster set to 8 = 256 pages which at 4KB per page is 1MB which doesn't seem like too much memory to be dirty unless I'm confusing myself. In fact due to the way Flash is prone to wearing out due to writes I would think you might want to raise the limit not lower it - all of this is based on a 4KB page size default.

    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.
    Last edited by Unclevanya; 05/23/2011 at 04:47 PM.

Posting Permissions