【好文转载】Raw Logical Volumes VS. File Systems

Within the database community, there has been a long running debate surrounding the use of raw logical volumes (raw devices) versus file systems. Advocates of raw logical volumes stress the performance gains that can be realized through their use, whereas file system supporters emphasize the ease of use and manageability features of file systems. As with the other aspects of system design, a decision must be made as to which is more important: performance or manageability.

[@more@]

To understand the performance advantages associated with raw logical volumes better, it is helpful to have an understanding of the impact of the file system cache. Most UNIX file systems set aside an area of memory (the cache) to hold recently accessed files, which can subsequently allow physical I/O requests to be satisfied from memory instead of from disk. If DB2 requests data that is not already in the cache, the operating system will read the data from disk into the cache, then copy the data to the DB2 buffer pool so that it can be used. Therefore, each read request translates into a disk read, followed by a copy of the data from the cache to the database buffer pool.

When the data is read from the cache, I/O requests can be satisfied in nanoseconds instead of the milliseconds that would be required to retrieve the data from disk. In addition, most UNIX file systems employ the use of a sequential read-ahead mechanism to prefetch data into the cache when it detects that a file is being accessed sequentially.

In non-database environments, the UNIX file system cache can significantly reduce I/O wait time for heavily accessed files. However, the performance benefits of file system caching in database environments are not so clear. This is due to the fact that most RDBMS systems, including DB2, also allocate a region of memory for caching frequently accessed data (i.e., the database buffer pools). This results in double buffering of the data in the file system cache and the DB2 buffer pool.

In 64-bit systems, the memory used by the file system cache could be better utilized by the database buffer pools. In 32-bit systems, with their associated shared memory limits, the file system cache can provide benefit for some workloads.

The primary benefit of raw logical volumes is that they bypass the file system cache by directly accessing the underlying logical device. The extra memory saved by eliminating the file system cache can then be allocated to the database buffer pools. In addition, overall CPU utilization is decreased, due to the fact that the system no longer has to copy the data from the file system cache to the database buffer pools.

NOTE

Another benefit of raw logical volumes in AIX is that there is no inode management overhead, as opposed to file systems where the inode is locked when the file is accessed.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7437037/viewspace-914149/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/7437037/viewspace-914149/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值