maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   [DISCUSS] SDCard Swap Partition Methods.. (https://talk.maemo.org/showthread.php?t=84296)

[DarkGUNMAN] 2012-05-16 07:04

[DISCUSS] SDCard Swap Partition Methods..
 
This is relevant to Easy Debian and general faster operation of maemo, so I thought this needed a separate thread in order to discuss the best methods..

I have been reading about using SDCard partition for swap in
the Easy Debian Thread - http://talk.maemo.org/showthread.php?t=34550&page=271

Based of what I have seen, there are some tweaks by freemangordon and Estel tweaking overall swap settings I'd like to make permanent.
I'd also like to apply the SDCard swap during startup

What is the best method for this? Is it better to create a startup script in /etc/event.d, or is there an existing file to modify?
If so - how do you apply the changes?

Is striping swap across sdcard and emmc the best method, or is single swap on sdcard the better way to go?

Estel 2012-05-16 07:29

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Single swap on SD card is definitely better way to go, as it don't create I/O conflicts between Maemo /home/ and swap. It's even better than stripping swap between eMMc and SD card - speed benefits are quite a myth, as conflicts eat any benefit + add overhead (flash media doesn't handle many independent request very efficiently).

As for method of setting it permanently - script in /etc/event.d isn't bad thing - especially, that in case of problems, there are methods (haven't tried myself) to delay executing such scripts. Ho ever, it makes boot slower, as - technically - Maemo first enable eMMC swap, then, due to our script, enable SD swap and disable eMMC swap. It's unnecessary operation.

So, best way, if You're absolutely sure that it's what You want, is to edit /etc/event.d/rcS-late, replacing line:
Code:

swapon -a
...with

Code:

swapon /dev/mmcblk1p2
...if Your swap partition is 2nd partition on SD card. In other case, modify /dev/mmcblk*p* accordingly, replacing * with correct numbers.

This way, swap on microSD is enabled during boot process without any additional overhead, and eMMC swap partition isn't used at all. You may reclaim it's space by repartitioning, or keep it as backup solution (I keep 100 MB backup swap on eMMC for purpose of "refreshing" swap partition, which I'll elaborate more later).

As for swap settings mentioned in thread linked in 1st post, [b]freemangordon[/]'s ones are surely more bleeding-edge - mine are more similar to stock settings, yet I'm very satisfied with results (I'm trying to find balance between freemangordon's ones and stock ones, and it seems to be that). Most of things set there can be edited by swappolube, although, not all of them. Remember, that setting them via echo modify it only until next reboot - to set it permanently, one should add it to some script in /etc/event.d/ (setting it here is much faster than enabling&disabling swap, so difference in booting time shouldn't be noticed), or do ti exactly as swappolube does it (how?).

That's the basics. Very important thing is preventing swap fragmentation via swap reflesh - I've modified shadowjk's scripts to make it bulletproof solution, and liked to publish it long time ago - well, IU hoped for doing it convenient way via a repos, but publishing here for pre-audit may be a good idea.

I'll post it and elaborate more about it on later time.

/Estel

ivgalvez 2012-05-16 10:10

Re: [DISCUSS] SDCard Swap Partition Methods..
 
That would be a good option to add to Swappolluble so you can enable/disable swap on any existing partition from the UI.

vi_ 2012-05-16 11:06

Re: [DISCUSS] SDCard Swap Partition Methods..
 
It should be noted that if you do put swap on SD that you can under no circumstance take the back cover off when the swap is mounted on the SD. When you do this the MMC is insta-umounted with respect to no man.

To remove the back cover without moving swap back to emmc is like pulling a RAM chip from a running PC but worse. I have destroyed entire SD cards and completely corrupted my emmc beyond backup menus help by doing this.

It believe it is entirely possible to create a 'swapon SD/swapoff SD' entry in power menu 'systemui.xml' just by adding a few lines just like phone/tablet mode button thing.

Megaltariak 2012-05-16 11:37

Re: [DISCUSS] SDCard Swap Partition Methods..
 
About this: does someone know if this is done on the hardware side, or by the kernel (would be patchable) ?

And also what is the point of such behaviour: if at least the microsd was propely unmounted, that would be understandable, but that's not the case if I remember correctly.

Estel 2012-05-16 11:45

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Agree with vi_, + there is simple workaround, allowing to both have swap on microSD *and* ability to remove backcover - glue small magnet on place, where sensor expect it. It doesn't require *any* hardware skills, and works great. I'm using it for ages.

Of course, if You do so, never ever take out Your SD card without unmounting it (=also set swap somewhere else, at least temporal), but if You're messing with such settings as proposed in this thread, You know it already.

/Estel

mr_pingu 2012-05-16 22:45

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Estel, I would be interested in your defragmentation script ;) Also, swappolube creates a file in event.d called tuning, in case you didn't found out already ;)

Are the proposed settings really the best? I found swapiness to 50 work better when receiving calls than set 30 rest I use proposed and a part of your settings found in ED thread.

Hurrian 2012-05-17 09:21

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Quote:

Originally Posted by Estel (Post 1207247)
So, best way, if You're absolutely sure that it's what You want, is to edit /etc/event.d/rcS-late, replacing line:
Code:

swapon -a
...with

Code:

swapon /dev/mmcblk1p2

This is kinda risky - if you ever forget that the N900 now depends on a microsd on a specific partition for Swap, Maemo will start *****ing about not enough memory (not true, can launch xterm).

A better solution would be to replace swapon -a with the 'swapmicro' script posted somewhere here on TMO, which detects swap partitions on the microsd, and if it is available, uses that and doesnt bother with emmc. Otherwise, if there's no swap on microsd, it simply runs swapon -a.

I'll post my edits to rcS-late when I get back home.

Mohammed Muid 2012-05-17 09:35

Re: [DISCUSS] SDCard Swap Partition Methods..
 
is it possible we can get more ram from 256 physical ram. I only get 46 percent available. I hav a galaxy s i9000 and i previously used to get 256 out of 512 by trying differnet kernel. Then i got 409.

peterleinchen 2012-05-17 10:43

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Quote:

Originally Posted by Hurrian (Post 1207737)
This is kinda risky - if you ever forget that the N900 now depends on a microsd on a specific partition for Swap, Maemo will start *****ing about not enough memory (not true, can launch xterm).

That is absolutely true.
And editing critical system files may bail out a few noob's N900 ;)

I do use a different approach:
put a script in event.d,
that checks for existence of my swap file (yes, I do use a swap file on standard vFAT SD partition (too lazy for repartitioning)), could also check for existence of partition.
then enable the swap as loopback device with higher priority (using bb power's swapon or also possible debians swapon). This way at startup eMMC swap is used, around 4-5MB, and then swap only on SD.
If you want to cleanup swap, just 'swapoff mmc' and it uses eMMC swap. If I want to use again swap on SD, just enable it with higher priority 'swapon mmc -p 0'. This assures also that swap is available even no or another SD is available.

As my script is highly customized to my needs ( starting python maps server, mounting maps in a loopback file, checking for other stuff) I am not going to post it here (in its current state) ...

I am not sure that using loopback as swap is faster (better) than using eMMC swap, but as there are no tools yet to confirm, it is just subjective opinion.

BertvanDorp 2012-05-17 13:07

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Maybe I've overlooked information and/or threads on here, but a couple of weeks back I did a reflash and decided on spending max. 2 hours on running the swap on the microSD. Bottomline, I couldn't find a helpful guide and/or tools to achieve this so I gave up. If the result of this thread would be a comprehensive guide, working for most users, I would be really glad!

Estel 2012-05-18 05:14

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Quote:

Originally Posted by Hurrian (Post 1207737)

A better solution would be to replace swapon -a with the 'swapmicro' script posted somewhere here on TMO, which detects swap partitions on the microsd, and if it is available, uses that and doesnt bother with emmc. Otherwise, if there's no swap on microsd, it simply runs swapon -a.

I'll post my edits to rcS-late when I get back home.

It's very good idea - I will gladly use it myself, sounds like best bullet-proof solution for this.

@peterleinchen
As I've written, way of doing ti via /etc/event.d/ script isn't bad at all, but it got one drawback - boot time is considerably slower, as Maemo need to enable eMMC swap first, then, via Your script, enable microSd swap, and disable eMMC swap. As - at this point - some thing are already swapped (most likely, You run event.d scripts after starting hildon-desktop), they need to be moved from eMMC swpa to microSD swap.

As for using microSD swap together with eMMC swap, I don't recommend it, even with higher priority for microSD swap - it's still "in use", which creates (less, but still), I/O rade with things from optFS. Also, I'm quite sure, that using loopback file for swap is considerably slower than native swap - as it's with ED loopback image or native partition.

@BertvanDorp
5 minutes guide to using swap on microSD:

1. Reformat microSD card to contain linux type swap partition, by any tool You prefer (linuxbox/linux LiveCD via GUI tools, or on-device via command line, or on-device via Easy Debian with GUI tools, or...).

For this example, we assume You got 2 partitions on microSd card - first one is regular vfat, and 2nd one is linuxswap.

2. Use any method mentione din this thread to make device into using swap on /dev/mmcblk1p2 (you can edit /etc/event.d/rcS-late as suggested by me, or prepare script put into /etc/event.d folder, or wait for Hurrian to post his script and mix it with my way, or...).

You're done.

/Estel

Mohammed Muid 2012-05-18 05:40

Re: [DISCUSS] SDCard Swap Partition Methods..
 
how to increase available ram? cant we get atleast 200 from 256?

vi_ 2012-05-18 06:22

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Quote:

Originally Posted by Mohammed Muid (Post 1208389)
how to increase available ram? cant we get atleast 200 from 256?

o0

Dafuq?

I don't think you understand what RAM is, what RAM is for or indeed how it is utilised under linux.

Mohammed Muid 2012-05-18 07:14

Re: [DISCUSS] SDCard Swap Partition Methods..
 
listen. I know that u have knowledge on these bt android also has a linux base kernel. Flashing differnet kernel increases the available RAM. I have a galaxy s. When i first bought it it had 356md RAM free out of 486. Then i rooted my device. Flashed some custom ROM and kernel. And installed some tweaks. Now i get 412 available which obviously makes my device faster.

Estel 2012-05-18 07:26

Re: [DISCUSS] SDCard Swap Partition Methods..
 
No. It doesn't. Really, just trust me on that (tm). And see this:
http://en.wikipedia.org/wiki/Random-access_memory

http://ffhacktics.com/smf/index.php?...ach=5741;image

MaddogG 2012-05-18 08:32

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Quote:

Originally Posted by Estel (Post 1207247)
So, best way, if You're absolutely sure that it's what You want, is to edit /etc/event.d/rcS-late, replacing line:
Code:

swapon -a
...with

Code:

swapon /dev/mmcblk1p2

Or, you can try swapset. I use it and it works pretty fine.

misiak 2012-05-18 09:49

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Quote:

Originally Posted by Mohammed Muid (Post 1208389)
how to increase available ram? cant we get atleast 200 from 256?

kill Xorg, run everything in text mode :D

Hurrian 2012-05-18 13:04

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Code:

    cmp -s $tmp_fstab $fstab || cp $tmp_fstab $fstab
    rm -f $tmp_fstab

    if [ $ACT_DEAD -eq 0 ]; then
      drivelist=$(sfdisk -lndq /dev/mmcblk1)
      swapmicro=$(echo "$drivelist" -n | grep Id=82 | awk '/mmcblk1/ {print $1}')
      if [ "$swapmicro" ]; then
        /sbin/swapon $swapmicro
      else
        /sbin/swapon -a
      fi
      # Setup lowmem module
      echo 32768  > /proc/sys/vm/lowmem_deny_watermark_pages
      echo 98304  > /proc/sys/vm/lowmem_notify_high_pages
      echo 131072 > /proc/sys/vm/lowmem_notify_low_pages
      echo 1024  > /proc/sys/vm/lowmem_nr_decay_pages
      # Exclude some UIDs from memory allocation denial.
      # 30000 is messagebus, 30001 could be used by Matchbox
      echo "30000 30001 30002 30003" > /proc/sys/vm/lowmem_allowed_uids
    fi

    mount_home && HOME_MOUNTED=1

As promised, here's the modification to /etc/event.d/rcS-late.

stlpaul 2012-05-18 16:50

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Quote:

Originally Posted by Mohammed Muid (Post 1208389)
how to increase available ram? cant we get atleast 200 from 256?

Free RAM is wasted RAM. Ideally you want 100% of RAM used (by applications/cache/buffers) and 0 swap usage. Swap is horribly slow and should be avoided at all costs (this sentence applies not just to N900, but all linux systems -- and this is why most Android devices don't use swap at all).

Unfortunately, N900 and Maemo5 as it runs on N900 simply can not function without swap. N900 really should have 512MB minimum to run smoothly, but that SoC configuration was not available to Nokia at the time N900 design was finalized, from what I've read.

Different kernels may affect RAM availability as a result of different compiled-in options or optimizations. On N900 virtually everything that is nonessential is compiled as a module, meaning it does not get loaded unless it actually gets used. Unused modules don't use any RAM.

There are recent discussions on LKML about optimizing swap for flash media, batching writes to align to erase-blocks, etc. which would greatly speed it up (similar, for example, to Btrfs in SSD mode). But this doesn't exist in our old kernel and may never exist for us if it's something that can't be backported easily.

Mohammed Muid 2012-05-18 17:43

Re: [DISCUSS] SDCard Swap Partition Methods..
 
but isnt it possible to make N900 run more faster. the speedpatch doesnt work. its nothin but crap. freezes the phone a lot. overclocking is one way but it doesnt do me any good. my phone is overclocked to 850 running ideal profile but still it freezes for example if a phone call comes when i am browsing. its terrible. my freinds laf at me. where the are using galaxy s and even people using milestone. seriously, there are many times that i even missed a call twice or thrice. what shud i do?

peterleinchen 2012-05-18 20:39

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Quote:

Originally Posted by Mohammed Muid (Post 1208793)
what shud i do?

Sorry, but I have to say: sell and get yourself an Android (this is the N900 and not a cell phone.)

Quote:

Originally Posted by MaddogG (Post 1208491)
Or, you can try swapset. I use it and it works pretty fine.

Thanks a lot for the hint to this package (script).
This seems to me as the best trial for newbies. I checked sources and its nicely done.
Only the compcache I am worried about. Followed the zram thing, but it stopped somehow. I do not know the latest status, so I would like to ask anybody about feedback (otherwise I would propose to disable that?).

Quote:

Originally Posted by Estel (Post 1208375)
@peterleinchen
As I've written, way of doing ti via /etc/event.d/ script isn't bad at all, but it got one drawback - boot time is considerably slower, as Maemo need to enable eMMC swap first, then, via Your script, enable microSd swap, and disable eMMC swap.
No, as enabling swap is very fast, it doesnt consume boot time. Further I do not need to disable eMMC swap, as I start SD swap with higher priority. Last I do not disable eMMM swap, as it will not be used anymore at all (lower priority, it would only be used when my swap overloads). Just a few 4-5 MB are left on eMMC which were used during time between ke-recv and my script.

As - at this point - some thing are already swapped (most likely, You run event.d scripts after starting hildon-desktop), they need to be moved from eMMC swpa to microSD swap.
Again no, as I start my script like
start on started ke-recv
and then wait until SD and/or eMMC are mounted.
As desribed above, tme swap ram is not moved back. At least not immediately, but slowly during runtime.


As for using microSD swap together with eMMC swap, I don't recommend it, even with higher priority for microSD swap - it's still "in use", which creates (less, but still), I/O rade with things from optFS.
Just a No, as explained above.
Or at least what I understood with my limited Linux skills.


Also, I'm quite sure, that using loopback file for swap is considerably slower than native swap - as it's with ED loopback image or native partition.
This is a full Yes from your experiences with ED. But I do not know that in detail for swap space.
Again, limited Linux skills.


Please see this post (my explanations) as discussion base.
I think it is a nice way to do and it helps to move I/O load away from eMMC.

I think about merging my approach (using of swap file also possible) with the swapset script (starting it earlier, this is started on hildon-desktop) ...

vi_ 2012-05-18 21:07

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Quote:

Originally Posted by Mohammed Muid (Post 1208793)
but isnt it possible to make N900 run more faster. the speedpatch doesnt work. its nothin but crap. freezes the phone a lot. overclocking is one way but it doesnt do me any good. my phone is overclocked to 850 running ideal profile but still it freezes for example if a phone call comes when i am browsing. its terrible. my freinds laf at me. where the are using galaxy s and even people using milestone. seriously, there are many times that i even missed a call twice or thrice. what shud i do?

1. Get new friends.
2. Get a dumbphone, sorry 'android'.

vi_ 2012-05-18 21:09

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Quote:

Originally Posted by vi_ (Post 1208918)
1. Get new friends.
2. Get a dumbphone, sorry 'android'.

Also, ask your friends to get a torrent, unrar it, transcode it to ogg then broadcast it over the local LAN. You may then proceed to sh|tting yourself with mirth at them.

stlpaul 2012-05-18 22:17

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Quote:

Originally Posted by Mohammed Muid (Post 1208793)
my phone is overclocked to 850 running ideal profile but still it freezes for example if a phone call comes when i am browsing. its terrible.

It happens to most of us. The problem is not CPU speed but lack of RAM on the device and the ensuing swapping I/O storm.

Just yesterday my phone was ringing but the screen didn't turn on or respond until it was too late. N900 is great as a pocket computer, but pretty bad as a telephone because of that kind of thing... in my opinion.

impeham 2012-05-19 07:30

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Quote:

Originally Posted by Mohammed Muid (Post 1208793)
but isnt it possible to make N900 run more faster. the speedpatch doesnt work. its nothin but crap. freezes the phone a lot. overclocking is one way but it doesnt do me any good. my phone is overclocked to 850 running ideal profile but still it freezes for example if a phone call comes when i am browsing. its terrible. my freinds laf at me. where the are using galaxy s and even people using milestone. seriously, there are many times that i even missed a call twice or thrice. what shud i do?

You can use my script - it solved this (rare) issue for me:

http://talk.maemo.org/showthread.php?t=80095

This is going to require some experience with the n900.

Please don't post any questions about the script in this thread.

This device is quite amazing, but you need to invest time to learn to manipulate it, so i suggest you start investigating yourself a little more.

Good luck.

Estel 2012-05-19 08:17

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Quote:

Originally Posted by stlpaul (Post 1208944)
It happens to most of us. The problem is not CPU speed but lack of RAM on the device and the ensuing swapping I/O storm.

Just yesterday my phone was ringing but the screen didn't turn on or respond until it was too late. N900 is great as a pocket computer, but pretty bad as a telephone because of that kind of thing... in my opinion.

Never happened to me, since I use proper swap-related settings + swap on microSd + lack of swap on eMMC. For me, it's both perfect computer and perfect phone.

/Estel

impeham 2012-05-19 08:29

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Quote:

Originally Posted by Estel (Post 1209092)
Never happened to me, since I use proper swap-related settings + swap on microSd + lack of swap on eMMC. For me, it's both perfect computer and perfect phone.

/Estel

I'm using same as you and still this happens (very rarely - once or twice a month).

Mohammed Muid 2012-05-19 13:29

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Quote:

Originally Posted by Estel (Post 1209092)
Never happened to me, since I use proper swap-related settings + swap on microSd + lack of swap on eMMC. For me, it's both perfect computer and perfect phone.

/Estel

how to use "proper swap related settings" "swap on micro Sd" and lack of swap on eMMC" can u please help.

Estel 2012-05-19 13:58

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Sure thing. Just read this thread from the beginning, the apply settings that suit You best.

If You fail to understand what was said here, gain basic linux knowledge (or general computer knowledge) - no offense here - and try again.

/Estel

Mohammed Muid 2012-05-19 16:01

Re: [DISCUSS] SDCard Swap Partition Methods..
 
just this thread? these 3pages. i read it. but dint get nythn from it :(

Estel 2012-05-19 16:10

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Then, fallback to plan B, as everything You need to know was here (in fact, even in few first posts, another ones are just to make it easier for end-user).

Quote:

Originally Posted by Estel
If You fail to understand what was said here, gain basic linux knowledge (or general computer knowledge) - no offense here - and try again.

No irony here again - it's just that lack of understanding basic concepts could bring great harm to Your device. Methods described here consists of editing rcS-late (critical file for booting system) or putting script in event.d (scripts executed at boot time) - doing both without any idea of what You're doing could make Your system unbootable.

/Estel

Mohammed Muid 2012-05-19 17:10

Re: [DISCUSS] SDCard Swap Partition Methods..
 
i saw the posts, the links to use sd card as swap. but cant use it. dunno. would have been easier for me and most noobs like me if u could tell me a step by step guide. bt yes, i cant even expect this much from you. you are a senior member of this forum. surely u will get annoyed because these are simple things for you. bt still. taking a chance to make my N900 fast,responsive.

Mohammed Muid 2012-05-19 17:25

Re: [DISCUSS] SDCard Swap Partition Methods..
 
i saw the posts, the links to use sd card as swap. but cant use it. dunno. would have been easier for me and most noobs like me if u could tell me a step by step guide. bt yes, i cant even expect this much from you. you are a senior member of this forum. surely u will get annoyed because these are simple things for you. bt still. taking a chance to make my N900 fast,responsive.

impeham 2012-05-19 18:20

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Quote:

Originally Posted by Mohammed Muid (Post 1209304)
i saw the posts, the links to use sd card as swap. but cant use it. dunno. would have been easier for me and most noobs like me if u could tell me a step by step guide. bt yes, i cant even expect this much from you. you are a senior member of this forum. surely u will get annoyed because these are simple things for you. bt still. taking a chance to make my N900 fast,responsive.

You must understand that writing a step by step guide to someone with knowledge level as you have might take 3 pages long (no offense), and don't forget that everything is evolving and changing, so documentation might never end.

By writing such step by step guide to every issue, the community will make a much slower progress. time wasted about documentation needs to be limited, since it hurts progress with open and new issues that are found all the time.

I don't see myself at a high level with mameo, but still i am willing to learn and i have spent many hours to fill gaps of things i did not understand.

I think you are trying to jump to deep water without the will to learn to swim from your own reasons and that is fine, but with that being the case, i think that this device might not be the best choice for you.

By starting to learn from the bottom, asking questions that will prove that you are learning and evolving, i believe you will find people in these forums much more helpful - as i have found, so understand that the responses you get are not coming from a bad place.

misiak 2012-05-19 18:26

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Quote:

Originally Posted by Mohammed Muid (Post 1209296)
i saw the posts, the links to use sd card as swap. but cant use it. dunno. would have been easier for me and most noobs like me if u could tell me a step by step guide. bt yes, i cant even expect this much from you. you are a senior member of this forum. surely u will get annoyed because these are simple things for you. bt still. taking a chance to make my N900 fast,responsive.

The thing is, noobs shouldn't touch that settings. Not becaue it makes "senior members" (or just "more linux-clever ones) annoyed, but because if you don't know what you're doing, you may (almost) brick your device. This is not like on Android phones, this is Linux phone which is more open - that has positive aspects, but also negative sides. By negative I mean that when you take any two N900s in your hands, you may have totally different root filesystems on them and they may react in totally different way to your actions (editing critical system files). You need this very basic knowledge not to totally mess up your device... I understand this may be a bit of rocket science at first for someone who is not IT-related-guy, but you just SHOULD know that to use this device, sorry... you know how to do basic things on your Windows PC (/MacOS Mac) and you had to learn how basic stuff works, by the same rule you should learn dos-and-don'ts of Maemo system.

BertvanDorp 2012-05-21 14:11

Re: [DISCUSS] SDCard Swap Partition Methods..
 
I agree with others that it's plain unwise to write guides and let noobs alter settings they shouldn't alter. But on the other hand you have to realize: these 'n00b' people here that still ask these questions are the ones trying not to give up on their N900, the rest has moved on.

So, I think it's also a good approach to gather best-practice methods into comprehensible guides and/or packages, that allow the 'regular user' to have a great Maemo experience as well. For example, the script by Impehan looks really promising, and would help me, and a lot of others out, but I'm simply not able to implement this right now. Converting this into a package ('app' in regular-user words) would involve no risk for the regular user, and help out, right?

Now, back to the Swap-to-microSD thing: am I right that an 'easy' approach would be to create a file on the micro-SD and use swapset or just swapon to enable the file? The steps would be:
1. create file, name ...
2. use 'swapon ...' to test
3. run [thing] to disable unmounting on removing cover
4. do [thing] to include both measures in bootloop
5. [...]
6. profit!
7. some incredible hero converts this into an app, and gets donations, thanks, and so on

Right? Now, can someone help me fill in the blanks? :D

sulu 2012-05-21 15:11

Re: [DISCUSS] SDCard Swap Partition Methods..
 
Quote:

Originally Posted by vi_ (Post 1207323)
It should be noted that if you do put swap on SD that you can under no circumstance take the back cover off when the swap is mounted on the SD. When you do this the MMC is insta-umounted with respect to no man.

I read that over and over again but my N900 doesn't behave that way. When I just open the back cover absolutely nothing happens. The ext2 partition (does the FS matter?) on my sd card is still mounted and useable and I have no problems related to the swap partition on it either. Does this mean my magnetic sensor doesn't work?
I also often read that if you connect a N900 with an sd card to a PC in PC suite mode the card gets unmounted from the N900 and mounted by the PC. But if I connect my N900 to one of my PC's (all of them running Debian, no idea if that matters) the ext2 partition remains mounted on the N900 and I can mount it from the PC. I can then read data simultaneously but writing from either side without manually unmounting the other side in advance results in FS corruption. Anyone?

Quote:

Originally Posted by peterleinchen (Post 1208902)
Only the compcache I am worried about. Followed the zram thing, but it stopped somehow. I do not know the latest status, so I would like to ask anybody about feedback (otherwise I would propose to disable that?).

What exactly are you worried about? I tried it on my N900 but didn't see any changes, neither improvements nor regressions. So I stopped that again. But I have zram running (and actually in use) on my HTPC 24/7 for about a month now and as far as I'm concerned (which of course is not representative) it's stable.

peterleinchen 2012-05-21 15:18

Re: [DISCUSS] SDCard Swap Partition Methods..
 
I am worried about the instant reboots I experience when enabling ramzswap. Happens sometimes, not always, but in a startup script?

Then the easiest solution for newbies is package swapset.
Even nobody will check sources ("dpkg -x *.deb ."), but just install ...

@Bert
Quote:

7. some incredible hero converts this into an app, and gets donations, thanks, and so on
already done, see package swapset
(except this does not work for swap files, just partitions)

peterleinchen 2012-05-21 15:27

Re: [DISCUSS] SDCard Swap Partition Methods..
 
@Estel and others
How do you refresh your swap?
I made a script which checks the amount of written bytes on mmcblk1p1 (not swap usage) and think that swap defragmentation occurs only after 768MB written. Is that right? Or should I rely on amount of /proc/swap ? But I almost never go over 256MB here.
Or when does swap fragmentation do start?


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

vBulletin® Version 3.8.8