![]() |
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 ;)
|
Re: Massive interactivity improvement under high I/O load!
Just to clarify things, frying PC ports should not be an issue, due to ocervurrent protection implemented in most modern OS'es, be it any linux, windows,mac or whatever. Normal outcome would be N900 charging @ max 500 mA from USB port, or 1A from 2 ports using Y-cable. Worst case scenario should be temporaly disabling on-topic USB port by OS, shouting @ user that peripherial device exceed current limitation drain.
Of course all of this is unless there is some bug in overcurrent protection, that I'm not aware of (which got high chances to be the case), so use at Your own risk. Thanks for great scripts, shadowjediknight! :) |
Re: Massive interactivity improvement under high I/O load!
Lots of PCs lack adequate overcurrent protection...
I've seen one form where there's common overcurrent protection for several ports, so all ports go dead once protection kicks in. Worst case is weak protection that works more like a fuse, permanently killing the port (but saving the PC) The ideal is of course per-port resettable overcurrent protection, which notifies the OS on overcurrent condition. I have a powered USB hub myself that gives about 700mA to my N900. However, everything else connected to it dims... |
Re: Massive interactivity improvement under high I/O load!
That's exactly what happened to my previous laptop - all of the ports suddenly died, presumably because of a combination of 1 and 2. Not pretty.
|
Re: Massive interactivity improvement under high I/O load!
Thanks for the info... Fortunately, i got one with smart protection - otherwise i would screw it many years ago, when tried to check max port current with multimeter A measurement (which obviously made overcurrent prot. to go berseker - don't ask, it was one of most stupid ideas i had during my hardware modifications learning phase...). Fortunately, Os just shouted at me to get out with that, and disabled port until driver restart. Really good to know that there are fuse-based solutions still circulating...
By the way, out of curiosity - why everything else connected to that 700 mA port "dims"? Shouldn't peripheral things drain only as much as they need from port current "pool", so they don't care if port can provide 700 mA or 7A? |
Re: Massive interactivity improvement under high I/O load!
The charger chip in N900 happily operates at, for example, 4.5V input. The Hub's powersupply was unable to provide sufficient current, so voltage sagged to below 5V.
|
Re: Massive interactivity improvement under high I/O load!
Looks like changing those values messes up pc suite file browsing + mass storage mode for windows
|
| All times are GMT. The time now is 20:05. |
vBulletin® Version 3.8.8