Active Topics

 



Notices


Reply
Thread Tools
Posts: 432 | Thanked: 917 times | Joined on Jun 2011
#51
Originally Posted by sixwheeledbeast View Post
@saponga
Just remembered I forgot to remind you that you have to change the shebang too. This is why the bash workaround failed.

Code:
##Replace bin/sh for bin/bash at the top of the script.
##Like...

#!/bin/bash

##Then run from terminal as "bash opt/... "


Let me know if you have any more trouble.
when i said that i was turning the script back to sh i was actually talking about the shebang... I've got it turned to bash, executed it using bash and then, like you ask, turned it back to sh and reboot. I'm just saying that because i don't know if it's important for debbuging.
Thanks... I really apreciatte your patience and sorry about this terrible english. I'm still learning.
 

The Following User Says Thank You to saponga For This Useful Post:
peterleinchen's Avatar
Posts: 4,118 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#52
Originally Posted by sixwheeledbeast View Post
The easiest way is to post the code.
Can't get lost in translation then.
BTW thanks.

Code:
...snip...
#Get Swap size from /proc/swaps
swapsize=$(awk '{if ($1=="'"/dev/$disk"'") print $3}' /proc/swaps)
#Divide by 1024 to get swap size in megabytes
swapsizembytes=$(($swapsize/1024))
...snip...
Here it is okay to divide by 1024
I spoke about getting number of blocks from /proc/diskstats. Each block is 512 bytes.
You have to divide by 2 to get kB.
And then of course by 2048 to get MB.
Code:
[B]umbytes=$(($ublocks/2048))
And forget about bytes and kbytes here.

To make it bullet proof:
Code:
echo $ublocks ublocks
#Multiply blocks by 512 to get used bytes
#ubytes=$(($ublocks*512))
#Calculate used bytes into Kb, Mb and Gb
echo $ubytes ubytes
#ukbytes=$(($ubytes/1024))
##ukbytes=$(($ublocks/2))
##umbytes=$(($ukbytes/1024))
umbytes=$(($ublocks/2048))
#ugbytes=$(($ubytes/1024/1024/1024))
ugbytes=$(($umbytes/1024))
And of course rely only on umbytes from this line on in your code (needs review which I did not do ).

Originally Posted by sixwheeledbeast View Post
I use my device heavily during work and only use my 800MB swap space in 4 days. It's possible due to "Swappolube" VM settings too.
I also use swappolube with (almost) default settings.

Originally Posted by sixwheeledbeast View Post
When/If someone gets to xyz uptime and it fails then this is a bug. No? I hate bugs however slight
Yes.
But it is unrealistic to think anyone will ever reach TB swap usage on N900, or? (remember the 2k date time problem? )
__________________
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; 2013-01-26 at 13:52.
 

The Following User Says Thank You to peterleinchen For This Useful Post:
Posts: 2,290 | Thanked: 4,134 times | Joined on Apr 2010 @ UK
#53
Originally Posted by peterleinchen View Post
But it is unrealistic to think anyone will ever reach TB swap usage on N900, or? (remember the 2k date time problem? )
OK so I have modified my flopswap "usedswap.sh" exactly like your code box above.

After two fresh swaps the tmp file has updated and it's now counting correctly.
I will test this for a while before making a new version.

Also I have found another small bug.
"Swap to device" changes values in the /tmp/ "counting" file, it shouldn't.
Currently if you use "swap to device" it will stop the swap used from working correctly.
I need to edit both "swap to device" and "used swap" scripts to stop monitoring swap while on the device swap space.

Expect a new release if all fixes above are positive.
__________________

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:
Posts: 2,290 | Thanked: 4,134 times | Joined on Apr 2010 @ UK
#54
Originally Posted by saponga View Post
Thanks man... I'll do that as soon as i could get a PC.
.
If you wish to test a beta version I'll package a deb for you now.
Check back I'll add it to this post.

Edit:-
TEMPORARY BETA VERSION AVAILABLE

