Reply
Thread Tools
Posts: 3,328 | Thanked: 4,476 times | Joined on May 2011 @ Poland
#201
Reboot and try whether it helps. Period.
__________________
If you want to support my work, you can donate by PayPal or Flattr

Projects no longer actively developed: here
 
Posts: 169 | Thanked: 83 times | Joined on Dec 2009
#202
rebooting helps. The point is, I don't think I should have to reboot every couple of days for the phone to remain usable. Others on here have reported going weeks or months without problems.
 
Posts: 958 | Thanked: 483 times | Joined on May 2010
#203
i have another friend that i compare notes with and this is what we have discovered.

the point about 'going weeks or months without problems' depends very much on how heavy a user you are. my friend is a very light user. when i checked his swap usage and compared it to mine, mine was 6 times as heavy in swap usage as his. as a result, i found my phone to be more sluggish than his after 2 weeks of uptime.

rebooting every couple of days means you are a heavy user. by heavy user i mean you run a number of memory heavy apps (such as web) frequently. and 'frequently' means enough for swap space to be used quite a bit and become fragmented.

in my case, i am a very heavy user. microb and opera at least 6-10 times a day on separate ocassions. each time i'm done, i close those apps. x-term a couple of times, sms, phone, etc. all these add up to heavy swap usage.

i now have a script that runs at 5am to defragment the swap devices and my phone feels like it's after a fresh reboot even after 2 weeks of uptime with MY usage pattern.
 

The Following User Says Thank You to droll For This Useful Post:
Posts: 958 | Thanked: 483 times | Joined on May 2010
#204
the other thing to remember is: what is slow / sluggish to you?

since you have mentioned a reboot helps, i'm assuming the problem is due to swap fragmentation.
 
Posts: 172 | Thanked: 98 times | Joined on Aug 2010 @ Forest of Dean, England.
#205
My N900 is fast (compared to a 1.4ghz Android phone), but every device, user, their installed apps and the pattern of usage is different.

Some devices respond well to speedpatch, some dont and some devices need a reboot every few days.

Thats just the way it is. The N900 is one of the fastest easiest devices to reboot so I dont know why people have such a problem doing it.

xterm > root > reboot. Done OR If you are clever like Droll write yourself a script!
__________________
My N900 LCD REPLACEMENT VIDEO
----------------------------
N900 @ 1ghz....keeps me warm in winter

PICTURES TAKEN WITH MY N900
 

The Following User Says Thank You to thebtman For This Useful Post:
Posts: 346 | Thanked: 271 times | Joined on Jan 2010
#206
My swap defrag script:
Code:
#!/bin/sh
INTERNALSWAP=/dev/mmcblk0p3
MMCSWAP=/dev/mmcblk1p2 # microSD partition 2 (swap)
if [ ! -b "$MMCSWAP" ]; then
        exit 1
fi
DATE="$(date)"
BEFORE="$(free)"
swapon "$MMCSWAP"
swapoff "$INTERNALSWAP"
swapon "$INTERNALSWAP"
swapoff "$MMCSWAP"

# Make the phone temporally unlock, cause Xorg unswapping,
# avoid the device to be sluggish in the first seconds of use
# Comment out if you don't like it
dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_tklock_mode_change string:unlocked
sleep 1
# disable the backlight
echo 0 > /sys/class/backlight/acx565akm/brightness
sleep 10
AFTER="$(free)"

# Save stats to /tmp/swapdefrag
cat >> /tmp/swapdefrag << EOF
$DATE

Before:
$BEFORE

After:
$AFTER

EOF
You need to create a second swap partition in order to use it
Adapt it to your needs and run it as a daily task at ~4am
with cron/alarmed/whatever

Last edited by Megaltariak; 2012-01-25 at 18:00. Reason: Added a missing > and more comments
 

The Following 3 Users Say Thank You to Megaltariak For This Useful Post:
Posts: 958 | Thanked: 483 times | Joined on May 2010
#207
yes, you need 2 swap partitions to do it. in my case, i made a few tweaks that are different from Megaltariak's.

i stripe the swap usage across 2 partitions with equal priority. some say it doesn't make much difference and may slow the phone down because the internal emmc is already heavily loaded by disk io. i did some tests and found that in my case (with my n900 and the apps i installed plus the way i use it), striping the swap actually helps. phone is noticeably more responsive under heavy memory pressure.

secondly, i only defrag when total swap space written (not used) has reached around 600mb. taking into account the max default swap size is 768mb, 600mb is a pretty safe threshold.

but the solution above ignores all that and simply defrags everyday, which would also work. try it and see, you should notice a difference in the n900's responsiveness.
 
Posts: 172 | Thanked: 98 times | Joined on Aug 2010 @ Forest of Dean, England.
#208
Originally Posted by Megaltariak View Post
My swap defrag script:
Code:
#!/bin/sh
INTERNALSWAP=/dev/mmcblk0p3
MMCSWAP=/dev/mmcblk1p2 # microSD partition 2 (swap)
if [ ! -b "$MMCSWAP" ]; then
        exit 1
fi
DATE="$(date)"
BEFORE="$(free)"
swapon "$MMCSWAP"
swapoff "$INTERNALSWAP"
swapon "$INTERNALSWAP"
swapoff "$MMCSWAP"

# Cause Xorg unswapping, avoid the device to be sluggish the first seconds of use, comment out if you don't like
dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_tklock_mode_change string:unlocked
sleep 1
# disable the backlight
echo 0 > /sys/class/backlight/acx565akm/brightness
sleep 10
AFTER="$(free)"
cat > /tmp/swapdefrag << EOF
$DATE

Before:
$BEFORE

After:
$AFTER

EOF
You need to create a second swap partition in order to use it
Adapt it to your needs and run it as a daily task at ~4am
with cron/alarmed/whatever
Great script.

Not wanting to hijack...but could you perhaps explain how to do this?
__________________
My N900 LCD REPLACEMENT VIDEO
----------------------------
N900 @ 1ghz....keeps me warm in winter

PICTURES TAKEN WITH MY N900
 
Posts: 346 | Thanked: 271 times | Joined on Jan 2010
#209
To create the swap partition , make a backup of your microSD data first, the easier way is to use gparted on a Linux pc and create a swap partition on the microSD, you can even do it from your N900 if you have easy debian installed in MyDocs (internal memory)

Save the script in /usr/sbin/swapdefrag

Then chmod it:
chmod a+x /usr/sbin/swapdefrag

Install alarmed and make a task running each day:
sudo swapdefrag
You can check the effect on memory and swap by checking the /tmp/swapdefrag file
 

The Following User Says Thank You to Megaltariak For This Useful Post:
Posts: 958 | Thanked: 483 times | Joined on May 2010
#210
don't forget to mount the swap partition at startup too.

http://wiki.maemo.org/Swap_on_microSD

but becareful, with swap on microsd, removing the back cover automatically unmounts the microsd and would cause the n900 to most likely reboot.
 

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

Tags
you're a mess


 
Forum Jump


All times are GMT. The time now is 01:06.