Thread: [GD-Consoles] Disc File Layout
Brought to you by:
vexxed72
From: Research <res...@ga...> - 2006-06-22 03:48:15
|
Hi, It's been very quiet here, hopefully this list is still online! I need some help understanding CD and DVD discs and how it relates to performance of loading files. I can't seem to find the right words to google for this information. I tried combinations of ISO9660, sector, file layout, transfer speed and ordering but couldn't find anything very useful. I also searched the SCE newsgroups. 1. Sectors are counted from the center of the disc, is this correct? E.g. the first sector is closest to the middle of the disc and the last one is the edge of the disc? 2. Do lower sectors seek faster? How about transfer speeds? Are they better towards the inner or outer areas of the disc? 3. Any general tips for laying out data on discs? I saw some posts on the newsgroups suggesting putting the elf in the early sectors so it loads faster, etc. 4. Any other things I should know about file placement? size of files? Thanks, Brett |
From: Alistair M. <sou...@gm...> - 2006-06-22 07:49:20
|
Hi Brett, >1. Sectors are counted from the center of the disc, is this correct? E.g. >the first sector is closest to the middle of the disc and the last one is >the edge of the disc? > > That's correct, yes. >2. Do lower sectors seek faster? How about transfer speeds? Are they better >towards the inner or outer areas of the disc? > > That depends on the disc drive. On PS2 no, the drive is CAV (constant angular velocity) so the outside edge has the fastest read rates, but also has the highest spoilage rates because of physical damage to the edge of the disc, so the best place to locate data for high transfer rates is near the outside edge, but not right on it. If I remember correctly, PS2 DVD gives you over 2x performance reading from the outside edge compared to the inside, so it really makes a difference. >3. Any general tips for laying out data on discs? I saw some posts on the >newsgroups suggesting putting the elf in the early sectors so it loads >faster, etc. > > >4. Any other things I should know about file placement? size of files? > > Seek times are the killer, for short reads it can take longer to seek there than it can to actually perform the read. Therefore, try to layout your data so that files which are often read at the same time are physically near each other on the disc, to reduce seek overhead. The Xbox DVD emulator has a nifty statistical tool for this which helps to semi-automatically lay-out your disc for you based on timings gathered during playing sessions. If you often have several simultaneous file reads in progress (e.g. music + speech, music + streamed data, etc) then it helps, on systems like PS2 where you can perform file reads by sector number, to write your filesystem as a queue of pending reads and then sort them by sector number. This keeps the drive head moving in the same direction instead of jumping back & forth. Again, the goal is to reduce seek times. PS2's DVD drive has a 16 sector (32Kb) cache, and is therefore most efficient making reads aligned on 16-sector boundaries, of multiples of 32Kb. So it makes sense to start your files on 16-sector boundaries, and to make sure that wherever possible you're only making reads in multiples of 32Kb. To avoid one big seek per fopen you can pre-cache the disc's table of contents in memory, so that when you open a file it doesn't have to seek to the beginning of the disc, read some data (at the slowest possible rate because it's on the inside edge), then seek forward again to the file location. You can seek straight to the beginning of the file instead. Alistair |
From: <phi...@pl...> - 2006-06-22 18:33:37
|
> That depends on the disc drive. On PS2 no, the drive is CAV (constant > angular velocity) so the outside edge has the fastest read rates, but I believe it's switchable, as you need to set the stable/CLV mode for dual layer discs. Although I've never actually opened one up to check. Placing data near the outside then becomes preferable, as you have to seek shorter distances, and... > Seek times are the killer This is the big one. To help with this I reccomend writing all your data into a single packfile, which allows you to completely automate the placement of data on the disk. So you can easily place copies of files that are read together, next to each other. Below a certain physical distance, the head actually tilts, rather than moves, which is significantly faster. Plus this means you never suffer the OS sending the head all the way back to the centre to read the TOC. >_< There's a lot of good info in sce.dev.prog.cddvd on this issue. Cheers, Phil |
From: Jamie F. <ja...@qu...> - 2006-06-22 09:58:56
|
Research wrote: > I need some help understanding CD and DVD discs and how it relates to > performance of loading files. I can't seem to find the right words to google > for this information. I tried combinations of ISO9660, sector, file layout, > transfer speed and ordering but couldn't find anything very useful. I also > searched the SCE newsgroups. As I recall (it's been 5 years since I programmed a PS2), there's a document somewhere which gives you the actual transfer rates you should expect (by sector, as I recall). You shouldn't use theoretical or your own empirical data to work that out, as the transfer rate slows as the drive ages. Jamie |
From: Research <res...@ga...> - 2006-06-23 03:34:32
|
Thanks for the replies! ----- Original Message ----- From: "Research" <res...@ga...> To: <Gam...@li...> Sent: Thursday, June 22, 2006 11:46 AM Subject: [GD-Consoles] Disc File Layout > Hi, > It's been very quiet here, hopefully this list is still online! > > I need some help understanding CD and DVD discs and how it relates to > performance of loading files. I can't seem to find the right words to > google > for this information. I tried combinations of ISO9660, sector, file > layout, > transfer speed and ordering but couldn't find anything very useful. I also > searched the SCE newsgroups. > > 1. Sectors are counted from the center of the disc, is this correct? E.g. > the first sector is closest to the middle of the disc and the last one is > the edge of the disc? > > 2. Do lower sectors seek faster? How about transfer speeds? Are they > better > towards the inner or outer areas of the disc? > > 3. Any general tips for laying out data on discs? I saw some posts on the > newsgroups suggesting putting the elf in the early sectors so it loads > faster, etc. > > 4. Any other things I should know about file placement? size of files? > > Thanks, > Brett > > > All the advantages of Linux Managed Hosting--Without the Cost and Risk! > Fully trained technicians. The highest number of Red Hat certifications in > the hosting industry. Fanatical Support. Click to learn more > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642 > _______________________________________________ > Gamedevlists-consoles mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-consoles > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=553 |