carpal tunnel
Registered: 29/08/2000
Posts: 14506
Loc: Canada
|
Quote: I'd read that 2.01 with 64 meg had too much memory for the cache so the player choked trying to keep it always full. Or does Hijack v464 not require the full 64 meg for the larger drives? Is there a certain memory requirement?
If a player has the standard amount of RAM, then v2.01 should behave just about identically to v2.00. Not broken.
If a player has more than 16MB of RAM, v2.00 won't use it. If a player has more than 16MB of RAM, v2.01 will try to use all of it, which can be bad.
The player uses the inefficient read(2) system call to fetch data from disk. The way that read(2) works is that first the kernel allocates RAM (in 4KB chunks) into which the data is read from disk, and then the kernel copies from there to the player's buffers. Thus, read(2) can require twice as much memory as the size of data being read. This could be avoided if the player used mmap(2) instead of read(2).
Since reading can use up to double the data size for memory, this will cause problems if the player grabs all of the extra memory for itself, leaving none for the kernel's 4KB buffers of the same data.
So, a rough solution would be to allot no more than 50% of extra memory to the player software, leaving the other 50% for the kernel and other applications to divy up.
There's nothing magic about the 50%, other than that it matches the theoretical worst case. In practice, the kernel does not actually need a full 1:1 ratio for internal 4KB pages versus player data.
Paul has done something like this, using his ReserveCache=180 flag on his 48MB player. Now, 48MB is 32MB of extra RAM. 50% of that would be 16MB. In practice, Paul is letting his player use somewhat more than 50% of it: Each ReserveCache increment is 64KB, so 180 * 64KB = about 11.5MB, or about 35% of the extra RAM is left to the kernel, with the player taking the rest.
So.. with a 32MB player example, one has 16MB of extra RAM. With the rule of Paul, this means a ReserveCache=90 might be a good starting point. Bump it up in increments of (say..) 8 until things work reliably.
For a 64MB player, there's 48MB of extra RAM. The same rule would suggest using ReserveCache=270 as a good starting value. Dunno.
Cheers
Edited by mlord (29/10/2006 13:51)
|