[rhelv6-beta-list] My first experiences with RHEL6 beta

James Findley james.findley at trans-axion.net
Tue Jun 15 14:05:16 UTC 2010


On 06/15/2010 02:50 PM, Chris Adams wrote:
> Once upon a time, James Findley<james.findley at trans-axion.net>  said:
>> On 06/15/2010 02:20 PM, Chris Adams wrote:
>>> Once upon a time, James Findley<james.findley at trans-axion.net>   said:
>>>> There is a (small) overhead for using file-based storage as opposed to
>>>> volume based storage,
>>>
>>> The only differences is at "swapon", when the file blocks are mapped.
>>> Once that is done, performance is identical (because access is
>>> identical).
>>
>> Not entirely.  swap files can be non-contiguous (and are moderately
>> likely to be so, if large) - swap volumes will only be so if you try
>> really hard to screw up your system.
>
> The blocks of each are mapped at swapon and used directly.
>
>> There are filesystem overheads, too.
>
> Nope, swap bypasses the filesystem.
>
>> I'm not quite sure why you think access is identical - it's a very
>> different process to write N blocks to an on-disk file compared to
>> writing those N blocks to a swap partition.
>
> Because when this was discussed on the kernel mailing list, Andrew
> Morton explained all these things and said they have the same
> performance after swapon.  I'll take his word for kernel things.
>

Ok, I didn't know that.  Thanks for the correction.

However, if you read the LKML post ( http://lkml.org/lkml/2005/7/7/326 
), this is only true if you create the file when the FS is new - so you 
can be sure the swap file really _is_ contiguous.  If it isn't then you 
still have to do more seeks, which is very slow unless you have an SSD.

So 50% right.  If the file is contiguous performance is identical, but 
if it isn't then it won't be.

-James




More information about the rhelv6-beta-list mailing list