How to modify shared memory in Linux

Source: Internet
Author: User

We often use computers, and the computer is essential to the operating system. However, Linux is developing very rapidly and is catching up with Microsoft. Here we will introduce the knowledge of Linux, so that you can learn how to use Linux. Today, we will talk about how to modify and share a Linux system. I hope you will remember how to modify and share a Linux system.

Recently, when optimizing oracle, I encountered that the size of oracle's SGA is much larger than the maximum shared memory in linux, so that when I run the ipcs command to view it, oracle's SGA partition is divided into 10 segments, which greatly affects the response speed of oracle. Later, after reading the materials, I found a simple way to modify the shared memory and share it with you.

Generally, it is very troublesome to modify the kernel program to modify the shared memory of the system and then make the program. In fact, you only need to add something to rc. local to save the trouble of modifying the kernel. Modify the/etc/rc. d/rc. local file as follows.

Add the following lines to the front comment of the file:

# Modify the Kernel shared memory size;

Echo 134217728>/proc/sys/kernel/shmmax;

# Note: The value here is half of the memory;

# If the system memory is 256 MB, the value is 134217728;

# If the system memory is 512 MB, the value is 268435456;

After modification, restart the machine.

By default, linxu's shared memory size seems to be 32 MB. I used ipcs to check the size of my machine before modification. There are 10 oracle segments. After modification, there will be only one. Oracle improves the data exchange speed in a memory segment.

In this way, you can complete the Linux system modification and sharing.

  1. The increased complexity of the mainframe stems from the Linux operating system
  2. How to configure disk quotas in Linux
  3. Message reminders added to Apple for Linux Desktop Learning
  4. Lu shouqun: the first battle for Desktop Linux
  5. Player and decoder installation for Fedora linux

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.