20 examples of bare devices and Oracle answers

Source: Internet
Author: User

20 examples of bare devices and Oracle answers
Guide A bare device, also called a bare partition (raw partition), is a special character device that is not formatted to be read by UNIX through the file system. A bare device can bind to a partition or bind to a disk. This article collects 20 examples of bare devices and Oracle answers.
1. What is a bare device?

A bare device, also called a bare partition (raw partition), is a special character device that is not formatted to be read by UNIX through the file system. It is the responsibility of the application to read and write to it. Not buffered by the file system.

2. How do I identify a bare device?

In the Unix/dev directory, there are many files, including two large categories: Character device files and block device files. The character device special files do I/O operations that do not go through the operating system's buffers, and block device special files are used for fixed-length packet transmissions with peripherals. The character special file transmits only one character at a time when I/O to the peripheral. For block device special files, it uses the cache mechanism, which can transmit a whole block of data at a time between the peripheral and memory. The bare device uses character special files. In the/dev directory, you can see many of these files.

3. What are the benefits of using a bare device?

Because the use of bare devices to avoid the UNIX operating system layer, the data directly from disk to Oracle for transmission, so the use of bare devices for read-write frequent database applications, can greatly improve the performance of the database system. Of course, this is a very large disk I/O, disk I/O is already known as a system bottleneck in the case of the establishment. If the disk read and write is very frequent, so that disk read and write become a system bottleneck, then the use of bare devices can greatly improve performance, the maximum can even increase to 40%, very obvious. Moreover, since the use of the original partition, not the management of the file system, the UNIX maintenance of file system costs are not, such as no longer maintenance i-node, idle blocks, etc., which can also lead to performance improvements.

4. How do I decide if I should use a bare device?

Decide whether to use a bare device consider the following: first, the database system itself needs to have been better optimized. Optimization is a very technical topic, it is difficult to simply tell. Second, use UNIX commands to identify whether there is a disk read-write bottleneck. such as Unix Vmstat, SAR and other commands can be better to identify. If you decide to use a bare device, you will need to have free partitions on the disk. Otherwise, you will need to add a new disk or re-plan the original system.

5. What systems must use bare devices?

If you use the Oracle Parallel server option, you must use a bare device to hold all the data files, control the files, and redo the log files. Only by placing these files on a bare device can you ensure that all Oracle instances are able to read this database file. This is determined by the characteristics of the UNIX operating system. Another scenario is that if you want to use asynchronous I/O, you must also use a bare device on some UNIX. This requires reference to specific UNIX-related documentation.

6. Is it possible to use the first partition of a disk as a bare device?

Yes, but not recommended. The older version of UNIX is the bank, and the first partition of the disk often contains some information about the disk, as well as some control information for the logical volume. If these parts are covered by a bare device, the disk becomes unrecognizable, causing the system to crash. Newer versions of Unix do not occur because they employ more sophisticated techniques to manage some of the information on disks, logical volumes. However, unless you are sure that you do not use the first partition of the disk as a bare device.

7. Can I use the entire bare device as an Oracle data file?

No way. The size of your data file must be slightly smaller than the actual size of the bare device. The size of at least two Oracle blocks should be vacated.

8. Should the bare device belong to that user?

The bare device should be created by root and then assigned to the Oracle user for use. It also has to be placed in the same group as the Oracle User (usually DBA).

9. How do I specify a bare device when I create a data file?

and ordinary files are not much different, the same is in single quotation marks inside the bare device to write the detailed path on it. To give an example: to create a tablespace, using two bare devices, each with a size of 30M, and an oracle block of 4K, you can use the following command:
CREATE tablespace Raw_ts
DataFile '/dev/raw1 ' size 30712k
DataFile '/dev/raw2 ' size 30712k;

does the size of the 10.Oracle block have anything to do with a bare device?

Oracle must be a multiple of the physical block size on the bare device.

11. How do I make a backup on a bare device?

On a bare device, you cannot use the Unix utility for backup, the only way to do this is to use the most basic UNIX command: DD. For example: DD if=/dev/raw1 of=/dev/rmt0 bs=16k. The specific syntax for DD can refer to the UNIX manual, or the online Help. You can also use DD to back up the data files on the bare device to disk before using the UNIX utility for further processing.

12. If I'm not using the Oracle Parallel server option, can I have a subset of the data files on the database using the file system, and the other part using bare devices?

OK. However, this can complicate the backup process.

13. Should I put the online redo log file on a bare device?

This is an excellent choice. An online redo log file is a file that is very frequently written, and it is appropriate to put it on a bare device. If you use the Parallel server option, the online redo log file must be placed on the bare device.

14. Can I put the archive log file on a bare device?

No way. Archived log files must be placed on a regular UNIX file system, or directly on tape.

15. Can I place multiple data files on top of a bare device?

No way. So you have to be very careful when setting up a bare device. Too small, it will lead to the use of space soon, too big, space is wasted.

16. Should I put a few bare devices on the same physical disk?

It's not good to do. Because a bare device is used to improve disk read and write speed. Placing multiple bare devices on the same physical disk can lead to read-write contention, which is detrimental to increasing I/O speed. It should be possible to scatter bare devices to different physical disks, preferably on separate disk controllers. This is the best choice.

17. Do you need to define all the bare devices as the same size?

This is not necessary, but dividing it into the same size is advantageous for managing the database.

18. Do I need to change the UNIX kernel parameters in order to use the bare device on UNIX?

No need. However, you can choose to reduce the size of the buffer if no other application is running on the same UNIX machine. Because of the use of bare devices, Unix's system buffers are no longer used.

19. In order to improve read and write speed, at the operating system level, there is still any way to take it?

Using RAID (an inexpensive redundant array of disks) is also a very effective approach, especially for systems that read and write very often.

20. After considering all these aspects, can there be any way to improve performance?

This requires an optimization of Oracle and the purchase of additional disks and disk controllers to distribute I/O to different disks.

Free to provide the latest Linux technology tutorials Books, for open-source technology enthusiasts to do more and better: http://www.linuxprobe.com/

20 examples of bare devices and Oracle answers

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.