Re: swapping under 2.1.12[5-7?]

Simon Kirby (sim@netnation.com)
Sun, 1 Nov 1998 12:43:16 -0800 (PST)


On Sun, 1 Nov 1998, Ely Wilson wrote:

> I know my 'for instance' is not the most warranting, but..
>
> I have over 300 megs in mp3's, and I use mpg123 to play them. I just exec
> "mpg123 -z *" so it plays them all and randomly.
>
> After about an hour of music I notice that the music will stop dead for a
> moment, sometimes a split second, sometimes for several seconds. Meanwhile
> there is heavy disk action and then playing resumes.
>
> This appears to me that teh kernel is swapping out LARGE amount sof memory
> as this is only happening after new songs are loaded after enough songs to
> fill my physical memory have been played.
>
> This swapping brings the whole system to it's knees except interrupts (only
> since I haven't tested that, but I hope the swap code isn't that 'wrong'). I
> did not experience this in recent past kernels (say 2.1.120 or earlier? i
> may be off a minor click or two there).
>
> I have looked at the mpg123 source and the memory is freed and allocated per
> song, per frame as it is read from the file. This means that while playing
> music mpg123 should not swap out this memory. Unless somehwere someone is
> trying to swap out unused memory until program exit. Which is insane as
> we're talking over 300 megs of music and my physsical+swap isn't even that
> big.
>
> This is not anther program swappign BTW as I only listen to mp3's while in
> irc (EPIC3) and while pine is polling mail in another vc.
>
> I don't know, if anyone wants to poitn me toward information on what is waht
> as far as swap code, or someone might know why teh kernel acts this way now,
> let me know and I'll deal with it.

Run a "vmstat 1" in another console while running mpg123 and see what
happens when the pauses occur. If you see the "bo" field active, then
it's writing out data to disk...if you see the "so" field active, it's
swapping out to disk, etc. My guess is that bdflush might be syncing at
large intervals and you have a collection of stuff building up in your
buffers...

Simon-

| Simon Kirby | Systems Administration |
| mailto:sim@netnation.com | NetNation Communications |
| http://www.netnation.com/ | Tech: (604) 684-6892 |

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/