Hacker News new | past | comments | ask | show | jobs | submit login

> If speed is an issue then you want it near the most commonly accessed data.

Yes. You expect the seek time to dominate performance.

The reason that the swap was faster when placed at the beginning is likely because the filesystem is mostly empty and so the allocated portion is at the beginning of the partition.

If the filesystem was near capacity and the files are distributed throughout, then you would expect the performance of the swap at the end and the swap at the beginning to start to converge.




They're talking about a swap partition, not a swap file. Filesystem allocation patterns are irrelevant for this.


Filesystem allocation patterns are relevant, one of the components of seek time is how far the heads have to seek. If most of the data is towards the front of the drive and your swap partition is towards the front of the drive, then the head will need to move less to get to the swap partition. If the data is towards the front and the partiton is near the end, then you would need to wait longer for the head to move, generally.


Yes. Thanks for explaining.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: