Does the position of partition on disk affect speed?

Yes, it is true.

The platters in a disk rotate at a fixed speed (7200 RPM in the common case). As such when the head is over the outer portion of the platter more surface area passes under the head per rotation than on the inside track. Thus more IO per rotation is possible.
(The 'beginning' of the drive is the outside tracks of the platters)

Now whether this is going to be at all noticeable, especially for swap which you shouldnt be using extensively anyway, is debatable.


That was very true a decade ago, when drive IO speeds were the major bottleneck. In fact, it was recommended placing your swap on a separate drive, to keep it off your primary's BUS.

IO speeds have improved since then, partition placement for performance tweaks are negligible now.

To add, and assuming placing swap closer would improve performance, it would indicate that you would be using a lot of swap to begin with. That is exactly what you should avoid, if anything, to gain performance. Swap is a pinhole bottleneck compared to your RAM throughput, and should only get used with heavy loads, like during virtualization, or large dataset processing.

/var on the other hand, does get used more often, but I have yet to see benchmarks indicating this trick to improve it's performance. I'd be very interested if this were true :-)

update: found this interesting performance tuning guide that indicates placing /tmp or /var on the outer region of the platters, improves speed. This makes sense, bear in mind to see the difference you may need to reach loads like those of a ftp/web server.