Re: [Gc-linux-devel] Alive?

Quoting Damian Gerow <dgerow@...>:
> Thus spake Shaun Jackman (sjackman@...) [04/11/05 09:58]:
> : > Hrm.. I've never heard of that. I'll give it a shot, though I doubt it
> : > will help me out much.
> :
> : Well, it will prevent the out-of-memory killer from slaying your
> : processes. Whether the performance is sufficient for your needs is
> : another matter, but I suspect you'll be pleased.
>
> Uh... How will setting the priority on my only swap device change anything
> from the current configuration? I'm already using it as swap; I don't
> understand how setting its priority will help me out. If I'm out of memory,
> I'm out of memory.
Setting the priority of your only swap device will not alter anything. However
if you configure swap to a network block device it will help preserve
performance by prefering to store pages in ARAM rather than via the network.
I use both on my GC and the only time I really see NBD being used is either
during compiling (which takes for ever - much better to cross compile!) or
using apt-get.
I added a few notes to the wiki regarding NBD but have not finished it. It
tells you how to set up the GC but not how to set up the NBD server. Since I
haven't quite figured how the wiki is currently laid out I created a new
node 'Documentation' and linked to my new material from there. This made a lot
more sense to me than the current 'How to develop/run' node which contains
links to pretty much all the actual (software) documentation (but I only
realised this after adding my material.
--
Daniel Thompson (Merlin) <daniel@...>
If at first you don't succeed then sky diving is probably not for you.

Thread view

Anyone alive? I've not seen much activity here since I signed up (all of
two-three days ago).
I realize this is more of a dev list, but I've got a question: I recently
got Linux booting on my GC, but I can't do much with the system, as it
continuously runs out of memory, and starts killing processes. Which, as it
happens, are generally the processes I'm trying to run.
It doesn't *look* like it, so I'm hoping someone here can confirm: does the
root image provided for download on gc-linux.org use the uclibc? It looks
like it's using the standard libc, but it's been some time since I've used
Debian.
(If not, I'd like to see about swapping the image over to uclibc, as that
will likely help with the limited available memory.)
- Damian

On Fri, 2005-11-04 at 06:29 -0500, Damian Gerow wrote:
> I realize this is more of a dev list, but I've got a question: I recently
> got Linux booting on my GC, but I can't do much with the system, as it
> continuously runs out of memory, and starts killing processes. Which, as=
it
> happens, are generally the processes I'm trying to run.
Two good techniques to increase available memory are to add swap
devices.
The first one permits swap to 'audio RAM'. In addition to its 24M of
system RAM the GameCube contains 16M that is normally used to hold audio
data buffers. The CPU cannot address the audio RAM directly so this
memory cannot be used like normal system memory but it is possible to
use the audio RAM as a swap device.
Create a device node:
mknod /dev/aram b 37 0
Add the following line to /etc/fstab:
/dev/aram swap swap pri=3D32767 0 0
Note: pri=3D32767 ensures that the ARAM is the kernel's preferred swap
device, that is pages will be stored in ARAM in preference to other swap
devices such as via ethernet. At present there is no other hardware for
a GameCube that offers more performant swap device so giving it maximal
priority really does make sense.
Finally after each reboot (this could be integrated into the boot
scripts):
mkswap /dev/aram
swapon -a
The other technique is to swap to a network block device (NBD) but I
haven't any canned instructions for that so you'll have to google to
figure it out.
--=20
Daniel Thompson (Merlin) <daniel@...>
signature.asc? http://www.redfelineninja.dsl.pipex.com/signature.html
Did Sigmund's wife wear Freudian slips?

