On hard disks, throughput and seeking is often faster towards the beginning of the disk, because that data is stored closer to the outer area of the disk, which has more sectors per cylinder. Thus, creating the swap at the beginning of the disk might improve performance.
For a 2.6 Linux kernel, there is no performance difference between a swap partition and an unfragmented swap file. When a swap partition/file is enabled by swapon, the 2.6 kernel finds which disk blocks the swapfile is stored on, so that when it comes time to swap, it doesn't have to deal with the filesystem at all.
Thus, if the swapfile isn't fragmented, it's exactly as if there were a swap partition at its same location. Or put another way, you'd get identical performance if you used a swap partition raw, or formatted it with a filesystem and then created a swapfile that filled all space, since either way on that disk there is a contiguous region used for swapping, which the kernel uses directly.
So if one creates the swapfile when the filesystem is fresh (thus ensuring it's not fragmented and at the beginning of the volume), performance should be identical to having a swap partition just before the volume. Further, if one created the swapfile say in the middle of the volume, with files on either side, one might get better performance, since there's less seeking to swap.
On Linux, if the swapfile is created unfragmented, and never expanded, it cannot become fragmented, at least with normal filesystems like ext3/4. It will always use the same disk blocks, which are contiguous.
I conclude that about the only benefit of a dedicated swap partition is guaranteed unfragmentation when you need to expand it; if your swap will never be expanded, a file created on a fresh filesystem doesn't require an extra partition.
You have to use RHEL6 (aka 2.6.32-, aka 042stab) kernel and configure your containers with VSwap. See http://openvz.org/VSwap for more details. It is done so by default in new installs.
If you want mini containers, assign the RAM you need and then two-four times amount of swap, to enable some "stretching" for CT memory. For example, for 256M that would be
vzctl set $CTID --ram 256M --swap 1G --save
Make sure other beancounters (especially privvmpages) are set to unlimited. Again, see http://openvz.org/VSwap for more details.
Best Answer
Burst memory is essentially memory that you can use if the host node has memory available and you have exceeded the memory guaranteed to your container. This is a flawed system because applications do not read memory in OpenVZ beancounters. It means that your VPS thinks it has more memory than the host node actually guarantees that you have.
For example, if I set a memory guarantee of 1GB and gave you 2GB burst, you would see a VPS that has 2GB of memory to use. However, if your usage exceeded 1GB and the host server had no memory to give to you beyond that point, the OpenVZ kernel begins to kill off your processes to drop your usage to a value equal to or lower than 1GB, your guaranteed memory.
The more appropriate solution was vSwap. Applications typically do not want to fill up swap space with frequently accessed data. This is typically (with plenty of exceptions) treated as the additional memory storage to keep you running if your memory usage happens to exceed that of your physical memory. Swap is, on a normal Linux system, disk space. Disk is slower than RAM. Treating the system disk as RAM has an impact on performance. OpenVZ assigns vSwap as actual RAM on the host node instead of disk space. To simulate a more native environment, the kernel artificially slows down the container so as to make swapping unattractive as it is generally thought to and expected to be.
The idea behind using RAM to assign vSwap instead of disk is that you do not want disk latency to increase for all users on the server when a few containers start maxing out their memory and swap. By assigning it to RAM you avoid unnecessary disk performance problems.
For an OpenVZ VPS that performs more like actual virtualization or like an actual dedicated server, vSwap is the choice you would make and Burst is outdated.