Notices


Reply
Thread Tools
Posts: 3,328 | Thanked: 4,476 times | Joined on May 2011 @ Poland
#281
Originally Posted by peterleinchen View Post
You should extend your swap partitions to at least (my use case) double size, so 1,5GB each. If I would have a 64 card I would use 2x 3GB!
This lessens the number of swap refresh actions (or extends time between those) where each refresh is doing read/write task on SD nd is CPU consuming,...
Any other benefit of bigger swaps? I have a 32G card.
__________________
If you want to support my work, you can donate by PayPal or Flattr

Projects no longer actively developed: here
 
Posts: 2,290 | Thanked: 4,133 times | Joined on Apr 2010 @ UK
#282
Originally Posted by ste-phan View Post
Reformatted and it worked: flopswap detected the swap partitions.

Then I decided to torture test swap and started by opening aplication manager: spontaneous reboot -> no more applications listed in application manager
Well no applications in HAM is normalish behaviour in that situation, it was more than likely trying to repair itself which can take a while.

Originally Posted by ste-phan View Post
This was an annoying as I had the option "use external swap on boot" checked and forgotten through previous attempts, so the device kept booting using an easily corruptible swap.
Are people happy with this option checked at default?
You see it seems to be a common question that flopswap was not working due to this not being enabled as default.
I do feel it's better being checked as default, if there are no extermal partitions available, the upstart script will fail and fallback to device swap only.
The only reason you had an issue was because the external partitions were available but corrupt, flopswap can't know that.

Originally Posted by ste-phan View Post
Here is the result of the above code sequence, for anyone interested (of course now with swap on device):
That all seems fine, it seems you have "External swap option disabled at the moment but when you have your card sorted again. Check the "Use External swap on boot" button and all will be fine.

Originally Posted by peterleinchen View Post
You should extend your swap partitions to at least (my use case) double size, so 1,5GB each. If I would have a 64 card I would use 2x 3GB!
This lessens the number of swap refresh actions (or extends time between those) where each refresh is doing read/write task on SD nd is CPU consuming,...
I wouldn't necessarily agree.
Swaps that are excessively larger than RAM are pointless.
Yes, it will take longer before swap fragmentation occurs but the swap space is never going to be used correctly.
The aim of memory is to try and keep as much of it as possible in RAM, so we can do tasks quickly without having to resort to using swap. Obviously there is not enough RAM in our N900's to cope with our multitasking needs.
I would say 800Mb is the correct balance of having enough swap for the device to use and keeping as much space available for storage.
I wouldn't recommend anything lower than the stock swap size of 768Mb or anything higher than 1536Mb (double stock). There is no point if you are going to refresh the swap every night. I can last two days before I need to refresh (on 800Mb); with pretty heavy phone, browser and mediaplayer usage. Also a correctly balanced swapiness has a part to play in this.
__________________

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.
 

The Following 3 Users Say Thank You to sixwheeledbeast For This Useful Post:
ste-phan's Avatar
Posts: 1,195 | Thanked: 2,708 times | Joined on Jan 2010 @ Hanoi
#283
Originally Posted by peterleinchen View Post
You should extend your swap partitions to at least (my use case) double size, so 1,5GB each. If I would have a 64 card I would use 2x 3GB!
This lessens the number of swap refresh actions (or extends time between those) where each refresh is doing read/write task on SD nd is CPU consuming,...
Hehe, thanks for the advice, as it happens I was just formatting one card with 2 x 1,5GB, will report if I notice improvement.

Edit: now I remember that in the past I had setup a manual swap partition on the whole 8GB Sandisk SD card, it did not improve anything, on the contrary, I felt the SD card by Sandisk performed sub par so now that I have found a no brand "Intuix" from Taiwan that looks promising I am testing again..

One thing I noticed: aplication manager got much faster (less running wheel time) by inserting this Intuix card compared to none inserted at all. How I can't explain.

Last edited by ste-phan; 2014-10-22 at 16:38.
 
pichlo's Avatar
Posts: 6,445 | Thanked: 20,981 times | Joined on Sep 2012 @ UK
#284
Originally Posted by ste-phan View Post
Thank you for your suggestion! It seemed my card (Sandisk) was corrupt

First I rechecked with GParted and noticed two exclamation marks near the swap partitions on the Swap partition.
Reformatted and it worked: flopswap detected the swap partitions.

Then I decided to torture test swap and started by opening aplication manager: spontaneous reboot -> no more applications listed in application manager

The device started to behave erratically and reboot and again-> next reboot I rushed to FlopSwap to move swap back to device!
That sounds like your SD card may be worse than corrupted - it may be fake. I've had quite a few of those. So many in fact that the first thing I do now whenever I buy a new SD card is fill it to the brim with large files, unplugging the card (to purge any FS cache), plugging it in again and reading the files back.