Thus spake Daniel Thompson (daniel@...) [04/11/05 06:57]:
: Two good techniques to increase available memory are to add swap
: devices.
... Especially if said swap devices are RAM. :)
: The first one permits swap to 'audio RAM'. In addition to its 24M of
: system RAM the GameCube contains 16M that is normally used to hold audio
: data buffers. The CPU cannot address the audio RAM directly so this
: memory cannot be used like normal system memory but it is possible to
: use the audio RAM as a swap device.
Already done. When I hit my errors, I've maxed my memory, and run out of
swap.
Note that this process is outlined in the wiki.
: /dev/aram swap swap pri=32767 0 0
:
: Note: pri=32767 ensures that the ARAM is the kernel's preferred swap
: device, that is pages will be stored in ARAM in preference to other swap
: devices such as via ethernet. At present there is no other hardware for
: a GameCube that offers more performant swap device so giving it maximal
: priority really does make sense.
That, however, is not -- I'll throw it in, though it won't make a difference
in my case.
: The other technique is to swap to a network block device (NBD) but I
: haven't any canned instructions for that so you'll have to google to
: figure it out.
Hrm.. I've never heard of that. I'll give it a shot, though I doubt it
will help me out much.
That being said... do you know if the system is using uclibc or standard
glibc? Using uclibc would be a great way to minimize memory footprint of
all libc-linked applications. And is, IIRC, functionally a 1:1 replacement
for glibc (though feel free to correct me if I'm wrong).
- Damian

Hello Damian,
2005/11/4, Damian Gerow <dgerow@...>:
>> The other technique is to swap to a network block device (NBD) but I
>> haven't any canned instructions for that so you'll have to google to
>> figure it out.
>
> Hrm.. I've never heard of that. I'll give it a shot, though I doubt it
> will help me out much.
Well, it will prevent the out-of-memory killer from slaying your
processes. Whether the performance is sufficient for your needs is
another matter, but I suspect you'll be pleased.
> That being said... do you know if the system is using uclibc or standard
> glibc? Using uclibc would be a great way to minimize memory footprint of
> all libc-linked applications. And is, IIRC, functionally a 1:1 replaceme=
nt
> for glibc (though feel free to correct me if I'm wrong).
I ran a Debian distro on my GameCube, which uses glibc. I don't know
of a uClibc [1] distro for the GameCube, but it would be a good fit
along with Busybox [2]. You could trying building your own uClibc
rootfs using Buildroot [3]. uClibc's goal is to be a drop-in
replacement for glibc. It may not meet this goal 100%, but its
coverage is very good.
Cheers,
Shaun
[1] http://uclibc.org
[2] http://busybox.net
[2] http://buildroot.uclibc.org

Thus spake Shaun Jackman (sjackman@...) [04/11/05 09:58]:
: > Hrm.. I've never heard of that. I'll give it a shot, though I doubt it
: > will help me out much.
:
: Well, it will prevent the out-of-memory killer from slaying your
: processes. Whether the performance is sufficient for your needs is
: another matter, but I suspect you'll be pleased.
Uh... How will setting the priority on my only swap device change anything
from the current configuration? I'm already using it as swap; I don't
understand how setting its priority will help me out. If I'm out of memory,
I'm out of memory.
: I ran a Debian distro on my GameCube, which uses glibc. I don't know
: of a uClibc [1] distro for the GameCube, but it would be a good fit
: along with Busybox [2]. You could trying building your own uClibc
: rootfs using Buildroot [3]. uClibc's goal is to be a drop-in
: replacement for glibc. It may not meet this goal 100%, but its
: coverage is very good.
So I presume the image provided does *not* use uclibc. I have to get a
Linux system going to build stuff on first, then I'll work on getting a
uclibc-based image.
Thanks for the pointers!
- Damian

Quoting Damian Gerow <dgerow@...>:
> Thus spake Shaun Jackman (sjackman@...) [04/11/05 09:58]:
> : > Hrm.. I've never heard of that. I'll give it a shot, though I doubt it
> : > will help me out much.
> :
> : Well, it will prevent the out-of-memory killer from slaying your
> : processes. Whether the performance is sufficient for your needs is
> : another matter, but I suspect you'll be pleased.
>
> Uh... How will setting the priority on my only swap device change anything
> from the current configuration? I'm already using it as swap; I don't
> understand how setting its priority will help me out. If I'm out of memory,
> I'm out of memory.
Setting the priority of your only swap device will not alter anything. However
if you configure swap to a network block device it will help preserve
performance by prefering to store pages in ARAM rather than via the network.
I use both on my GC and the only time I really see NBD being used is either
during compiling (which takes for ever - much better to cross compile!) or
using apt-get.
I added a few notes to the wiki regarding NBD but have not finished it. It
tells you how to set up the GC but not how to set up the NBD server. Since I
haven't quite figured how the wiki is currently laid out I created a new
node 'Documentation' and linked to my new material from there. This made a lot
more sense to me than the current 'How to develop/run' node which contains
links to pretty much all the actual (software) documentation (but I only
realised this after adding my material.
--
Daniel Thompson (Merlin) <daniel@...>
If at first you don't succeed then sky diving is probably not for you.

2005/11/4, Damian Gerow <dgerow@...>:
> Thus spake Shaun Jackman (sjackman@...) [04/11/05 09:58]:
> : > Hrm.. I've never heard of that. I'll give it a shot, though I doubt=
it
> : > will help me out much.
> :
> : Well, it will prevent the out-of-memory killer from slaying your
> : processes. Whether the performance is sufficient for your needs is
> : another matter, but I suspect you'll be pleased.
>
> Uh... How will setting the priority on my only swap device change anythi=
ng
> from the current configuration? I'm already using it as swap; I don't
> understand how setting its priority will help me out. If I'm out of memo=
ry,
> I'm out of memory.
Reread my reply; it was in reference to using a NBD swap device, not
setting the swap priority.
> So I presume the image provided does *not* use uclibc. I have to get a
> Linux system going to build stuff on first, then I'll work on getting a
> uclibc-based image.
>
> Thanks for the pointers!
No problem! Good luck and cheers,
Shaun

Thus spake Shaun Jackman (sjackman@...) [05/11/05 13:25]:
: 2005/11/4, Damian Gerow <dgerow@...>:
: > Thus spake Shaun Jackman (sjackman@...) [04/11/05 09:58]:
: > : > Hrm.. I've never heard of that. I'll give it a shot, though I doubt it
: > : > will help me out much.
: > :
: > : Well, it will prevent the out-of-memory killer from slaying your
: > : processes. Whether the performance is sufficient for your needs is
: > : another matter, but I suspect you'll be pleased.
: >
: > Uh... How will setting the priority on my only swap device change anything
: > from the current configuration? I'm already using it as swap; I don't
: > understand how setting its priority will help me out. If I'm out of memory,
: > I'm out of memory.
:
: Reread my reply; it was in reference to using a NBD swap device, not
: setting the swap priority.
I did.
I said I'd never heard of setting a swap priority. You said it will prevent
the out of memory killer. Hence my confusion.
I'll try the NBD, as that will likely help me out.