* int32 workaround by peterleinchen
* Fix - stop calculation of device swap space (causes miscalculation)

Additional note:-
FlopSwap will not calcalute swap correctly if you have lobb-sided swap. You must use two equally sized swap spaces on your uSD.
Attached Files
File Type: deb flopswap_0.0.4r1b5_armel.deb (26.6 KB, 80 views)
__________________

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


Before posting or starting a thread please try this.

Last edited by sixwheeledbeast; 2013-01-26 at 15:44.
 
Posts: 432 | Thanked: 917 times | Joined on Jun 2011
#55
Originally Posted by sixwheeledbeast View Post
If you wish to test a beta version I'll package a deb for you now.
Check back I'll add it to this post.
Sure. BTW, reading the recent posts i just remembered that i got my SD removed (after properlly set swap to device) just few hours before i realize that bug. So, it could be related. I'm waiting for .deb.
Thanks.
 

The Following User Says Thank You to saponga For This Useful Post:
Posts: 535 | Thanked: 598 times | Joined on Apr 2011 @ Republic of the Philippines
#56
Hi sixwheeled!
I finally got a microSD card, sadly it's a Class 4 8GB (my wife bought it for her S3, I bought her a Class10 32GB as replacement for this one). Is it good enough?
I already partitioned it according to your instructions, will just install flopswap_0.0.4r1b5_armel.deb.
I'll give feedback once it's complete.
Thanks!
 

The Following User Says Thank You to vetsin For This Useful Post:
Posts: 2,290 | Thanked: 4,134 times | Joined on Apr 2010 @ UK
#57
Originally Posted by vetsin View Post
Hi sixwheeled!
I finally got a microSD card, sadly it's a Class 4 8GB (my wife bought it for her S3, I bought her a Class10 32GB as replacement for this one). Is it good enough?
I already partitioned it according to your instructions, will just install flopswap_0.0.4r1b5_armel.deb.
I'll give feedback once it's complete.
Thanks!
That's fine, make sure the swap partitions are of equal size and in the correct locations and all will be fine.
Thanks, hopefully I can get 0.0.5 in the newly fixed repos soon.
__________________

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 2 Users Say Thank You to sixwheeledbeast For This Useful Post:
Posts: 535 | Thanked: 598 times | Joined on Apr 2011 @ Republic of the Philippines
#58
Got it running on my N900.
I tried running OpenOffice and I can already see the improvement. My phone was usable while it was loading.
Regarding listening to 8tracks, flopswap did not make any remarkable improvement (or maybe it's because my card is too slow. hehe)
I will continue using Flopswap and I'll provide input when I got one. Thanks!

got to go to bed...
 
Posts: 2,290 | Thanked: 4,134 times | Joined on Apr 2010 @ UK
#59
Originally Posted by vetsin View Post
Got it running on my N900.
Regarding listening to 8tracks, flopswap did not make any remarkable improvement (or maybe it's because my card is too slow. hehe)
I will continue using Flopswap and I'll provide input when I got one.
Please note the main reason for Flopswap is to stop slowing down of swap (the system) over time, this isn't "extra RAM" or "make it faster" as such.

Check your Swap with "check status" and if recommended refresh it. This will stop swap fragmentation slowing your device down.
__________________

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:
Posts: 535 | Thanked: 598 times | Joined on Apr 2011 @ Republic of the Philippines
#60
Originally Posted by sixwheeledbeast View Post
Please note the main reason for Flopswap is to stop slowing down of swap (the system) over time, this isn't "extra RAM" or "make it faster" as such.
If what I see is placebo then I'm still good.
It's my first time swapping to SD and I read somewhere that it can help unclog internal flash i/o read/write traffic or something to that effect and I think that is what I'm observing.
The stuttering-while-listening-to-8tracks-while-doing-other-things seems to be due to cpu limit. I was looking at conky while testing and cpu usage was around 100 so moving swap to SD can't really help.
Thanks again for Flopswap and the wiki!
 

The Following User Says Thank You to vetsin For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 20:53.