Author Topic: swap drive on SD-card ?  (Read 16321 times)

wicknix

  • Guest
Re: swap drive on SD-card ?
« Reply #15 on: March 14, 2009, 06:20:01 PM »
And if that doesn't work try adding it to your jwmrc and swallow the command like you did for your keymap. I believe it to be a timing issue where certain things are trying to load before the system is fully ready to accept additional commands.

Cheers.

Muffe

  • Guest
Re: swap drive on SD-card ?
« Reply #16 on: March 14, 2009, 07:30:47 PM »
You can add it to /etc/init.d/rcS


...unsuccessful  >:(

And if that doesn't work try adding it to your jwmrc and swallow the command like you did for your keymap. I believe it to be a timing issue where certain things are trying to load before the system is fully ready to accept additional commands.

Cheers.

also tryed this (as one of the first things) - also... no success  ???
« Last Edit: March 14, 2009, 07:36:51 PM by Muffe »

Mijzelf

  • Guest
Re: swap drive on SD-card ?
« Reply #17 on: March 14, 2009, 07:49:22 PM »
Well, who mounts the SD card? I *think* it's done by desktop-backend. Maybe it hasn't yet had the time to mount it.
Try to mount it yourself, before calling swapon.

wicknix

  • Guest
Re: swap drive on SD-card ?
« Reply #18 on: March 14, 2009, 08:34:09 PM »
Ok then. This should work since its telling the command to wait 30 seconds before it invokes the command. You could add it to any of the startup files previously mentioned. This should give the machine plenty of time to 'wake up' before calling to activate swap.

sleep 30 && swapon /SD/SD_1/swap

Cheers.


Muffe

  • Guest
Re: swap drive on SD-card ?
« Reply #19 on: March 14, 2009, 09:20:56 PM »
yessss - that's it!  ;D
I let it start in the JWM as swallow (because it's one of the last things that starts). I set it to an sleep of 10, what is enough. It feels 5 is the absolute minimum - then it runs sometimes and sometimes not  ::) ...

next step will be the converting of the debian hibernate-package  ::) - hope, that it works anyway.
« Last Edit: March 18, 2009, 07:16:36 PM by Muffe »

Muffe

  • Guest
Re: swap drive on SD-card ?
« Reply #20 on: March 18, 2009, 07:40:54 PM »
Here is a little update after some days using a swap file on SD-card... while the 3MX RC 1.1 distro only uses a few MB of the swap file with many other programs in the background running, the RC 2.1 uses something more. That would be also the reason that Firefox 3 is a bit slower than the FF2 - it needs simply more of memory.  ;D
Only surfing in the web for about 3-4 hours and there are near 25MB in use...


utd_grant

  • Guest
Re: swap drive on SD-card ?
« Reply #21 on: March 19, 2009, 12:02:33 AM »
Interesting observations, Muffe. Thanks for sharing.

glynallinson

  • Guest
Re: swap drive on SD-card ?
« Reply #22 on: March 22, 2009, 09:46:27 PM »
Muffe: I've tried the swap file on SD card on 3mx RC2.1 seems to work ok as well

jon_Onet

  • Guest
Re: swap drive on SD-card ?
« Reply #23 on: March 23, 2009, 03:00:08 PM »
Has having a swap file improved performance?

Leven2e

  • Guest
Re: swap drive on SD-card ?
« Reply #24 on: March 23, 2009, 08:55:09 PM »
very good question.. ::)

glynallinson

  • Guest
Re: swap drive on SD-card ?
« Reply #25 on: March 24, 2009, 02:04:48 PM »
Has having a swap file improved performance?

Not effectively, but I've noticed that it's been using about 25mb to 30mb's of swap, but as soon as the cpu climbs to 98% - 100% that the performance drops again.

Muffe

  • Guest
Re: swap drive on SD-card ?
« Reply #26 on: March 25, 2009, 08:04:00 PM »
But.... my system did not freeze any more, if the RAM is full - one thing, i had often before using a swap-file  ::)

wicknix

  • Guest
Re: swap drive on SD-card ?
« Reply #27 on: April 19, 2009, 11:28:16 PM »
Not sure the default OS has the needed tools installed to create a swapfile, but see if this works...

Open xterm
dd if=/dev/zero of=/SD/SD_1/swapfile bs=1024 count=32000    <-- (will create about a 32 meg swapfile)
mkswap /SD/SD_1/swapfile
swapon /SD/SD_1/swapfile  (this enables the swapfile and you'll have to do this at every boot unless you add this line to a startup script)

Maybe add it to /etc/init.d/start
sleep 30 && swapon /SD/SD_1/swapfile

The 'sleep' command will wait 30 seconds after boot before it mounts the swapfile. This helps let the system 'wake up' before enabling swap.

If using 3MX-rc3.1 this code is already in the 'startx' script and all you have to do is create the swapfile and place it in the root of the sd card and it will automatically enable swapfile at boot up.

Cheers.

Leven2e

  • Guest
Re: swap drive on SD-card ?
« Reply #28 on: April 20, 2009, 06:44:02 PM »
I tried it: now at least I can run PowerPoint files (without sound),slowly whilst using up 80Mb swapfile.I could not manage swapon start at boot yet,though.. I may create a shortcut icon on the desktop.
Thanks for all of your helps,guys!!
Edit: I have created a shortcut,and it's working!!  ;D
« Last Edit: April 21, 2009, 10:04:23 PM by Leven2e »

Mijzelf

  • Guest
Re: swap drive on SD-card ?
« Reply #29 on: April 21, 2009, 07:05:44 AM »
Quote
I could not manage swapon start at boot yet,though..
I found that when you just create a swap partition on an SD card, you can add it to /etc/fstab, and mounts automagically.