Quite a few cards I've had let you write e.g. 32GB worth of files without a blink, but when you try reading them back as per above, you find that anything written beyond let's say the 8GB mark reads back as all 0 (or all FF, depending on the card).
 

The Following 2 Users Say Thank You to pichlo For This Useful Post:
ste-phan's Avatar
Posts: 1,195 | Thanked: 2,708 times | Joined on Jan 2010 @ Hanoi
#285
Originally Posted by pichlo View Post
That sounds like your SD card may be worse than corrupted - it may be fake. I've had quite a few of those. So many in fact that the first thing I do now whenever I buy a new SD card is fill it to the brim with large files, unplugging the card (to purge any FS cache), plugging it in again and reading the files back.

Quite a few cards I've had let you write e.g. 32GB worth of files without a blink, but when you try reading them back as per above, you find that anything written beyond let's say the 8GB mark reads back as all 0 (or all FF, depending on the card).

Thanks for the advice, that could well be the case. It was a Sandisc 64GB Ultra micro SDXC Class 10, purchased through Amazon Germany directly but it came in a cardboard box, not the shiny retail flap packaging.

It is a tricky one: as it works somewhat. But the failure already starts at 3GB writing. Smart counterfeiters would allow you to write the first 16GB w/o issue I suppose?

I still have the invoice, I will try to RMA it and follow your advice to report to Sandisk help desk.



Edit: I just wanted to conclude, all is good with other SD Card, script works good.

Previous report on subjective performance with 2 x 800 MB Swaps already dropped off the screen so I post it here one more time.

so I pushed the system a little bit and experience reasonable responsability, virtually unstuttering audio stream, workable front view and modrana.

Kept SD Swap partiiton 1 active.
Untill FlowSwap info said Fresh Swap Recommended
Used 1497 MB , 196% of 763MB
Conky reported about 300- 400 MB Swap used

Swapping partitions took a while!

-Conky
-five MicroB windows
-file manager
-internet radio over bluetooth
-Orechiette
-Xournal
-Frontview (still able to scan and size an image)
-Modrana
-WifiEye
-Sketch
-Cutetube
-Image Gallery
-Phone

Last edited by ste-phan; 2014-10-22 at 17:01.
 
peterleinchen's Avatar
Posts: 4,117 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#286
About swap size (just my personal 2 cents):
I have 2x.1.5GB. And I sometimes get into trouble after some longer uptime that my personal swap refresh script bites two/three times a day. And that sucks as it really slugs it down.
In general sixwheelebeast is right about swap size. But with our small amount of RAM a lot of swap is needed.
It surely depends on setup and how many daemons running and so on. Furthermore I am completely on devel repo.
My swap usage (/proc/swaps) tells me sometimes over 450MB actively used.

If you have a normal usage pattern, 800MB may be enough. But this is just default size. It may be enough for a day (for me not, depending on run time and usage) but it will need an every night swap refresh. Which I would like to avoid as this is also heavily wearing the flash (and I have data too on SD card, not to loose)
I have set my 'daemon' to check written swap amount once in the night and only refresh when more than 55% (configurable) already used up.

So if I had a bigger SD (now still just 16) I would go even higher, 2 x.3 GB even that would not make really sense regarding memory usage, but for my use case yes. And it does not hurt.
Btw I am using default swappiness settings from swappolube.

That's all?
Amen.
__________________
SIM-Switcher, automated SIM switching with a Double (Dual) SIM adapter
--
Thank you all for voting me into the Community Council 2014-2016!

Please consider your membership / supporting Maemo e.V. and help to spread this by following/copying this link to your TMO signature:
[MC eV] Maemo Community eV membership application, http://talk.maemo.org/showthread.php?t=94257

editsignature, http://talk.maemo.org/profile.php?do=editsignature
 
Posts: 2,290 | Thanked: 4,133 times | Joined on Apr 2010 @ UK
#287
Previous report on subjective performance with 2 x 800 MB Swaps already dropped off the screen so I post it here one more time.

Kept SD Swap partiiton 1 active.
Untill FlowSwap info said Fresh Swap Recommended
Used 1497 MB , 196% of 763MB
Conky reported about 300- 400 MB Swap used

Swapping partitions took a while!
[/QUOTE]

It seems your swap partition is smaller than the stock size.
My partitions are reported as 799Mb with flopswap, they where formatted to 800Mb with GParted.

Originally Posted by peterleinchen View Post
About swap size (just my personal 2 cents):
I have 2x.1.5GB. And I sometimes get into trouble after some longer uptime that my personal swap refresh script bites two/three times a day. And that sucks as it really slugs it down.
In general sixwheelebeast is right about swap size. But with our small amount of RAM a lot of swap is needed.
It surely depends on setup and how many daemons running and so on. Furthermore I am completely on devel repo.
My swap usage (/proc/swaps) tells me sometimes over 450MB actively used.

