Supplement to FreeBSD5 optimization

Source: Internet
Author: User
Article title: Supplement to FreeBSD5 optimization. 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.

I still remember the last time I saw an article about FreeBSD 5 optimization, one year ago, when I started learning UNIX. In this year, I learned a lot about FreeBSD and UNIX. I am more interested in how FreeBSD maximizes performance. Now FreeBSD has replaced my Windows2000 and become the only OS on my computer. The secret of experience is not exclusive. I would like to discuss with all FreeBSD enthusiasts here. if anything inappropriate, please point out criticism.

· This document assumes that you have read the FreeBSD Installation Manual.
· When reading this article, be sure to refer to the installation optimization article.
· This article follows the GPL protocol.
· This article follows the BSDL protocol.
· Other authors are welcome to write various FreeBSD optimization articles based on the content of this article.

1. install sysinstall)

1. in Distribution, select only minimal and Customization. Add man. when a problem occurs, you can view the command parameters. after adding src, cvsup can speed up reading duplicate files.

2. in Users, after adding a user, change/home/abc in the user path to/usr/abc. Because the/usr capacity is large. You can also increase the/home capacity, but it is troublesome.
Then, you need to change the shell to csh for ease of use (also for the settings in part 7 of this article ).

II. make. conf)

Note: to block a boolean option, do not mark no or false! The whole line is deleted!

1. compiler options

CPUTYPE = athlon-xp
# I use AthlonXP 2500 +. For more information about CPU usage, see man make. conf.

CFLAGS + =-mfpmath = sse-mmmx-msse-m3dnow-maccumulate-outgoing-args
-Minline-all-stringops
##
Optimization of O2, O3, and OS is not recommended, because not all applications can work stably on O2, O3, and OS. In addition, only 7% of the additional performance can be obtained.
# The default CFLAGS value is "-O1-pipe" and does not need to be overwritten. Therefore, + = is used.
# It is not recommended to use-f... series optimization because not all applications can work stably.

#-Mfpmath = sse:
The PentiumIII compatible CPU can enable-mfpmath = sse to replace the traditional i387 floating point operation to speed up. Refer to the CPU product manual to determine whether the CPU contains the SSE function.
#-Mfpmath = pni: Pentium4
Prescott compatible CPU can enable-mfpmath = pni to replace the traditional i387 floating point operation to speed up. Refer to the CPU product manual to determine whether the CPU contains the PNI function.
#-Mmmx:
Open the mmx command to increase the code performance. Refer to the CPU product manual to determine whether the CPU contains the MMX function. Applicable to PentiumMMX CPU compatibility.
#-Msse:
Open the sse command to increase code performance. Refer to the CPU product manual to determine whether the CPU contains the SSE function. Applicable to PentiumIII CPU compatibility.
#-Msse2:
Open the sse2 command to increase code performance. Refer to the CPU product manual to determine whether the CPU contains the SSE2 function. Applicable to Pentium4 CPU compatibility.
#-Mpni:
Open the pni command to increase code performance. Refer to the CPU product manual to determine whether the CPU contains the PNI function. Applicable to Pentium4
Prescott is compatible with CPU.
#-M3dnow:
Open 3 DNow! Command to increase code performance. Refer to the CPU product manual to determine whether the CPU contains 3 DNow! Function. Applicable to K6 and Athlon compatible CPUs.


#-Maccumulate-outgoing-args-minline-all-stringops
By reducing some actions to achieve acceleration, the author's experiment is relatively stable.

CXXFLAGS + =-fmemoize-lookups-fsave-memoized
# C ++ code optimization mentioned in make. conf.

2. system compilation options
KERNCONF = (FILENAME)
# Change the kernel configuration file name (FILENAME) to your own kernel file name.

NOINET6 = true
# Try not to use the IPV6 protocol.

NOATM = true
# Do not use ATM whenever possible. this option is only applicable to non-ADSL users.

NO_SENDMAIL = true
# Try not to use SENDMAIL.

NOGAMES = true
# Do not install all games

NO_I4B = true
# Do not use ISDN For BSD whenever possible.

NO_IPFILTER = true
# Try not to use IP Filter.

BATCH = yes
# Quiet compilation, skip all questions during compilation. Applicable to users who compile programs overnight.

3. X-Window compilation options
XFREE86_VERSION = 4
# Try to use the X-Window version 4.3

WITH_SETUID_LUIT = yes
# If this item is not used, a luit error occurs when running xterm.

WITH_GTK2 = yes
# Use GTK2 as the runtime library of the gtk application whenever possible

USE_MMX_ASM = yes
# When compiling Xfree86, try to use MMX code, only applicable to PentiumMMX compatible CPU.

USE_3DNOW_ASM = yes
# When compiling Xfree86, use the 3DNOW code whenever possible. it is only applicable to K6 and Athlon compatible CPUs.

WITHOUT_KDE_MENUS = yes
# When GNOME is used, KDE programs are not added to the menu.

 

[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.