'Use HDD swap file' option?

BGonaSTICK

Retired Moderator
Joined
Dec 22, 2003
Messages
5,145
Reaction score
0
Points
36
Age
50
My Satellite Setup
Dreambox 7000, Skystar2
My Location
Brighton
Hydra Atlantis 1.08 Final image

From the web interface, has option to turn on HDD swap, and a textbox that is initialised as 'none'.

I'm gonna try a few things out to see what results I get, but I'm wondering if anyone has any stories of untold performance hikes by using it?!?!?!

Didn't think so, but anyone tried it?

Anyone know what to set 'none' to?
 

MacAddict

Regular Member
Joined
Jul 26, 2004
Messages
49
Reaction score
0
Points
0
Age
44
BGonaSTICK said:
Hydra Atlantis 1.08 Final image

From the web interface, has option to turn on HDD swap, and a textbox that is initialised as 'none'.

I'm gonna try a few things out to see what results I get, but I'm wondering if anyone has any stories of untold performance hikes by using it?!?!?!

Didn't think so, but anyone tried it?

Anyone know what to set 'none' to?

I have not put a disk in my dreambox yet, but I was not planning on having a swap paritition. How did it go for you?
 

BGonaSTICK

Retired Moderator
Joined
Dec 22, 2003
Messages
5,145
Reaction score
0
Points
36
Age
50
My Satellite Setup
Dreambox 7000, Skystar2
My Location
Brighton
Bit reluctant to screw around with it until I have a better idea of what it's likely to do.

It's only available on the web interface, so might be a 'future feature' (I played around with the stock 1.05 image and it's web interface for a bit, and it was still 'under develpment' to say the least!).

Not at all sure that it would create a standard Linux swap partition.

Found this on the web :-

Setting up swap memory

You can set up a swap file like this (example is for 128MByte):

Create the file to use as swap:

dd if=/dev/zero of=/hdd/swap bs=16k count=8192

Now initialise it as a swapfile:

mkswap -v1 /hdd/swap

Edit /var/tuxbox/start_enigma, place this at the start, just below the '#!/bin/sh' line:

if [ -e /hdd/swap ]; then
/sbin/swapon /hdd/swap
fi

Your Dreambox will now use the swap file. Check to see if swap is in use after rebooting your box:

reboot

Or, if you prefer, use the reboot option on the remote control. Wait for the box to respond to telnet again, and ..

cat /proc/swaps

If something similar to this appears, you're good to go:

Filename Type Size Used Priority

/hdd/swap file 131064 388 -1
 

djlemur

Regular Member
Joined
Jul 30, 2004
Messages
113
Reaction score
0
Points
0
Age
58
Location
Hampshire, UK
My Satellite Setup
DM7000 + 300Gb + Gemini, HH100 Rotor, 0.8m Offset Dish, 0.3db Invacom LNB
My Location
Hampshire, UK
BGonaSTICK said:
Bit reluctant to screw around with it until I have a better idea of what it's likely to do.
OK, so I tried it :-}
I set it to 64M via the web interface - no effect...
...so I tried the manual method you listed to add a 128M swap.
Creating the swap file and initialising it as swap is OK, however there is no start_enigma on this image, so you have to put the next bit in /var/etc/init instead.
BTW you can run swapon directly from the shell, no need to reboot.

This doesn't give you any speed improvements, but it does mean that if your dreambox runs out of memory for some reason, it will page to swap instead of hang/crashing.
 

BGonaSTICK

Retired Moderator
Joined
Dec 22, 2003
Messages
5,145
Reaction score
0
Points
36
Age
50
My Satellite Setup
Dreambox 7000, Skystar2
My Location
Brighton
djlemur said:
OK, so I tried it :-}
I set it to 64M via the web interface - no effect...
...so I tried the manual method you listed to add a 128M swap.
Creating the swap file and initialising it as swap is OK, however there is no start_enigma on this image, so you have to put the next bit in /var/etc/init instead.
BTW you can run swapon directly from the shell, no need to reboot.

This doesn't give you any speed improvements, but it does mean that if your dreambox runs out of memory for some reason, it will page to swap instead of hang/crashing.
;) Nice one. I wonder then, what the overhead is in running with the swapfile enabled? Maybe it's safer but slower? Not sure about the hanging/crashing and how that would work when paging from the firmware in ROM... I know squat about the PowerPC architecture.

I guess there must be some overhead, but can't imagine that it's noticeable...? After all, it wouldn't be written-to during normal operation...

Have you noticed any side-effects?

STICK
 

djlemur

