I'm just wondering about some guidelines on page size... For example if you have a stream where all packets are consistently of size > 40,000 bytes (but less than 65000), is it appropriate to just put them 1 per page ie have large pages. Packets in this range incur the page overhead about 10 times each... and most of the pages have no useful information. What are the pro's and cons of 10x 4k pages per packet (~1.5% overhead) vs 1x 40k page per packet (~0.5% overhead) As for pro's i can think of... Less buffer manipulation reconstructing packets. Less overhead Less seek misses. Cons Page buffer needs to be large... (but if it's a issue of memory... it still needs to allocate that quantity for the packet) and in theory it should eb able to handle the maximum size page anyway. Anything else ? Why the recommendation of 4k pages... it makes sense in terms of small packets... but does this justification for this recommendation still hold when packets are very large. Cheers, Zen.
On Thu, Sep 23, 2004 at 07:04:24PM +0800, illiminable wrote:> I'm just wondering about some guidelines on page size... For example if you > have a stream where all packets are consistently of size > 40,000 bytes > (but less than 65000), is it appropriate to just put them 1 per page ie > have large pages.It's certainly true that the 4-8k page size was chosen to match vorbis. The only other cons I can think of to larger pages are higher latency and buffering requirements if it's multiplexed with a lower-bitrate stream. Also, keep in mind that when multiplexed with an audio stream, seeking signposts will be more dense than if you use big pages for video efficiency, so there's a performance tradeoff there. -r
On Thu, Sep 23, 2004 at 07:04:24PM +0800, illiminable wrote:> I'm just wondering about some guidelines on page size... For example if you > have a stream where all packets are consistently of size > 40,000 bytes > (but less than 65000), is it appropriate to just put them 1 per page ie > have large pages.Guidelines for page size are 'what makes the most sense'. The 4kB rule of thumb was for Vorbis, not other codecs. Generally you want to choose page size with overhead, latency and mux granularity in mind.> Packets in this range incur the page overhead about 10 times each... and > most of the pages have no useful information.right.> What are the pro's and cons of 10x 4k pages per packet (~1.5% overhead) vs > 1x 40k page per packet (~0.5% overhead)As described, your case wants the larger pages. I can think of a few cases where smaller would be better (you can too), but re-pagination in mux for specialized cases was always the intent.> As for pro's i can think of... > > Less buffer manipulation reconstructing packets. > Less overhead > Less seek misses.right> Why the recommendation of 4k pages... it makes sense in terms of small > packets... but does this justification for this recommendation still hold > when packets are very large.Only if some other design consideration makes it more useful. In most cases, large packets == large pages. Monty