介紹 html
本文檔是一篇關於Linux Kernel 2.6.36的最簡優化指南。做者旨在編譯一份性能最佳且適合程序開發用的內核(帶gnome圖形界面)。
本文說起的內核調優,主要是經過選擇最佳編譯選項,刪除無用驅動,減小內核尺寸,關閉部分安全特性等方式來進行的。 linux
優化後的效果,主要體如今OS啓動時間,啓動後的內存佔用以及應用程序運行性能。 ios
因爲做者水平有限,若是描述錯誤,還請不吝指教。 git
運行環境 web
虛擬機 算法 |
Virtualbox 4.0.2 shell |
CPU 安全 |
Core i7 四核,虛擬給2核 開啓 vt-x, IO APIC 服務器 |
磁盤 cookie |
虛擬 10G的SATA磁盤 |
內存 |
分了2G物理內存 |
網卡 |
虛擬 Intel PRO/1000 MT |
顯卡 |
128M 顯存 |
其餘 |
USB,串口,聲卡全關 |
做者是在虛擬機中編譯的內核,若是你與做者的運行環境不一樣,則本文檔中的部分描述可能會與你的實際狀況有必定出入。
不過,相信大部分用戶在看到選項釋義時,能作出適合本身的選擇。
參考資料
http://www.path8.net/tn/archives/3497
優化先後性能對比
項目 |
優化前 |
優化後 |
內核尺寸 |
4.1M |
1.6M |
啓動時間(含dhcp+默認initservice) |
22s |
14s |
啓動後的內存佔用 |
25M |
22M |
APP SPEC測試成績 |
待測 |
待測 |
紅色註釋爲禁用該選項的理由和解釋。
黑色註釋爲默認選擇的選項含義解釋。
其他未默認選擇的選項,不作任何解釋。
General setup --->
[ ] Prompt for development and/or incomplete code/drivers <=== 顯示尚在開發中或還沒有完成的代碼與驅動. 有許多設備可能必需選擇這個選項才能進行配置. 我選擇關閉,首先我不是內核或驅動開發人員,其次,我沒有碰到哪一個設備須要開啓這個選項才能使用的。你們能夠放心禁用,最多出問題後,再開啓。
() Local version - append to kernel release
[ ] Automatically append version information to the version string
Kernel compression mode (Bzip2) ---> <=== 對比默認的Gzip,Bzip2是一個基於Burrows- Wheeler 變換的無損壓縮軟件,壓縮效果比傳統的LZ77/LZ78壓縮算法來得好。建議選擇它。
[*] Support for paging of anonymous memory (swap) // 將使你的內核支持虛擬內存。這個虛擬內存在LINUX中就是SWAP分區。除非你不想要SWAP分區,不然這裏必選Y。
[*] System V IPC // System V進程間通訊(IPC)支持,於處理器在程序之間同步和交換信息,若是不選這項,不少程序運行不起來,特別地,你想在LINUX下運行 DOS仿真程序,你必需要選Y。
[*] BSD Process Accounting // 這是容許用戶進程訪問內核,將帳戶信息寫入文件中。這一般被認爲是個好主意,建議你最好將它選上。將進程的統計信息寫入文件的用戶級系統調用,主要包括進程的建立時間/建立者/內存佔用等信息。
[ ] BSD Process Accounting version 3 file format
[ ] Export task/process statistics through netlink (EXPERIMENTAL) <=== 處於實驗階段的功能。經過通用的網絡輸出工做/進程的相應數據,和BSD不一樣的是,這些數據在進程運行的時候就能夠經過相關命令訪問。和BSD相似,數據將在進程結束時送入用戶空間。不清楚,選N
[ ] Auditing support <=== 審計支持,用於和內核的某些子模塊同時工做,(例如SELinux)須要它,只有同時選擇其子項才能對系統調用進行審計。個人使用場景主要是開發應用程序,不須要那麼高的安全性,另外安全老是以犧牲性能爲代價
RCU Subsystem ---> // 非對稱讀寫鎖系統 是一種高性能的kernel鎖機制,適用於讀多寫少環境
RCU Implementation (Tree-based hierarchical RCU) --->
< > Kernel .config support
(18) Kernel log buffer size (16 => 64KB, 17 => 128KB)
[ ] Control Group support ---><=== cgroups支持,文檔資料,cgroups主要做用是給進程分組,並能夠動態調控進程組的CPU佔用率。好比A進程分到apple組,給予20%CPU佔用率,E進程分easy組,給予50%CPU佔用率,最高100%。我目前沒有此類應用場景,用到時會選擇將其編譯進去。
[ ] enable deprecated sysfs features to support old userspace tools
[ ] Kernel->user space relay support (formerly relayfs) <=== 在某些文件系統上(好比debugfs)提供從內核空間向用戶空間傳遞大量數據的接口,我目前沒有此類應用場景
-*- Namespaces support
[ ] UTS namespace <=== 我沒有已安裝的應用程序要用到 UTS ns
[ ] IPC namespace <=== 我沒有已安裝的應用程序要用到 IPC ns
[ ] Initial RAM filesystem and RAM disk (initramfs/initrd) support <=== 用於在真正內核裝載前,作一些操做(俗稱兩階段啓動),好比加載module,mount一些非root分區,提供災難恢復shell環境等,資料,我是指望直接從kernel image直接啓動,因此沒選它
[ ] Optimize for size <=== 這個選項將在GCC命令後用 「-Os」 代替 「-O2″參數,這樣能夠獲得更小的內核。不必選。選上了有時會產生錯誤的二進制代碼。
[ ] Configure standard kernel features (for small systems) --->
-*- Load all symbols for debugging/ksymoops
[] Include all symbols in kallsyms <=== 在kallsyms中包含內核知道的全部符號,內核將會 增大300K,不調式內核關閉
[] Do an extra kallsyms pass <=== 除非你在kallsyms中發現了bug並須要報告這個bug纔打開該選項
Kernel Performance Events And Counters --->
-*- Kernel performance events and counters // CPU 性能監聽器,包括 CPU同一時間執行指令數,cache miss數,分支預測失敗次數(Branch misprediction)。調優其餘程序時或許會用到,好比JVM
[ ] Debug: use vmalloc to back perf mmap() buffers < === 調試特性關閉
[ ] Kernel performance counters (old config option)
[ ] Disable heap randomization
Choose SLAB allocator (SLUB (Unqueued Allocator)) --->
[ ] Profiling support (EXPERIMENTAL) <=== 我不是內核開發人員,不須要profiling內核,用到時再啓用。若是要用OProfiler的同窗請啓用。
[ ] Kprobes <=== 我不是內核開發人員,不須要調試內核
GCOV-based kernel profiling --->
[ ] Enable gcov-based kernel profiling
[*] Enable loadable module support ---> // 打開可加載模塊支持,若是打開它則必須經過」make modules_install」把內核模塊安裝在/lib/modules/中這個選項可讓你的內核支持模塊
--- Enable loadable module support
[ ] Forced module loading
[*] Module unloading // 容許卸載已經加載的模塊
[ ] Module versioning support
[ ] Source checksum for all modules
-*- Enable the block layer --->
--- Enable the block layer
[*] Support for large (2TB+) block devices and files // 大硬盤支持,SATA設備若是不選,會發生 kernel panic,具體緣由未知
[ ] Block layer SG support v4 <=== 支持通用scsi塊設備第4版,我用的是SATA
[ ] Block layer data integrity support
IO Schedulers ---> // IO調度器支持,不一樣程序能夠會選用不一樣的調度策略,這裏咱們不要動他
<*> Anticipatory I/O scheduler
<*> Deadline I/O scheduler
<*> CFQ I/O scheduler
Default I/O scheduler (CFQ) --->
Processor type and features --->
[*] Tickless System (Dynamic Ticks) // 動態時間片系統,這項技術能讓新內核運行的更有效率,而且更省電。動態時間片意思是當CPU處於空閒時,下降內核定時器的輪詢頻率
[*] High Resolution Timer Support // 我有的時候要測試 Real Time JVM,但願內核能支持這種高響應速度的內核定時器,通常用戶可關閉
[*] Symmetric multi-processing support // 對稱多處理器支持,若是你有多個CPU或者使用的是多核CPU就選上。
[ ] Support sparse irq numbering <=== 支持稀有的中斷編號,關閉
[ ] Enable MPS table < === mps多處理器規範,關閉
[ ] Support for big SMP systems with more than 8 CPUs
[ ] Support for extended (non-PC) x86 platforms <=== 我是X86平臺,不須要再支持其餘平臺
[*] Single-depth WCHAN output // 跟 proc 相關的最好不要關
[ ] Paravirtualized guest support --->
--- Paravirtualized guest support
[*] Disable Bootmem code // 優化內核中一些複雜的初始化內存分配邏輯
[ ] Memtest
Processor family (Core 2/newer Xeon) ---> <=== 這裏請選擇對應的CPU,我是 core 2 duo
[ ] Generic x86 support <=== 通用x86支持, 若是你的CPU可以在上述"Processor family"中找到就別選了
[*] HPET Timer Support // HPET時鐘支持。容許內核使用 HPET 。HPET是替代8254芯片的新一代定時器,i686及以上級別的主板都支持,能夠安全的選上。可是,HEPT只會在支持它的平臺和BIOS上運行。如 果不支持,8254將會激活。選N,將繼續使用8254時鐘
(8) Maximum number of CPUs // 支持的最大CPU數,每增長一個內核將增長8K體積
[ ] SMT (Hyperthreading) scheduler support < === 支持Intel的超線程(HT)技術超線程調度器在某些狀況下將會對 Intel Pentium 4 HT系列有較好的支持。若是你不清楚,選N
[*] Multi-core scheduler support // 針對多核CPU進行調度策略優化多核調度機制支持,雙核的CPU要選。多核心調度在某些狀況下將會對多核的CPU系列有較好的支持。
Preemption Model (Voluntary Kernel Preemption (Desktop)) ---> // 內核搶佔模式一些優先級很高的程序能夠先讓一些低優先級的程序執行,即便這些程序是在覈心態下執行。從而減小內核潛伏期,提升系統的響應。固然在一些特殊 的點的內核是不可搶先的,好比內核中的調度程序自身在執行時就是不可被搶先的。這個特性能夠提升桌面系統、實時系統的性能。
[*] Reroute for broken boot IRQs // 防止同時收到多個boot IRQ(中斷)時,系統混亂
[*] Machine Check Exception // 讓CPU檢測到系統故障時通知內核,以便內核採起相應的措施(如過熱關機等)
[*] Intel MCE features
[ ] AMD MCE features <=== 我是intel CPU
[ ] Support for old Pentium 5 / WinChip machine checks
< > Machine check injector support
< > Toshiba Laptop support
< > Dell laptop support
[ ] Enable X86 board specific fixups for reboot <=== 修正某些舊x86主板的重起bug,這種主板基本絕種了
<*> /dev/cpu/microcode - microcode support // 是否支持Intel IA32架構的CPU。這個選項將讓你能夠更新Intel IA32系列處理器的微代碼,顯然你須要到網上去下載最新的代碼,LINUX不提供這些代碼。固然你還必須在文件系統選項中選擇/dev file system support才能正常的使用它。若是你把它譯爲模塊 ,它將是 microcode。IA32主要用於高於4GB的內存。詳見下面的「高內存選項」。使用不隨Linux內核發行的IA32微代碼,你必需有IA32微代 碼二進制文件,僅對Intel的CPU有效
[*] Intel microcode patch loading support
[ ] AMD microcode patch loading support <=== 我是intel CPU
<*> /dev/cpu/*/msr - Model-specific register support // 是否打開CPU特殊功能寄存器的功能。這個選項桌面用戶通常用不到,它主要用在Intel的嵌入式CPU中的,這個寄存器的做用也依賴與不一樣的CPU類型 而有所不一樣,通常能夠用來改變一些CPU原有物理結構的用途,但不一樣的CPU用途差異也很大。在多cpu系統中讓特權CPU訪問x86的MSR寄存器
<*> /dev/cpu/*/cpuid - CPU information support // 是否打開記錄CPU相關信息功能。這會在/dev/cpu中創建一系列的設備文件,用以讓過程去訪問指定的CPU。能從/dev/cpu/x/cpuid 得到CPU的惟一標識符(CPUID)
High Memory Support (4GB) --->
[ ] Enable KSM for page merging
(4096) Low address space to protect from user allocation
[ ] Enable recovery from hardware memory errors
[ ] Allocate 3rd-level pagetables from highmem <=== 在內存不少(大於4G)的機器上將用戶空間的頁表放到高位內存區,以節約寶貴的低端內存 ,我只虛擬了1G
[ ] Check for low memory corruption <=== 低位內存髒數據檢查,默認是每60秒檢查一次。通常這種髒數據是因某些Bios處理不當引發的。資料連接。我信任我目前的虛擬bios版本
[ ] Reserve low 64K of RAM on AMI/Phoenix BIOSen <=== 我不是 AMI/Phoenix BIOS
[ ] Math emulation
-*- MTRR (Memory Type Range Register) support // 內存類型區域寄存器。在 Intel P6 系列處理器(Pentium Pro, Pentium II 和更新的)上,MTRR將會用來規定和控制處理器訪問某段內存區域的策略。若是你在PCI或者AGP總線上有VGA卡,這將很是有用。能夠提高圖像的傳送 速度2.5倍以上。選Y,會生成文件/proc/mtrr,它能夠用來操縱 你的處理器的MTRR。典型地,X server會用到。這段代碼有着通用的接口,其餘CPU的寄存器一樣可以使用該功能。Cyrix 6×86, 6×86MX和 M II處理器有ARR ,它和 MTRR有着相似的功能。AMD K6-2/ K6-3有兩個MTRR,Centaur C6有8個MCR容許複合寫入。全部這些處理器都支持這段代碼,你能夠選Y若是你有以上處理器。選Y一樣能夠修正SMP BIOS的問題,它僅爲第一個CPU提供MTRR,而不爲其餘的提供。這會致使各類各樣的問題,因此選Y是明智的。你能夠安全地選Y,即便你的機器沒有 MTRR。這會給內核增長9KB。打開它能夠提高PCI/AGP總線上的顯卡2倍以上的速度,而且能夠修正某些BIOS錯誤
[ ] MTRR cleanup support
[ ] EFI runtime service support <=== 我機器是BIOS引導的,用不到EFI(Extensible Firmware Interface),若是你有興趣體驗EFI,能夠在Virtualbox中開啓
[ ] Enable seccomp to safely compute untrusted bytecode <=== 只有嵌入式系統能夠不選
[ ] Enable -fstack-protector buffer overflow detection (EXPERIMENTAL)
Timer frequency (1000 HZ) ---> // Timer frequency (1000 HZ) —>內核時鐘頻率 桌面1000 服務器100或250
[ ] kexec system call <=== kexec 系統調用。kexec是一個用來關閉你當前內核,而後開啓另外一個內核的系統調用。它和重啓很像,可是它不訪問系統固件。因爲和重啓很像,你能夠啓動任何內 核,不只僅 是LINUX。kexec這個名字是從 exec 系統調用來的。它只是一個進程,能夠肯定硬件是否正確關閉,Linus本人都沒話說,估計是受害不淺。咱們固然不能上當,選N!提供kexec系統調用, 能夠沒必要重啓而切換到另外一個內核,若是須要就選擇,對大多數用戶來講並不須要
[ ] kernel crash dumps <=== 內核崩潰時,dump運行時信息。就算crash了,我也不會去調試內核的core dump
[ ] Build a relocatable kernel <=== 官方說明 (創建一個移動的內核,並增長10%的內核尺寸,運行時會被丟棄),我認爲沒實質性的做用
(0x1000000) Physical address where the kernel is loaded
-*- Support for hot-pluggable CPUs // 對SMP休眠和熱插拔CPU提供支持
[ ] Compat VDSO support
[ ] Built-in kernel command line
Power management and ACPI options --->
[*] Power Management support
[ ] Power Management Debug Support <=== 不想調試ACPI
[ ] Extra PM attributes in sysfs for low-level debugging/testing
[ ] Verbose Power Management debugging
[*] Suspend to RAM and standby // 待機
[*] Hibernation (aka 'suspend to disk') // 休眠
[ ] Runtime PM core functionality
[*] ACPI (Advanced Configuration and Power Interface) Support --->
[*] Deprecated /proc/acpi files
[*] Deprecated power /proc/acpi directories
<> ACPI 4.0 power meter
[*] Future power /sys interface
<> EC read/write through /sys/kernel/debug/ec
[*] Deprecated /proc/acpi/event support
<*> AC Adapter
<*> Battery
<*> Button
<*> Fan
<*> Processor
<*> Thermal Zone
(0) Disable ACPI for systems before Jan 1st this year
[ ] Debug Statements
< > PCI slot detection driver
< > Smart Battery System
< > Hardware Error Device
[ ] ACPI platform Error Interface (APEI)
[ ] SFI (Simple Firmware Interface) Support --->
< > APM(Advanced Power Management) BIOS Support --->
CPU Frequency scaling --->
[*] CPU Frequency scaling
[ ] Enable CPUfreq debugging <=== 我不須要調試 CPUfreq
< > CPU frequency translation statistics
Default CPUFreq governor (performance) ---> <=== 默認用 performance高性能的CPU調頻方式
-*- 'performance' governor
< > 'powersave' governor
<> 'userspace' governor for userspace frequency scaling
<> 'ondemand' cpufreq policy governor <=== "週期性的考察CPU負載並自動的動態調整cpu頻率",我只用 performance
<> 'conservative' cpufreq governor
*** CPUFreq processor drivers ***
< > Processor Clocking P-stat driver
<*> ACPI Processor P-States driver
< > AMD Mobile K6-2/K6-3 PowerNow!
< > AMD Mobile Athlon/Duron PowerNow!
< > AMD Opteron/Athlon64 PowerNow!
< > Cyrix MediaGX/NatSemi Geode Suspend Modulation
< > Intel Enhanced SpeedStep (deprecated)
< > Intel Speedstep on ICH-M chipsets (ioport interface)
< > Intel Pentium 4 clock modulation
< > Transmeta LongRun
< > VIA Cyrix III Longhaul
[ ] Cpuidle Driver for Intel Processors
Bus options (PCI etc.) --->
[*] PCI support
PCI access mode (Any) --->
[ ] Read CNB20LE Host Bridge Window
[*] PCI Express support
< > PCI Express Hotplug driver
[*] Root Port Advanced Error Reporting support // 硬件驅動會負責發送錯誤信息
[ ] PCI Express ECRC settings control
< > PCIE AER error injector support
-*- PCI Express ASPM control
[ ] Debug PCI Express ASPM
[*] Message Signaled Interrupts (MSI and MSI-X)
[ ] PCI Debugging
< > PCI Stub driver
[*] Interrupts on hypertransport devices
[ ] PCI IOV support
[ ] ISA support
[ ] MCA support
< > NatSemi SCx200 support
[ ] One Laptop Per Child support
[ ] Support for OLPC’s Open Firmware
< > PCCard (PCMCIA/CardBus) support ---> <=== 通常筆記本電腦會配備PCCard接口(無線網卡之類的),看你的硬件和使用場景吧。雖然我也是NB,但我歷來不用PCMCIA
< > Support for PCI Hotplug ---> <=== 我沒有要熱拔插PCI設備的需求
Executable file formats / Emulations --->
[*] Kernel support for ELF binaries
[*] Write ELF core dumps with partial segments
< > Kernel support for a.out and ECOFF binaries
<*> Kernel support for MISC binaries
[*] Networking support --->
Networking options --->
<*> Packet socket
<*> Unix domain socket
<*> Transformation user configuration interface
< > PF_KEY sockets
[*] TCP/IP networking
[*] IP: multicasting
[*] IP: advanced router
Choose IP: FIB lookup algorithm (choose FIB_HASH if unsure) (FIB_HASH) --->
[*] IP: policy routing
[*] IP: equal cost multipath
[*] IP: verbose route monitoring
[ ] IP: kernel level autoconfiguration <=== 我不多用網絡引導OS,內核級別的網絡配置對我無用。
[ ] IP: DHCP support
[ ] IP: BOOTP support
[ ] IP: RARP support
< > IP: tunneling
< > IP: GRE tunnels over IP
[*] IP: multicast routing
[ ] IP: multicast policy routing
[*] IP: PIM-SM version 1 support
[*] IP: PIM-SM version 2 support
[ ] IP: ARP daemon support
[ ] IP: TCP syncookie support (disabled per default) <=== 抵抗SYN flood攻擊,我是開發機,暫不考慮安全特性
< > IP: AH transformation
< > IP: ESP transformation
< > IP: IPComp transformation
< > IP: IPsec transport mode
< > IP: IPsec tunnel mode
< > IP: IPsec BEET mode
[*] Large Receive Offload (ipv4/tcp)
< > INET: socket monitoring interface
[ ] TCP: advanced congestion control ---> <=== 高級擁塞控制,若是沒有特殊需求(好比無線網絡)就別選了
< > The IPv6 protocol ---> <=== 我暫時沒有要支持IPV6的需求
[ ] NetLabel subsystem support <=== NetLabel子系統, 爲諸如CIPSO與RIPSO之類可以在分組信息上添加標籤的協議提供支持,我用不到
[ ] Security Marking <=== 對網絡包進行安全標記,相似於nfmark,但主要是爲安全目的而設計, 安全特性,我暫時不考慮
[ ] Network packet filtering framework (Netfilter) ---> <=== 我不打算使用防火牆,要用到時再編譯進去
< > Asynchronous Transfer Mode (ATM)
< > 802.1d Ethernet Bridging
< > 802.1Q VLAN Support
< > DECnet Support
< > ANSI/IEEE 802.2 LLC type 2 Support
< > The IPX protocol
< > Appletalk protocol support
< > Phonet protocols family
[ ] QoS and/or fair queueing ---> <=== 經過IPRoute切換網絡設備上的Qos策略,我不打算使用IP路由
[ ] Data Center Bridging support
Network testing --->
[ ] Amateur Radio support ---> <=== 我沒有無線電
< > CAN bus subsystem support --->
< > IrDA (infrared) subsystem support --->
< > Bluetooth subsystem support --->
[ ] Wireless ---> <=== 我沒有使用無線網卡
<> cfg80211 – wireless configuration API
<> Common routines for IEEE802.11 driver
[ ] Wimax Wireless Broadband support
< > RF switch subsystem support ---> <=== 我沒有RF切換設備
< > CAIF support
Device Drivers --->
Generic Driver Options --->
(/sbin/hotplug) path to uevent helper
[*] Prevent firmware from being built
-*- Userspace firmware loading support
[*] Include in-kernel firmware blobs in kernel binary
() External firmware blobs to build into the kernel binary
[ ] Driver Core verbose debug messages
[ ] Managed device resources verbose debug messages <=== 管理設備資源的冗長調試信息,我不須要
<*> Connector - unified userspace <-> kernelspace linker --->// 內核空間與用戶空間的信道
[*] Report process events to userspace // 報告處理時間給用戶空間
< > Memory Technology Device (MTD) support --->
< > Parallel port support --->
-*- Plug and Play support --->
[ ] PNP debugging messages <=== 調試信息,老規矩
[ ] Block devices ---> <=== 我沒有想要支持的塊設備,好比ramdisk, 磁盤陣列,CD/DVD刻錄等,詳見內部選項
[ ] Misc devices ---> <=== 沒有須要支持的雜項設備
< > ATA/ATAPI/MFM/RLL support --->
SCSI device support --->
< > RAID Transport Class
-*- SCSI device support
[] legacy /proc/scsi/ support <=== 我沒有SCSI設備
*** SCSI support type (disk, tape, CD-ROM) ***
<*> SCSI disk support // 就算你用SATA,此選項也必選
< > SCSI tape support
< > SCSI OnStream SC-x0 tape support
<> SCSI CDROM support <=== 我沒有SCSI設備
<> SCSI generic support <=== 我沒有SCSI設備
< > SCSI media changer support
[ ] Probe all LUNs on each SCSI device
[] Verbose SCSI error reporting (kernel size +=12K) <=== 我沒有SCSI設備
[ ] SCSI logging facility
[ ] Asynchronous SCSI scanning
SCSI Transports --->
<> Parallel SCSI (SPI) Transport Attributes <=== 我沒有SCSI設備
< > FiberChannel Transport Attributes
< > iSCSI Transport Attributes
< > SAS Domain Transport Attributes
< > SRP Transport Attributes
[ ] SCSI low-level drivers --->
< > SCSI Device Handlers --->
< > OSD-Initiator library
Serial ATA (prod) and Parallel ATA (experimental) drivers --->
[*] Verbose ATA error reporting
[*] ATA ACPI Support
[ ] SATA Port Multiplier support <=== 我只有一枚SATA設備,沒有使用 多路SATA/SATA Hub 的需求。Port Multiplier是南橋芯片提供的一種支持多塊SATA設備,並共享總帶寬的技術。
<*> AHCI SATA support
< > Platform AHCI SATA support
< > Inito 162x SATA support
< > Silicon Image 3124/3132 SATA support
[*] ATA SFF support // 選擇本身硬件對應的驅動便可
< > ServerWorks Frodo / Apple K2 SATA support
<*> Intel ESB, ICH, PIIX3, PIIX4 PATA/SATA support // Intel ICH,G系列chipset driver
< > Marvell SATA support
< > NVIDIA SATA support
< > Pacific Digital ADMA support
< > Pacific Digital SATA QStor support
< > Promise SATA TX2/TX4 support
< > Silicon Image SATA support
< > SiS 964/965/966/180 SATA support
< > ULi Electronics SATA support
< > VIA SATA support
< > VITESSE VSC-7174 / INTEL 31244 SATA support
< > Initio 162x SATA support
< > ACPI firmware driver for PATA
< > ALi PATA support
< > AMD/NVidia PATA support <=== 我用的是SATA,取消PATA支持
< > ARTOP 6210/6260 PATA support
< > ATI PATA support
< > CMD64x PATA support
< > CS5510/5520 PATA support
< > CS5530 PATA support
< > CS5536 PATA support
< > EFAR SLC90E66 support
< > Generic ATA support
< > HPT 366/368 PATA support
< > HPT 343/363 PATA support
< > IT8211/2 PATA support
< > JMicron PATA support
< > Compaq Triflex PATA support
< > Marvell PATA support via legacy mode
<> Intel PATA MPIIX support <=== 我用的是SATA,取消PATA支持
< > Intel PATA old PIIX support <=== 我用的是SATA,取消PATA支持
< > NETCELL Revolution RAID support
< > Nat Semi NS87410 PATA support
< > Nat Semi NS87415 PATA support
< > Older Promise PATA controller support
< > PC Tech RZ1000 PATA support
< > SC1200 PATA support
< > SERVERWORKS OSB4/CSB5/CSB6/HT1000 PATA support
< > Promise PATA 2027x support
< > CMD / Silicon Image 680 PATA support
< > SiS PATA support
< > VIA PATA support
< > Winbond SL82C105 PATA support
< > Intel SCH PATA support <=== 我用的是SATA,取消PATA支持
[ ] Multiple devices driver support (RAID and LVM) ---> <=== 暫時沒有要使用Raid(磁盤陣列)和LVM(邏輯卷管理器,添加,刪除邏輯分區)的需求
[ ] Fusion MPT device support --->
IEEE 1394 (FireWire) support --->
< > I2O device support --->
[ ] Macintosh device drivers ---> <=== Mac系統硬件設備驅動,沒什麼好說的,關
[*] Network device support --->
< > Dummy net driver support
< > Bonding driver support
< > EQL (serial line load balancing) support
< > Universal TUN/TAP device driver support
< > Virtual ethernet pair device
< > General Instruments Surfboard 1000
< > ARCnet support --->
-*- PHY Device support and infrastructure ---> <=== PHY (物理層控制芯片) ,裏面沒有我對應的硬件
[ ] Ethernet (10 or 100Mbit) ---> <=== 若是你是百 M卡,請自行選擇
[*] Ethernet (1000 Mbit) ---> // 選擇本身對應的硬件
[ ] Ethernet (10000 Mbit) ---> <=== 若是你是萬M卡,請自行選擇
<> Token Ring driver support ---> <=== IBM的令牌環網,用以太網的忽略
[ ] Wireless LAN ---> <=== 不用無線網絡
*** Enable WiMAX (Networking options) to see the WiMAX drivers ***
USB Network Adapters --->
[ ] Wan interfaces support --->
<> FDDI driver support <=== 光纖卡驅動,相信沒幾我的能用上這玩意
< > PPP (point-to-point protocol) support
< > SLIP (serial line) support
[ ] Fibre Channel driver support
[ ] Network console logging support
[ ] VMware VMXNET3 ethernet driver
[ ] ISDN support --->
< > Telephony support --->
Input device support --->
-*- Generic input layer (needed for keyboard, mouse, ...)
-*- Support for memoryless force-feedback devices
<> Polled input device skeleton <=== 一種週期性輪詢硬件狀態的驅動,去掉後沒什麼反作用
*** Userland interfaces ***
-*- Mouse interface
[ ] Provide legacy /dev/psaux device
(1024) Horizontal screen resolution
(768) Vertical screen resolution
< > Joystick interface
<*> Event interface // 將輸入設備的事件存儲到/dev/input/eventX供應用程序讀取
< > Event debugging
*** Input Device Drivers ***
-*- Keyboards --->
[*] Mice --->
[] Joysticks/Gamepads ---> <=== 遊戲設備
[] Tablets ---> <=== 平板PC
[] Touchscreens ---> <=== 觸摸屏
[] Miscellaneous devices ---> <=== 雜七雜八的驅動,揚聲器,筆記本擴展按鍵等
Hardware I/O ports --->
Character devices --->
-*- Virtual terminal
[*] Support for binding and unbinding console drivers // 在某些系統上可使用多個控制檯驅動程序(如framebuffer控制檯驅動程序),該選項使得你能夠選擇其中之一 ,我通常只用默認的虛擬終端
[] /dev/kmem virtual device support <=== 支持/dev/kmem設備,不多用
[] Non-standard serial port support <=== 我沒有非標準的串口設備
Serial drivers --->
< > 8250/16550 and compatible serial support <=== 兼容一些老式的串口設備,我通常不用
*** Non-8250 serial port support ***
< > Digi International NEO PCI Support
-*- Unix98 PTY support
[ ] Support multiple instances of devpts
[ ] Legacy (BSD) PTY support
< > IPMI top-level message handler --->
<*> Hardware Random Number Generator Core support
< > Timer IOMEM HW Random Number Generator support
<*> Intel HW Random Number Generator support
<> AMD HW Random Number Generator support <=== 我是intel主板
< > AMD Geode HW Random Number Generator support <=== 我是intel主板
<> VIA HW Random Number Generator support <=== 我是intel主板
<> /dev/nvram support <=== 直接存取CMOS,太危險,關
< > Siemens R3964 line discipline
< > Applicom intelligent fieldbus card support
< > ACP Modem (Mwave) support
< > NatSemi PC8736x GPIO Support
< > NatSemi Base GPIO Support
< > AMD CS5535/CS5536 GPIO (Geode Companion Device)
< > RAW driver (/dev/raw/rawN)
[*] HPET - High Precision Event Timer
[ ] Allow mmap of HPET
< > Hangcheck timer
-*- I2C support ---> // 感知硬件狀態,好比溫度,風扇轉速
[ ] SPI support --->
PPS support --->
[ ] GPIO Support --->
< > Dallas's 1-wire support --->
-*- Power supply class support --->
<*> Hardware Monitoring support --->
-*- Generic Thermal sysfs driver --->
[] Watchdog Timer Support ---> <=== 系統監視程序,我通常不用
Sonics Silicon Backplane --->
[*] Multifunction device drivers --->
[ ] Voltage and Current Regulator Support --->
< > Multimedia support --->
Graphics support --->
< > /dev/agpgart (AGP Support) ---> < --- virtualbox不支持虛擬獨立顯卡
-*- VGA arbitration
(16) Maximium number of GPU
[ ] Latop Hybird Graphics – GPU switch support
<*> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) --->
<> Lowlevel video output switch controls
<> Support for frame buffer devices --->
[ ] Backlight & LCD device support ---> < --- 支持背光設置,好比pda等。我用不到
Display device support --->
Console display driver support --->
[ ] Enable Scrollback Buffer in System RAM
<> Sound card support ---> <=== 用不到聲卡
[] HID Devices ---> <=== 用不到人力工程學設備
[] USB support ---> <=== 這個選項,對於跑物理機建議開啓,由於有可能你的鍵盤是USB的,我是跑虛擬機的,因此關了
< > MMC/SD/SDIO card support --->
< > Sony MemoryStick card support (EXPERIMENTAL) --->
[] LED Support ---> <=== 發光二級管,應該是跟顯示器相關的驅動,因爲我運行的是虛擬機,因此我選擇關閉
[ ] Accessibility support --->
< > InfiniBand support --->
[*] EDAC (Error Detection And Correction) reporting ---> // 硬件故障repoting
<*> Real Time Clock --->
[*] DMA Engine support --->
[ ] Auxiliary Display support --->
< > Userspace I/O drivers --->
TI VLYNQ --->
[ ] Staging drivers --->
[] X86 Platform Specific Device Drivers ---> <=== 一些筆記本的驅動,我沒有相關設備
Firmware Drivers --->
< > BIOS Enhanced Disk Drive calls determine boot disk
< > BIOS update support for DELL systems via sysfs
< > Dell Systems Management Base Driver
[*] Export DMI identification via sysfs to userspace // 將BIOS裏的DMI區信息導出到用戶空間,部分系統管理工具可能會用到
[ ] iSCSI Boot Firmware Table Attributes
File systems --->
< > Second extended fs support
<> Ext3 journalling file system support <=== 我使用的是ext4 FS
<*> The Extended 4 (ext4) filesystem
[ ] Enable ext4dev compatibility
[*] Ext4 extended attributes
[*] Ext4 POSIX Access Control Lists
[] Ext4 Security Labels <=== 取消 SELinux 支持
[ ] JBD (ext3) debugging support
[ ] JBD2 (ext4) debugging support
< > Reiserfs support
< > JFS filesystem support
< > XFS filesystem support
< > OCFS2 file system support
[*] Dnotify support
[*] Inotify support for userspace
[] Quota support <=== 磁盤配額支持,限制某個用戶或者某組用戶的磁盤佔用空間,暫時沒這個需求,你能夠把它編譯成模塊
< > Kernel automounter support
<*> Kernel automounter version 4 support (also supports v3)
< > FUSE (Filesystem in Userspace) support
Caches --->
CD-ROM/DVD Filesystems --->
<> ISO 9660 CDROM file system support <=== 在虛擬機內,我不用CDROM
< > UDF file system support
DOS/FAT/NT Filesystems --->
< > MSDOS fs support <=== 我沒有微軟fs的設備
< > VFAT (Windows-95) fs support <=== 我沒有微軟fs的設備
< > NTFS file system support
Pseudo filesystems --->
[] Miscellaneous filesystems ---> <=== 若是你沒有其餘FS的支持需求,關
[*] Network File Systems ---> <=== 若是你沒有NFS的支持需求,關
Partition Types --->
[ ] Advanced partition selection <=== 若是不是和其餘系統共存,能夠不選
-*- Native language support ---> // 選上Chinese
Kernel hacking --->
[] Show timing information on printks <=== 在printk的輸出中包含時間信息,能夠用來分析內核啓動過程各步驟所用時間 , 我不須要debug內核
[ ] Enable __deprecated logic
[*] Enable __must_check logic
(2048) Warn for stack frames larger than (needs gcc 4.4)
[] Magic SysRq key <=== 一種經過快捷鍵控制系統方式,除非你很是清楚這個選項,官方不推薦選擇
[ ] Enable unused/obsolete exported symbols
[ ] Debug Filesystem
[ ] Run 'make headers_check' when building vmlinux
[ ] Kernel debugging <=== 內核調試,關
[ ] Enable SLUB performance statistics
[] Compile the kernel with frame pointers <=== 仍是跟內核開發有關
[ ] Delay each boot printk message by N milliseconds
< > torture tests for RCU
[ ] Check for stalled CPUs delaying RCU grace periods
< > Self test for the backtrace code
[ ] Force extended block device numbers and spread them
[ ] Fault-injection framework
[ ] Latency measuring infrastructure
[*] Sysctl checks
[] Tracers --->
[] Remote debugging over FireWire early on boot <=== 啓動過程當中,容許遠程調試內核
[ ] Enable dynamic printk() support
[ ] Enable debugging of DMA-API usage
[ ] Sample kernel code --->
[ ] Filter access to /dev/mem
[] Enable verbose x86 bootup info messages <=== 在內核鏡像解壓縮階段輸出啓動信息,關閉後至關於無聲啓動(Slient Bootup)
-*- Early printk
[] Early printk via EHCI debug port <=== 容許printk經過EHCI調試端口輸出內核日誌,調試的一概關
[ ] Use 4Kb for kernel stacks instead of 8Kb
[ ] Enable IOMMU stress-test mode
IO delay type (port 0x80 based port-IO delay [recommended]) --->
[*] Allow gcc to uninline functions marked 'inline'
Security options ---> <=== 安全特性,我選擇全關,固然,這些選項不會影響你的平常開發,辦公
[] Enable access key retention support <=== 關閉
[] Enable different security models <=== 關閉
[ ] Enable the securityfs filesystem
[] File POSIX Capabilities <=== 關閉
[ ] Integrity Measurement Architecture(IMA)
< > Cryptographic API ---> // 加密API,這部分選項會根據此前的優化自動調整,默認便可
[] Virtualization ---> <=== 個人系統已經運行在虛擬機中,不須要再支持虛擬化
Library routines ---> // 庫子程序,這部分選項會根據此前的優化自動調整,默認便可