Page 1 of 2 12 LastLast
Results 1 to 20 of 35
  1.    #1  
    Right, here we go

    From the onset I should say that I am no expert in Linux, and just have a grasp on its concept. But as a student in e-business, I have ALOT of time with coding in .net asp languages, and although not specifically a coding degree, I have interest in the dev field. I only say this to help direct responses.

    Now you've got the brief background of me!lol! I have had my o2 gsm pre since day 1, and recently the tmc error has been bugging me just too much, so I started a look into linux memory allocation, and decided, naively, I created a swap file in the /media/internals, this obviously didn't do diddly, so I left the project for abit.

    IMPORTANT BIT: So, now I've started again and I'm, instead of creating a random file here and their, trying to fine tune the RAM and SWAP parameters to minimize tmc errors when trying to open 3d games and such, not necessarily multitasking, as I get tmc's just trying to task. I have jstop on constantly and sometimes can't even do a jstop Garbage collect.

    So what have I done, I have gone to the extremes and now want to test to find the sweet spots, I have SWAPPINESS set to 100, and dirty_background_ratio @ 2%, this seems to let me open ANY app, first time, and directly after closing a 3d game, I can open another one...this used to bring up tmc every time.

    So now I need to know how to write this permanently, as I currently only set them using

    Code:
    sysctl vm.swappiness=100
    sysctl vm.dirty_background_ratio=2
    so that I can thoroughly test them and find the best RAM/SWAP settings.

    Any help and advise on this is very welcome!

    Cheers,

    Phil

    UPDATE: Right I have found a nice setting, seems to be working well, I have had Quake, Gangstar and 6 other apps open fine, so thats 2 3d games and 6 other apps like grooveshare, engadget etc and no problem.

    Current settings:

    Code:
    Swappiness=100
    dirty_background_ratio=2
    dirty_expire_centisecs=500
    This seems to be a nice set-up, I'm goning to try and see if I can further enhance RAM allocation with the overcommital settings, but one of these crashes the pre, so I will have to test this alot.

    UPDATE2: It may be worth mentioning that I have been running my RAM settings as stock today, and although better than usual, my pre has done a (very common) random restart when pressing the on/off switch, this NEVER happened with the tweaks, I don't know if this was luck, fluke or the random restarts are effected by the OOM killer, which may not be set properly on stock, adnd kill the UI when the memory reaches critical.

    UPDATE3: Right so the following settings seem to give me no random restarts, and minimal tmc errors:

    Code:
    Swappiness=100
    dirty_background_ratio=2
    dirty_expire_centisecs=500
    overcommit_memory=0
    Although this isn't ideal, I'm going to look into adding a swap file to increase VM, but as far as I'm aware, this wont be efficient, or useful in supressing tmc..still worth a look!

    So as stated above, if anyone could help me get this to patch form, that's be awesome, it would make my optimising 1000 times quicker, and I could then submit something for testing very soon!!

    Thanks again!
    Last edited by phil.hsr; 05/16/2010 at 04:34 PM.
  2. twbbas's Avatar
    Posts
    87 Posts
    Global Posts
    99 Global Posts
    #2  
    I'd be interested in getting this in patch form. Someone please help him!
  3. spx
    spx is offline
    spx's Avatar
    Posts
    3 Posts
    #3  
    The only issue with making a swap partition/file on a flash device is that it will wear off much faster...
  4.    #4  
    Quote Originally Posted by spx View Post
    The only issue with making a swap partition/file on a flash device is that it will wear off much faster...
    Yeh, It didn't work as I intended, but this latest evolution seems kosha, with swappiness set at 100, and dirty_background_ratio at 2% I can now open any app 1st time with no tmc, multitasking is still crap, but I've been testing this for a few hours and I can open any 3d game (as long as no other card is open), close it, and immediately open another one <-- this used to throw up an error for me! So the initial testing looks good.

    EDIT: So after 2 more days testing, I am going to try fine tuning this and other memory related variables in order to find the best tmc suppression, however, as stated in the OP, I can make these settings stick, but I have to manually extract and write config files, so if anyone can help with creating a .patch file or something similar it would be grand!!

    UPDATE: Sims3 is the ONLY app/game that still brings up tmc on first try, I will keep testing this setting, without luna restart or reboot (which I haven't done since the original tweak) and see how it handles before I do anymore tweaking.
    Last edited by phil.hsr; 05/10/2010 at 01:14 PM.
  5. #5  
    What is the file name you are changing? I will write the patch for you.
  6.    #6  
    Quote Originally Posted by mamouton View Post
    What is the file name you are changing? I will write the patch for you.
    I am changing

    Code:
    /proc/sys/vm/swappiness
    To = 100

    and

    Code:
    /proc/sys/vm/dirty_background_ratio
    To = 2

    Thanks man,


    P.S; Ive just PM'ed you, cheers again
    Last edited by phil.hsr; 05/11/2010 at 04:50 AM.
  7. #7  
    According to /etc/init.d/bootmisc.sh, you should be able to do the following to get the settings to stay after a reboot:
    Code:
    mount -o rw,remount /
    echo vm.swappiness=100 >> /etc/sysctl.conf
    echo vm.dirty_background_ratio=2 >> /etc/sysctl.conf
    mount -o ro,remount /
    I have tested this method of setting the parameters on my phone and it seems to work. I have not spent a lot of time actually testing the parameters, however. Hopefully this should make the patch pretty easy to create. It's just a diff of /etc/sysctl.conf.

    BTW @mamouton, is there a description of the requirements to create patch that will work in Preware? I've created patches before that I can distribute to people who know how to run patch, but I can't seem to find any of the requirements for writing a patch for webos so that it can be compatible w/preware, et al. A pointer if such documentation exists would be appreciated.
    Last edited by mu7efcer; 05/11/2010 at 06:09 AM.
    Twitter: dullgeek
  8.    #8  
    well, this is just strange, things still seem to be grand, only ONE luna restart since yesterday.

    But I just ran a couple of 3d games, and hit
    Code:
    free -m
    to see the memory usage as I open and close a 3d game, and then run garbage collect.

    After Luna restart, I have 25M free, once I open and close a few 3d games, and then open one for good (Gangstar) my free mem is down to 15M, which is respectable, considering the memory overcommit is set to "1" where the cpu always assumes their is enough memory.

    But once I close the game, the memory only frees 3 of the 10M used, so the best I can get is 18 free again. And once I run jstop Garbage Collect, I only have 15M of free again.

    After 10-15mins memory usage is floating between 15-18M which is enough for a 3d game to open, but this is with my memory tweaks, I know that my overall memory is about 7Meg more with these tweaks.

    This is very strange, 256M should be plenty for the phone to utilise, you should even be able to run 3/4 3d games at once. But without my tweaks, I usually struggle to run one 3d game.

    I think I'm going to experiment with tuning the overcommit_memory to 0 and see if the CPU can handle calculating memory allocation, if this fails, I'll have to set it to never overcommit and find the best overcommit ratio.

    Hopefully we can banish that pesky "too many cards" for good!!

    EDIT: Just ran the test again, I had 12M before 3dgame, 2M during and 31M after closing; looks like the system swapped out when the memory got too low, as swappiness is set to 100!Now I have loads of free memory!lol! Still going to try the overcommital tweak!

    @mu7efcer: cheers for the advise!!
    Last edited by phil.hsr; 05/11/2010 at 06:34 AM.
  9. #9  
    Quote Originally Posted by mu7efcer View Post

    BTW @mamouton, is there a description of the requirements to create patch that will work in Preware? I've created patches before that I can distribute to people who know how to run patch, but I can't seem to find any of the requirements for writing a patch for webos so that it can be compatible w/preware, et al. A pointer if such documentation exists would be appreciated.
    My understanding is that when dbsooner tests the patch that it installs with no errors. I have submitted lots of patches. This is the address to use. dBsooner's webOS-Patches Web Portal

    @phil.sr I made the patch but got an error when trying to apply it I will try again when I get home later this evening.
  10. #10  
    any word on getting this in patch form?
    Developer of Ultimate Hockey, netSpeed, BatteryMonitor, The Ghastly Headset,
    netSpeed HD, St4rs and Matrix Exhibition
    -------------------------------------------------------------------
    Follow my webOS projects on my blog and follow me on twitter
  11.    #11  
    Some time soon hopefully, but once compiled it will have to be tested and tweaked to find the best settings for suppressing the tmc error, I've got a good config atm, but the sims3 seems to cause a world of pain still (tmc) so I'm looking into trying to force swapping on low memory, webOS just doesn't like swapping!All other 3d games seem sound, they load pretty slow if in low memory (but at least they load), as the cpu is swapping more to the SSD, but once loaded runs smooth.
  12. #12  
    This probably needs to be moved to WebOS Development. I also wouldn't recommend a patch until more testing is done especially when we find new variations ever hour.

    I am interested in how this turns out though.


    If I helped you or you have downloaded one of my files,
    then least you could do is click the "Thanks" button.
  13. r-nice's Avatar
    Posts
    240 Posts
    Global Posts
    565 Global Posts
    #13  
    I find this thread very interesting.
  14. #14  
    This will kill your flash memory & battery faster. For flash memory the suggestions are -noatime in /etc/fstab, ioscheduler (elevator) = noop or deadline. To save battery life powertop suggest increase the dirty writeback time. And noswap for ssd or other flash memory.
  15.    #15  
    well, the already partitioned swap space will have a cycle time far greater than the 2years I plan on keeping this thing, also, the swappiness is at 60 at stock, so the extra 40% wont deteriorate the swap partition much quicker!As for battery life, I will do thorough testing but can't see their being a greater difference, and if the trade off is 3d games working every time, or 10 mis of battery, I'l go for the games!

    @pdaneophyte Thanks for your suggestions though, I will look into other memory allocation variables, I just want to get the best setting with the basics first!

    EDIT: dirty writeback is one of the variables being tuned for this tweak, I've taken it from 6000 (pre stock) to 500 centisecs to force pdflush more often, didn't make much difference to be honest.
  16.    #16  
    EDIT: sorry, double posted the above update (number3) I did it off my phone and forgot I had already done it in the OP!!long day!lol
  17. #17  
    phil.sr been busy rewriting my chapter 4 of my dissertation I have a break and wanted to see if there are any other changes.
  18.    #18  
    Quote Originally Posted by mamouton View Post
    phil.sr been busy rewriting my chapter 4 of my dissertation I have a break and wanted to see if there are any other changes.
    lol, I've just finished my dissertation on Friday...whats your on?

    If you look at the OP, my 3rd update has the latest settings, that's pretty much the best I have found for now!
  19. #19  
    Principal's perceptions of evidence-based practices for African American students: Level of knowledge and campus implementation.
  20.    #20  
    well, that sounds like a lovely chunk of hard, mixed with a little bit of complicated!
Page 1 of 2 12 LastLast

Posting Permissions