When centos6.6 is installed, it is stuck in selinux-policy-targeted.

Source: Internet
Author: User

When centos6.6 is installed, it is stuck in selinux-policy-targeted.

Today, a centos6.6 is installed on the virtual machine, but when you press selinux-policy-targeted, the progress bar will no longer go forward. At first, I thought that I didn't have enough space for the system, so I had to install the system for 15 GB, but this happened again. I only created the root partition/and no SWAP partition when customizing partitions.

When I installed the system for the third time and created a custom partition, I allocated 10000 M to/and 4000 M to swap. The system is successfully installed this time.

Of course, it is okay to create/only in the fashion system, but we can add the SWAP partition to make it more stable. If you develop good habits, you will not have such problems.

The following describes the functions of swap partitions:

Swap partition, that is, the Swap zone. When the physical memory is insufficient, the system exchanges with Swap. In fact, Swap adjustment is crucial to the performance of Linux servers, especially Web servers. By adjusting Swap, the system performance bottleneck is sometimes crossed to save system upgrade costs.

Computer users often encounter this phenomenon. For example, when you use a Windows system, you can run multiple programs at the same time. When you switch to a program that has been ignored for a long time, you will hear the hard disk burst. This is because the memory of this program is "stolen" by frequently running programs and put in the Swap area. Therefore, once the program is placed on the front end, it will retrieve its data from the Swap area, put it into the memory, and then run.

It should be noted that not all data exchanged from the physical memory will be put into Swap (if so, Swap will be overwhelmed ), A considerable amount of data is directly exchanged to the file system. For example, some programs open some files and read and write the files (in fact, each program must open at least one file, that is, run the program itself ), when you need to Swap out the memory space of these programs, there is no need to put the data in the file part into the Swap space, and you can directly put it in the file. If it is a file read operation, the memory data is directly released and does not need to be exchanged, because it can be directly restored from the file system when needed next time; if it is a file write operation, you only need to save the changed data to the file for recovery. However, the data of objects generated using the malloc and new functions is different. They need Swap space because they do not have the corresponding "reserve" file in the file system, therefore, it is called "Anonymous" (Anonymous) memory data. This type of data also includes some status and variable data in the stack. Therefore, the Swap space is the Swap space for "anonymous" data.

If you allocate too much Swap space, the disk space will be wasted, and the Swap space is too small, the system will encounter an error. If the system's physical memory is used up, the system will run slowly but still run. If the Swap space is used up, the system will encounter an error. The Swap space should be greater than or equal to the physical memory size, and the minimum should not be less than 64 M. Generally, the Swap space should be 2-times the physical memory size.
In addition, the number of Swap partitions has a great impact on the performance. Because Swap operations are disk IO operations, if there are multiple Swap areas, the Swap space allocation will operate on all Swap in turn, this will greatly balance the IO load and speed up Swap switching. If there is only one swap area, all the swap operations will make the swap area very busy, so that the system is waiting for most of the time, the efficiency is very low. The performance monitoring tool will find that the CPU is not very busy at this time, but the system is slow. This shows that the bottleneck lies in I/O, and it cannot be solved by increasing the CPU speed.

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.