![]() |
Re: Massive interactivity improvement under high I/O load!
Sorry for possibly lame question, but how swap fragmentation can occur o flash based disk? Doesn't hardware controller do "fragmentation" all the time no matter what, due to wear leveling? Especially, when swap is on microSD - I'm not certain if hardware wear leveling occur on eMMC, but SD cards got hardware wear leveling for sure, and as far as i know it is completely transparent for any software controller, IE. filesystem doesn't matter at all.
I would really like to read our specialist explanation on this though, cause it is highly possible that i missed something. |
Re: Massive interactivity improvement under high I/O load!
Wear leveling doesn't guarantee performance.
Flash erase blocks are some 256k - 1024k big. On SD, MMC, eMMC and most USB flash keys, if you write 4k, the card takes an unused block, erases it, and writes that 4k to it. If you write other stuff to same block afterwards, it too gets written. If you go write somewhere else outside of that block, the card reads in the data missing from filling up 256k from the old block, marks old block unused, and writes it to new block. Thus, if you're doing random 4k writes, the card ends up writing 256k for every request. Obviously that's 64 times slower. |
Re: Massive interactivity improvement under high I/O load!
Quote:
|
Re: Massive interactivity improvement under high I/O load!
oooh boy, swap scripts! here is my swapswap script.
This script simply swaps the swap from one drive to the other. That means to 'refresh' the swap you would run it twice. The script is also able to automatically figure out which partition on the sdcard is the swap. It is partially based on a script suggested by 'whitewolf' in the 'swap on sd' thread. Code:
#!/bin/shya follow? I have the following script run at 0330 to refresh the swap space. Code:
#!/bin/sh |
Re: Massive interactivity improvement under high I/O load!
Quote:
Because that's where my swap is. Also, maemo renames mmcblk1 to mmcblk0 and other way around, but the old name sticks in some cases like iostat, but not swpon/swapoff. This script is most likely unusable for anyone else. I only put it up on request from someone, to show him how I did it. |
Re: Massive interactivity improvement under high I/O load!
I wasn't meaning to be rude, simply trying to understand it and modify it for my own purposes. I didn't realise that about iostat - thanks for the pointer. I can see it swapons the "backup" swap, swapoffs the "normal" swap, updates reswap.stat (although earlier on in the script it doesn't specifically look in /root), then swapons the "normal" swap again before a final swapoff of the "backup" - but then it swapons the "backup" again, which is the bit I'm confused about?
By the way, I really appreciate the charge script found elsewhere on that same site - it's excellent! Thanks :) |
Re: Massive interactivity improvement under high I/O load!
I hope you're using charge21.sh which is newest right now...
I always run it out of /root, so iconsistencies in relative vs absolute paths never hit me Additionally I have a script that I run on every boot, which among other things set reswap.stat to 0. mmcblk0p3 is normal emmc swap. mmcblk1p3 in iostat. mmcblk1p2 is microsd swap, mmcblk0p2 in iostat. I leave emmc swap on, it sits at lower priority anyway, so I only have to do a swapoff if I want to remove back cover. No other particular reason. At one point I probably had a swapon binary with priority support and had emmc+usd at equal priority, but then I concluded performance was nicer when swap was dedicated to usd. The general idea is indeed: swapon emmc, swapoff usd, swapon usd, swapoff emmc, swapon emmc. |
Re: Massive interactivity improvement under high I/O load!
Quote:
|
Re: Massive interactivity improvement under high I/O load!
Originally DocScrutinizer made a small script (it didn't work) prototype for charging without bme, probably intended as a prototype proof of concept for charging during hostmode operations. This was way before hostmode became working. I took the script and modified and built upon it (maybe 3 lines remaining from the original by now).
I had obtained a Mugen power battery and wanted to charge faster than bme. However, it turned out charging at higher rates produced almost exponentially more heat. So, I added thermal throttling to the charger, and was back at same rate. We had previously observed a somewhat non-ideal charge curve from bme, and thought running the hw charger would fix that. Turned out to be caused by non-zero resistance in the circuit board. Probably the only benefit is that you can charge without bme, and due to lack of checks, doesn't care about whether D+/D- is shorted or not. Might have side effect of frying USB ports on PCs, but I never myself charge from PC. I should probably put warning at the top if people have discovered its existance and randomly downloading it. |
Re: Massive interactivity improvement under high I/O load!
I am using the latest charge21.sh, thanks for the detailed description of what it does and why. By the way the iostat included in busybox after installing busybox-power, when using kernel-power 47 at least, doesn't switch mmcblk0 and 1 around (thus my initial confusion). It's still a useful script which I'll no doubt modify for my own purposes ;)
|
| All times are GMT. The time now is 20:05. |
vBulletin® Version 3.8.8