Thoroughly optimize the Ubuntu Operating System

Source: Internet
Author: User
Article Title: thoroughly optimize the Ubuntu operating system. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

When installing the Linux system, you should consider how to make the Linux system get the best performance. Linux is also designed to be well scalable. For example, in a Linux system, we can organize disk partitions as we like. Some friends like one/and one swap, in fact, this is not a very scientific choice. I have summarized some experiences after multiple reinstalls and shared it with my friends. If there is anything wrong, please make criticism.

 The first part is to install Linux on a computer with only one hard disk.

I mentioned in the preliminary article on Optimization on the forum that Linux also has disk fragments. Therefore, to reduce the fragmentation, we should place directories with frequently changed content in separate partitions. An Optimized Partitioning policy can improve the Linux system performance, reduce disk fragments, and improve disk I/O capabilities. From the perspective of convenient data backup, because many backup tools are highly efficient in backing up the entire partition, we should use several main directories in Linux as separate file systems, allocate a zone for each of them.

Here is a brief introduction to several important directories. These directories can be mounted selectively in special partitions of Hard Disk Partitions installed in ubuntu.

Files in the/usr file system that do not change, such as libraries and programs.

/Var file system contains the file that will change.

/Home file system contains the user's home directory, that is, all the actual data on the system.

/Tmp temporary file.

/Usr/local this is the/usr directory provided to general users. It is best to install the software here.

/Srv after some services start, put the required data here.

/Opt some large programs installed here for ease of management.

/Root directory.

My suggestion is that all the above directories are separately partitioned on the hard disk. If you want to ask why, I can give an example.

For example, we can install LumaQQ under/opt. If we need to reinstall the system, we can choose not to format/opt and ~ /. The lumaqq folder is backed up, so when we reinstall the system and mount/opt again, we only need to put the. lumaqq folder in ~ Run the following command to configure java:

Code:

Sudo ln-s/opt/LumaQQ/lumaqq/usr/bin/lumaqq

You can use lumaqq again, and a series of lumaqq-related settings such as chat records will not disappear, avoiding downloading and installation troubles.

From the perspective of disk fragments,/tmp,/var, And/home are the most active partitions. If we put them directly under the root directory, it will inevitably cause processing trouble, at that time, disk fragments will affect the performance of the entire disk.

Therefore, we recommend that you separately partition and mount all the preceding directories.

It is also a coincidence when partitioning. According to the characteristics of the disk, we know that the more we rely on the external cylinder of the disk, the faster the rotation, and each time we rotate, disk read/write headers can cover a large number of areas, which means that external cylinders can provide better performance. Therefore, when partitioning, we should consider placing partitions with a High Access frequency that has a relatively large impact on system performance on the disk's off-site. The best solution should be:

/Boot-> swap->/home->/var->/tmp->/srv->/opt->/usr/local->/

Of course, there is no need to stick to this rule and make large-scale modifications to the hard disk, which can be adjusted according to the existing partitions.

In addition, do not use all the space after dividing the above partitions. Leave a few empty partitions for backup, for example, the last partition of my hard disk is a backup partition of up to 30 GB, which stores various files I downloaded online and some of my own things. Besides this partition, I also have a 10 Gb partition, which does not store anything, just to sort out disk fragments.

[1] [2] [3] [4] Next page

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.