OESF Portables Forum

Everything Else => Zaurus Distro Support and Discussion => Distros, Development, and Model Specific Forums => Archived Forums => Sharp ROMs => Topic started by: samxiao on March 30, 2005, 02:21:15 am

Title: Why Cacko Is So Slow?
Post by: samxiao on March 30, 2005, 02:21:15 am
i had use OZ, pdaXrom
and i found Cacko the slowest of all (maybe i'm using C700 ??   )

is there any way to speed this up?

any idea? suggestion?
Title: Why Cacko Is So Slow?
Post by: maslovsky on March 30, 2005, 08:08:38 am
Try adding 64 Mb a swap file on your SD card - you'll see the difference, especialy if you're using Korganizer PIMs.
Title: Why Cacko Is So Slow?
Post by: samxiao on March 30, 2005, 11:47:50 am
Quote
Try adding 64 Mb a swap file on your SD card - you'll see the difference, especialy if you're using Korganizer PIMs.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=72820\"][{POST_SNAPBACK}][/a][/div]


any tutorial for doing that?

i tried before
because i forgot to do fsck after reboot
it almost kill my SD
Title: Why Cacko Is So Slow?
Post by: Kodo on March 30, 2005, 01:24:35 pm
Quote
Quote
Try adding 64 Mb a swap file on your SD card - you'll see the difference, especialy if you're using Korganizer PIMs.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=72820\"][{POST_SNAPBACK}][/a][/div]


any tutorial for doing that?

i tried before
because i forgot to do fsck after reboot
it almost kill my SD
[div align=\"right\"][a href=\"index.php?act=findpost&pid=72844\"][{POST_SNAPBACK}][/a][/div]

Adding a large swap partition would really be the finest solution for many problems. Yet, I've heard rumours stating that flash cards can stand only a limited number of write operations before they report themselves as gone. Would anybody report about doing a swap-partition on a SD card, using it for a longer time, happily without the forementioned feared problem?  
Title: Why Cacko Is So Slow?
Post by: kahm on March 30, 2005, 02:10:59 pm
Quote
Adding a large swap partition would really be the finest solution for many problems. Yet, I've heard rumours stating that flash cards can stand only a limited number of write operations before they report themselves as gone. Would anybody report about doing a swap-partition on a SD card, using it for a longer time, happily without the forementioned feared problem? 
[div align=\"right\"][a href=\"index.php?act=findpost&pid=72853\"][{POST_SNAPBACK}][/a][/div]

Cards these days are good for ~100,000 writes per cell, and they have wear-leveling that spreads the writes out over they entire card. Last time I looked into this, in a worst case scenario with constant swap file use on a full card (eg: the swap file fills the card and you're basically using all of it), it was calculated that it could last a couple of days before dying.

That's an artificially high case, postulated by calculating the maximum numbers of writes the kernel *could* make that I got off an embedded linux mailing list a couple of years ago.

I had a friend who's a hardware tinkerer who didn't believe me when I told him using CF for swap was a bad idea so he did it anyway. He killed his CF card in 2 weeks. It was an older card so I don't know how many writes it already had on it. This was on a full sized PC he was using for a media center, using a CF card as a hard drive.

I've never used a flash device for swap myself - there are apparently plenty of people who use it on a regular basis without issue. I'd be tempted to swap on a cheap smaller capacity "disposable" card rather than my expensive 1gb cards. (For example - I picked up a few 64mb CF cards for ~$15 each the other day.)

Just keep in mind that eventually you *will* kill your cards if you're writing to them, no matter what. Swapping just happens to be a particularily write intensive operation. I would never recommend swapping to internal flash on your Z. Personally I make an effort to move any files that get written to (KO/Pi databases, datafiles, etc) to an external flash card to try and keep the internal flash on my Z healthy. This is one of the reasons that I'm looking forward to the 3000 - with it's nice and replaceable 4gb hard drive.
Title: Why Cacko Is So Slow?
Post by: Kodo on March 30, 2005, 03:39:54 pm
Thanks kahm, that was enlightening.  

Its easy to validate swap partitions as write intensive, considering that every running process may buffer its volatile data into it, refreshing it every now and then - when streaming encoded music, for example, this is happening in a rather high frequency, if part of it is decoded in your flash partition. So my guess is that the warning should be taken serious.  

On the other hand, if you are trying to do a memory intensive task, it could be the only way to activate a swap partition to get it done. Then one should not forget to erase the swap partition afterwards, since Cacko mounts any existing swaps at boot time and this could be forgotten easily.

A less critical way to poke some memory out of the Z is to stop the qeserver-threads when you actually don't need them (you will see which Qtopia programs run without them, once they are stopped). On my C700, I found this the only way to comfortably use zeditor and compile Java source with Kopi in QConsole at once. If you stop your running qeservers, however, you have to restart them with the zaurus user and qpe group as command line parameters, when you need them again:

Code: [Select]
$ qeserver zaurus qpe
If you need them for system administration tasks, like changing your tab configuration with the "Tab Setting" application, you should start a qeserver as root, but give it the same user and group parameters as shown above. Personally, I'm using a toggle script for this which can be triggered from a desktop icon.  
Title: Why Cacko Is So Slow?
Post by: craigtyson on March 30, 2005, 04:18:49 pm
OK if CF burns out what about SD?
Title: Why Cacko Is So Slow?
Post by: samxiao on March 30, 2005, 04:58:12 pm
Quote
OK if CF burns out what about SD?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=72873\"][{POST_SNAPBACK}][/a][/div]


but CF is not a good option for swap

because if you have a CF wifi (blame Sharp for not putting built-in wifi)
it will cause inconvience


so i will rather use SD

my Lexar has 5 yrs warranty

i guess it should be fine
Title: Why Cacko Is So Slow?
Post by: samxiao on March 30, 2005, 04:59:45 pm
Quote
Thanks kahm, that was enlightening.   

Its easy to validate swap partitions as write intensive, considering that every running process may buffer its volatile data into it, refreshing it every now and then - when streaming encoded music, for example, this is happening in a rather high frequency, if part of it is decoded in your flash partition. So my guess is that the warning should be taken serious.   

On the other hand, if you are trying to do a memory intensive task, it could be the only way to activate a swap partition to get it done. Then one should not forget to erase the swap partition afterwards, since Cacko mounts any existing swaps at boot time and this could be forgotten easily.

A less critical way to poke some memory out of the Z is to stop the qeserver-threads when you actually don't need them (you will see which Qtopia programs run without them, once they are stopped). On my C700, I found this the only way to comfortably use zeditor and compile Java source with Kopi in QConsole at once. If you stop your running qeservers, however, you have to restart them with the zaurus user and qpe group as command line parameters, when you need them again:

Code: [Select]
$ qeserver zaurus qpe
If you need them for system administration tasks, like changing your tab configuration with the "Tab Setting" application, you should start a qeserver as root, but give it the same user and group parameters as shown above. Personally, I'm using a toggle script for this which can be triggered from a desktop icon. 
[div align=\"right\"][a href=\"index.php?act=findpost&pid=72868\"][{POST_SNAPBACK}][/a][/div]


it's troublesome to turn off/on all the time

any automation script to do so?
Title: Why Cacko Is So Slow?
Post by: tg on March 30, 2005, 05:07:36 pm
Quote
Quote
Thanks kahm, that was enlightening.   

Its easy to validate swap partitions as write intensive, considering that every running process may buffer its volatile data into it, refreshing it every now and then - when streaming encoded music, for example, this is happening in a rather high frequency, if part of it is decoded in your flash partition. So my guess is that the warning should be taken serious.   

On the other hand, if you are trying to do a memory intensive task, it could be the only way to activate a swap partition to get it done. Then one should not forget to erase the swap partition afterwards, since Cacko mounts any existing swaps at boot time and this could be forgotten easily.

A less critical way to poke some memory out of the Z is to stop the qeserver-threads when you actually don't need them (you will see which Qtopia programs run without them, once they are stopped). On my C700, I found this the only way to comfortably use zeditor and compile Java source with Kopi in QConsole at once. If you stop your running qeservers, however, you have to restart them with the zaurus user and qpe group as command line parameters, when you need them again:

Code: [Select]
$ qeserver zaurus qpe
If you need them for system administration tasks, like changing your tab configuration with the "Tab Setting" application, you should start a qeserver as root, but give it the same user and group parameters as shown above. Personally, I'm using a toggle script for this which can be triggered from a desktop icon. 
[div align=\"right\"][{POST_SNAPBACK}][/a][/div] (http://index.php?act=findpost&pid=72868\")


it's troublesome to turn off/on all the time

any automation script to do so?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=72880\"][{POST_SNAPBACK}][/a][/div]


I have not tried it but maybe something like swapd is a better solution?

[a href=\"http://www.elsix.org/index.php?w=project&p=swapd]http://www.elsix.org/index.php?w=project&p=swapd[/url]
Title: Why Cacko Is So Slow?
Post by: ev1l on March 31, 2005, 08:02:19 pm
Cacko has a swap managing tab in the memory applet. It's a lot less trouble than most other solutions. Do suspend the Zaurus before ejecting the card, though, or you'll hate yourself on the next swap read/write, which will happen a couple of milliseconds later. Hello hardlock, how *you* doin'?
Title: Why Cacko Is So Slow?
Post by: maslovsky on April 01, 2005, 02:18:03 am
Quote
I have not tried it but maybe something like swapd is a better solution?

http://www.elsix.org/index.php?w=project&p=swapd (http://www.elsix.org/index.php?w=project&p=swapd)
[div align=\"right\"][a href=\"index.php?act=findpost&pid=72882\"][{POST_SNAPBACK}][/a][/div]

I tried it and it even works, but for some reason it slowed down Zaurus a lot. Probably due to constant free memory pooling. So I'm not using it now, instead I simply have a 128 Mb swap file on my SD card
Title: Why Cacko Is So Slow?
Post by: tovarish on April 01, 2005, 04:14:23 am
so how long will an sd card (on an average, say Sandisk 1gb) last if a swap file is activated in it. I do notice a difference between using swap and no swap but i dont want the card to die too soon and at a bad time.


tovarish
Title: Why Cacko Is So Slow?
Post by: maslovsky on April 01, 2005, 04:38:18 am
Quote
so how long will an sd card (on an average, say Sandisk 1gb) last if a swap file is activated in it. I do notice a difference between using swap and no swap but i dont want the card to die too soon and at a bad time.


tovarish
[div align=\"right\"][a href=\"index.php?act=findpost&pid=73098\"][{POST_SNAPBACK}][/a][/div]

I'd probably bet on a few years. I may be wrong, but I personaly don't care how much it will last
Title: Why Cacko Is So Slow?
Post by: pgas on April 01, 2005, 04:52:22 am
Note also that normally it should not kill the card, but rather "blocks of of the card".

So that if you have a partition for swap, in theory this partition will become unusable faster than the rest of the card but the card should still be usable.
Title: Why Cacko Is So Slow?
Post by: ev1l on April 01, 2005, 04:53:38 am
Quote
so how long will an sd card (on an average, say Sandisk 1gb) last if a swap file is activated in it. I do notice a difference between using swap and no swap but i dont want the card to die too soon and at a bad time.
I'd say a couple of years at least. Don't bother with very expensive SD cards, they die just as fast as the low capacity ones (well they can accept more writes because they have more cells, but at the same time that increases the probability and dying cells).
Title: Why Cacko Is So Slow?
Post by: kahm on April 01, 2005, 03:08:43 pm
Quote
Note also that normally it should not kill the card, but rather "blocks of of the card".

So that if you have a partition for swap, in theory this partition will become unusable faster than the rest of the card but the card should still be usable.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=73104\"][{POST_SNAPBACK}][/a][/div]

Flash cards have a wear-leveling algorithm that spreads writes across the entire card. (Or at least across free space on the card) So the writes to the swap are going to wear down cells all over the card. A larger card with more free space will likely last longer than a smaller card. It is definitely not going to be just one section of the card that gets worn out.

Theoretically, you should still be able to read data off of a dead card, but that is going to depend on how corrupt the filesystem becomes when the writes start failing. (A linux fs could proably be imaged with DD, loop-mounted on another system, and FSCK'd, but that is likely a post for a different topic.)