If you have a normal usage pattern, 800MB may be enough. But this is just default size. It may be enough for a day (for me not, depending on run time and usage) but it will need an every night swap refresh. Which I would like to avoid as this is also heavily wearing the flash (and I have data too on SD card, not to loose)
Well flopswap is designed to significantly reduce flash wear on the non-replacable eMMC, I understand you wish to reduce wear on the uSD too.
I can't see it wearing out much quicker due to the way flopswap works. You see flopswap switches (flops ) between swap spaces so this is only one write cycle; halfing the conventional swapon2/off1/on1/off2 method. I am sure you are already aware of this, and the reason behind designing flopswap my own way and not using other swap management tools.
In addition a larger swap space would mean potentially more swap to move (write) during a swap refresh. In an example say moving 200Mb of swap about every day, compared to 700Mb every three days, the latter would be more writes to flash.

I can tell you have thought about your own usage and found a solution to suit yourself. I have obviously aimed flopswap at the masses with 'suits all' recommended values for people to use.

You seem to use an extremely large amount of swap, I can only imagine you have lots of daemons and programs running while using your device, in this case it maybe a good idea to have a play with some swappolube settings.
__________________

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.
 

The Following User Says Thank You to sixwheeledbeast For This Useful Post:
peterleinchen's Avatar
Posts: 4,117 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#288
Yep, exactly.
I do also swapon2/swapoff1 only of course.

But swapped/flopped/moved is always (only) the currently used amount of swap memory (so maybe just 150MB or 200 or in my case max 450). But never more. So if I reduce the refresh actions I reduce the amount of write cycles on flash, right? [so your example with 200/day vs 700/3days do not match, afaiu]

Do not get me wrong, I like flopswap and want to help make it better from the beginning (I have no intention to release a third/fourth swap refresh tool )
__________________
SIM-Switcher, automated SIM switching with a Double (Dual) SIM adapter
--
Thank you all for voting me into the Community Council 2014-2016!

Please consider your membership / supporting Maemo e.V. and help to spread this by following/copying this link to your TMO signature:
[MC eV] Maemo Community eV membership application, http://talk.maemo.org/showthread.php?t=94257

editsignature, http://talk.maemo.org/profile.php?do=editsignature

Last edited by peterleinchen; 2014-10-23 at 07:10.
 

The Following User Says Thank You to peterleinchen For This Useful Post:
Posts: 2,290 | Thanked: 4,133 times | Joined on Apr 2010 @ UK
#289
Originally Posted by peterleinchen View Post
swapped/flopped/moved is always (only) the currently used amount of swap memory (so maybe just 150MB or 200 or in my case max 450). But never more. So if I reduce the refresh actions I reduce the amount of write cycles on flash, right? [so your example with 200/day vs 700/3days do not match, afaiu]
The point I was making is it would be down to a lot of variables. If the system has most of it's RAM used and a large swap space it could be moving large amounts of swap as per my example.
It would depend on your swappiness and load at the time of swapping.
If you think about it you are writing to swap a lot with your usage anyway is switching swap only a "pee in the ocean" compared?
Then again I have never done any back to back testing. I'd find having any more than 2x800Mb would be a waste of valuable card space. I have all of my data on the card and backed up with rsync to a desktop.

Originally Posted by peterleinchen View Post
Do not get me wrong, I like flopswap and want to help make it better from the beginning (I have no intention to release a third/fourth swap refresh tool )
Thank you. Your help so far as been much appreciated, especially regarding the int32 issue I had.
You could use flopswap in the way you do (swapping less often with larger swaps), other than the fact there is no daemon, it is similar in GUI form. It is flexible in that way.
__________________

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.
 

The Following User Says Thank You to sixwheeledbeast For This Useful Post:
ste-phan's Avatar
Posts: 1,195 | Thanked: 2,708 times | Joined on Jan 2010 @ Hanoi
#290
So here is what works for my user case:

-1,5 GB: It is the easiest way to have the device ultimately become unresponsive. I remember assigning full 8GB swaps to a dedicated SD card to yield the same effect about 2 years ago. I wished this to be the best performance scenario $$ SD space in exchange for better performance but without deeper tweaking it isn't for me.

Probably it is so that the more programs are invited to concurrently writing larger chunks of data to this swap, the slower the device is getting?

-800 MB, ok a little less MB -> remains pretty responsive (see video)

-512 MB (pre cheap RAM Linux rule of thumb swap size) also works well: so far I can see no disadvantage compared to the larger stock size swap.

Video:


on the background the device is receiving a 3GB MP3 from a computer over BT, while playing an internet radio stream to a BT speaker while all at the same time recording this stream to a WAV file on the SD card's first data partition.

This should simulate a realistic load scenario for the SD card that concurrently serves as swap disks but also as data storage.

Feel free to comment if the performance is in line of what to expect from the N900 in this scenario.

Last edited by ste-phan; 2014-10-24 at 06:25.
 

The Following 9 Users Say Thank You to ste-phan For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 12:32.