Regular Member
Joined
Jul 30, 2004
Messages
113
Reaction score
0
Points
0
Age
58
Location
Hampshire, UK
My Satellite Setup
DM7000 + 300Gb + Gemini, HH100 Rotor, 0.8m Offset Dish, 0.3db Invacom LNB
My Location
Hampshire, UK
No noticable diference so far :)
A quick 'cat /proc/meminfo' shows that this box has not touched swap yet, but there is only 560kB free. I'm going to keep an eye on it in case there are some creeping memory leaks along the way. FWIW I have read that some of the plugins (JPG viewer) require you to have swap enabled.


~ > cat /proc/meminfo
MemTotal: 29836 kB
MemFree: 560 kB
Buffers: 1900 kB
Cached: 15192 kB
SwapCached: 0 kB
Active: 9772 kB
Inactive: 13504 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 29836 kB
LowFree: 560 kB
SwapTotal: 131064 kB
SwapFree: 131064 kB
Dirty: 0 kB
Writeback: 0 kB
Mapped: 7968 kB
Slab: 2140 kB
Committed_AS: 24808 kB
PageTables: 276 kB
VmallocTotal: 475136 kB
VmallocUsed: 41396 kB
VmallocChunk: 433004 kB
 

BGonaSTICK

Retired Moderator
Joined
Dec 22, 2003
Messages
5,145
Reaction score
0
Points
36
Age
50
My Satellite Setup
Dreambox 7000, Skystar2
My Location
Brighton
djlemur said:
... but there is only 560kB free. I'm going to keep an eye on it in case there are some creeping memory leaks along the way.
Hey, that is so cool. I'd be really interested to know how this goes over a longer period of time. It'd be great to know how all these dodgy plugins are managing memory resources (or not!).

I'm sure a lot of Dreambox owners out there would find this interesting... I wonder if you would mind letting this experiment run for a few days without rebooting and reporting what you find?

Is it possible under Linux to get a memory map by module?

Sorry, I know I'm a cheeky and lazy g!t...:)
 

MacAddict

Regular Member
Joined
Jul 26, 2004
Messages
49
Reaction score
0
Points
0
Age
44
I have played with switching the swap file on ruCannon 5, God knows why as I have managed to only need newcamd to open everything and I dont have any plugins running. I found that it had erratic behaviour on this image. It kept on spining the disk even when the dream box was on sleep mode O-no.
 

djlemur

Regular Member
Joined
Jul 30, 2004
Messages
113
Reaction score
0
Points
0
Age
58
Location
Hampshire, UK
My Satellite Setup
DM7000 + 300Gb + Gemini, HH100 Rotor, 0.8m Offset Dish, 0.3db Invacom LNB
My Location
Hampshire, UK
BGonaSTICK said:
Hey, that is so cool. I'd be really interested to know how this goes over a longer period of time. It'd be great to know how all these dodgy plugins are managing memory resources (or not!).
Well shortly after this post, with an uptime of nearly 3 weeks, I have had to re-install as the image "seemed" to disintergrate :( while playing with satellite scanning on the Astra 28 area ...symptom was the initial "hydra" startup screen became corrupted over the top third, and the box crashed every 2 to 3 mins..
Tried a lan flash update, but it never acknowledged receipt of the image, leaving me with a nice(!) blank dreambox!
One hasty manufacture of a null modem cable later, I have a working system again with the exception of the newcamd emu that can't decode _anything_. Fortunately radegast does the job (and is MUCH faster on the ZAP :)).
I'll let you know if anything else happens!
 

BGonaSTICK

Retired Moderator
Joined
Dec 22, 2003
Messages
5,145
Reaction score
0
Points
36
Age
50
My Satellite Setup
Dreambox 7000, Skystar2
My Location
Brighton
NLOL! :eek:

Wonder why your newcamd is bust?

Surely if you formatted the hard disk, chucked a fresh copy of atlantis 1.08 on, made sure you did a flash-erase and updated the emus over-the-net you'd be back to a fully working image?

I can't stand to have busted stuff on my boxes, I would go mad... :)

STICK
 

djlemur

Regular Member
Joined
Jul 30, 2004
Messages
113
Reaction score
0
Points
0
Age
58
Location
Hampshire, UK
My Satellite Setup
DM7000 + 300Gb + Gemini, HH100 Rotor, 0.8m Offset Dish, 0.3db Invacom LNB
My Location
Hampshire, UK
BGonaSTICK said:
Wonder why your newcamd is bust?
STICK
Well, Newcamd 5.15 just poped up on the CAM menu, so I installed it and now it works OK. YMMV :-)
 

MacAddict

Regular Member
Joined
Jul 26, 2004
Messages
49
Reaction score
0
Points
0
Age
44
djlemur said:
Fortunately radegast does the job (and is MUCH faster on the ZAP :)).
I'll let you know if anything else happens!
I never got radegast top open anything, and I have found the newcamd on ruCannon 5 was much fatser. I guess it is do with the emu switching more than the emu itself.
 
Top