Home
| Calendar
| Mail Lists
| List Archives
| Desktop SIG
| Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU |
Chuck Young wrote in a message to Mike Bilow: CY> We have a typical beer-pub discussion going on here tonight CY> about which cylinders are the best to use for linux swap. CY> All other things being equal (on an IDE drive) would most of CY> you rather have it in low numbered cyls (the beginning of CY> the drive) or the high ones (/dev/hda4)? CY> I would assume one has a higher seek time on average and the CY> other would be ideal for swap. If true, which is it: hi or lo? First, keep in mind that this may be a trade-off specific to any particular machine. For example, if you have 64 MB RAM, you probably will not hit the swap file very often. Second, IDE is an all-or-nothing I/O technology. Whenever IDE I/O is actually taking place, the CPU is fully occupied and no other IDE device (if any) can use the bus. This is very different from SCSI, where devices will "disconnect" during I/O processing and leave the system and the device bus free for other useful work. Given these restrictions, the short answer is that there is effectively no performance difference between putting the swap on the high or low cylinders. There may be non-peformance reasons for a preference, however. The low cylinders are special because booting any operating system must be done from the ROM BIOS, and there is always some point on a large drive which cannot be reached from the ROM BIOS in real-mode. In older IDE systems, that boundary will be 512 MB, so your boot partition will have to be entirely below the 512 MB point of the drive. In newer EIDE systems, that boundary should be 4 GB, but often is really 2 GB due to bugs (related to using signed instead of unsigned 32-bit numbers). As a result, since swap is only accessed from protected mode, it makes more sense to put swap on the high cylinders. Modern drives all idle the head in the middle of the drive, since it is obvious that average seek time is reduced by doing so. All modern filesystems -- including Linux Second Extended -- take this into account, and put their most frequently accessed areas, the directory bands, in the middle of the partition. Older IDE drives, such as the Seagate ST-157A, will idle the heads on the highest numbered cylinder, which is usually unavailable for data and reserved as the "customer engineering" cylinder. -- Mike author of the BruteForce(TM) Disk Utilities
BLU is a member of BostonUserGroups | |
We also thank MIT for the use of their facilities. |