免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 6960 | 回复: 11
打印 上一主题 下一主题

[FreeBSD] 有没有freebsd7.0内核优化的建议呀? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-07-07 11:23 |只看该作者 |倒序浏览
5可用积分
如题!有高手发一下7.0的内核优化建议啊,或者详细的内核的参数情况哇。
我是想拿freebsd7.0做防火墙系统,其他的功能一概都可以不使用!
另外freebsd的文件系统对于一个防火墙系统来说,那些可以裁减的呀?  希望能得到具体一点的答案,新手。。。

[ 本帖最后由 sapphiron 于 2008-7-7 11:25 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2008-07-07 11:41 |只看该作者
我现在的一个做试验的PC内核配置。删除了scsi/usb/raid等部分:

#
# GENERIC -- Generic kernel configuration file for FreeBSD7.0/i386
#

cpu                I686_CPU
ident                MYCONFIG

# To statically compile in device wiring instead of /boot/device.hints
#hints                "GENERIC.hints"                # Default places to look for devices.

#makeoptions        DEBUG=-g                # Build kernel with gdb(1) debug symbols

options         SCHED_ULE                # 4BSD scheduler
options         PREEMPTION                # Enable kernel thread preemption
options         INET                        # InterNETworking
#options         INET6                        # IPv6 communications protocols
#options         SCTP                        # Stream Control Transmission Protocol
options         FFS                        # Berkeley Fast Filesystem
options         SOFTUPDATES                # Enable FFS soft updates support
options         UFS_ACL                        # Support for access control lists
options         UFS_DIRHASH                # Improve performance on big directories
options         UFS_GJOURNAL                # Enable gjournal-based UFS journaling
options         MD_ROOT                        # MD is a potential root device
options         NFSCLIENT                # Network Filesystem Client
options         NFSSERVER                # Network Filesystem Server
options         NFS_ROOT                # NFS usable as /, requires NFSCLIENT
#options         MSDOSFS                        # MSDOS Filesystem
options         CD9660                        # ISO 9660 Filesystem
options         PROCFS                        # Process filesystem (requires PSEUDOFS)
options         PSEUDOFS                # Pseudo-filesystem framework
options         GEOM_PART_GPT                # GUID Partition Tables.
options         GEOM_LABEL                # Provides labelization
options         COMPAT_43TTY                # BSD 4.3 TTY compat [KEEP THIS!]
options         COMPAT_FREEBSD4                # Compatible with FreeBSD4
options         COMPAT_FREEBSD5                # Compatible with FreeBSD5
options         COMPAT_FREEBSD6                # Compatible with FreeBSD6
options         SCSI_DELAY=5000                # Delay (in ms) before probing SCSI
options         KTRACE                        # ktrace(1) support
options         SYSVSHM                        # SYSV-style shared memory
options         SYSVMSG                        # SYSV-style message queues
options         SYSVSEM                        # SYSV-style semaphores
options         _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
options         KBD_INSTALL_CDEV        # install a CDEV entry in /dev
options         ADAPTIVE_GIANT                # Giant mutex is adaptive.
options         STOP_NMI                # Stop CPUS using NMI instead of IPI
options         AUDIT                        # Security event auditing

# To make an SMP kernel, the next two lines are needed
options         SMP                        # Symmetric MultiProcessor Kernel
device                apic                        # I/O APIC

# enable pf firwall
device          pf
device          pflog
device          pfsync
options         ALTQ
options         ALTQ_CBQ

# CPU frequency control
device                cpufreq

# Bus support.
device                pci

# Floppy drives
device                fdc

# ATA and ATAPI devices
device                ata
device                atadisk                # ATA disk drives
device                ataraid                # ATA RAID drives
device                atapicd                # ATAPI CDROM drives
options         ATA_STATIC_ID        # Static device numbering

# SCSI peripherals
device                scbus                # SCSI bus (required for SCSI)
device                ch                # SCSI media changers
device                da                # Direct Access (disks)

# atkbdc0 controls both the keyboard and the PS/2 mouse
device                atkbdc                # AT keyboard controller
device                atkbd                # AT keyboard
device                psm                # PS/2 mouse
device                kbdmux                # keyboard multiplexer
device                vga                # VGA video card driver
device                splash                # Splash screen and screen saver support

# syscons is the default console driver, resembling an SCO console
device                sc
device                agp                # support several AGP chipsets

# Add suspend/resume support for the i8254.
device                pmtimer

# Serial (COM) ports
device                sio                # 8250, 16[45]50 based serial ports
device                uart                # Generic UART driver

# PCI Ethernet NICs.
device                de                # DEC/Intel DC21x4x (``Tulip'')
device                em                # Intel PRO/1000 adapter Gigabit Ethernet Card
device                ixgb                # Intel PRO/10GbE Ethernet Card
device                txp                # 3Com 3cR990 (``Typhoon'')
device                vx                # 3Com 3c590, 3c595 (``Vortex'')

# PCI Ethernet NICs that use the common MII bus controller code.
# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs!
device                miibus                # MII bus support
device                fxp                # Intel EtherExpress PRO/100B (82557, 8255
device                nfe                # nVidia nForce MCP on-board Ethernet
device                re                # RealTek 8139C+/8169/8169S/8110S
device                rl                # RealTek 8129/8139
device                xl                # 3Com 3c90x (``Boomerang'', ``Cyclone'')

# Pseudo devices.
device                loop                # Network loopback
device                random                # Entropy device
device                ether                # Ethernet support
device                sl                # Kernel SLIP
device                ppp                # Kernel PPP
device                tun                # Packet tunnel.
device                pty                # Pseudo-ttys (telnet etc)
device                md                # Memory "disks"
device                gif                # IPv6 and IPv4 tunneling
device                faith                # IPv6-to-IPv4 relaying (translation)
device                firmware        # firmware assist module

# The `bpf' device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
# Note that 'bpf' is required for DHCP.
device                bpf                # Berkeley packet filter

# USB support
device          uhci            # UHCI PCI->USB interface
device          ohci            # OHCI PCI->USB interface
device          ehci            # EHCI PCI->USB interface (USB 2.0)
device          usb             # USB Bus (required)
device          ugen            # Generic
device          uhid            # "Human Interface Devices"
device          ukbd            # Keyboard
device          ulpt            # Printer
device          umass           # Disks/Mass storage - Requires scbus and da

# FireWire support
device                firewire        # FireWire bus code
device                sbp                # SCSI over FireWire (Requires scbus and da)
device                fwe                # Ethernet over FireWire (non-standard!)

论坛徽章:
0
3 [报告]
发表于 2008-07-07 14:18 |只看该作者
貌似你这个内核的配制不台适合用于防火墙系统吧?而且我还想知道文件系统的裁减,不需要的东西删掉~

[ 本帖最后由 sapphiron 于 2008-7-7 14:26 编辑 ]

论坛徽章:
2
2015年迎新春徽章
日期:2015-03-12 10:39:39IT运维版块每日发帖之星
日期:2015-10-10 06:20:00
4 [报告]
发表于 2008-07-07 18:38 |只看该作者

回复 #3 sapphiron 的帖子

建议你用openbsd做防火墙

论坛徽章:
0
5 [报告]
发表于 2008-07-08 17:09 |只看该作者
openbsd 哪儿有相关的资料可以看看么?

论坛徽章:
0
6 [报告]
发表于 2008-07-09 08:03 |只看该作者
在做过无数WEB应用后我积攒了47页的FB优化文档,现在能分享给你的只有一句话,但也是全部的内容——

“观察”。

评分

参与人数 1可用积分 +3 收起 理由
gvim + 3 中肯

查看全部评分

论坛徽章:
89
水瓶座
日期:2014-04-01 08:53:31天蝎座
日期:2014-04-01 08:53:53天秤座
日期:2014-04-01 08:54:02射手座
日期:2014-04-01 08:54:15子鼠
日期:2014-04-01 08:55:35辰龙
日期:2014-04-01 08:56:36未羊
日期:2014-04-01 08:56:27戌狗
日期:2014-04-01 08:56:13亥猪
日期:2014-04-01 08:56:02亥猪
日期:2014-04-08 08:38:58程序设计版块每日发帖之星
日期:2016-01-05 06:20:00程序设计版块每日发帖之星
日期:2016-01-07 06:20:00
7 [报告]
发表于 2008-07-24 18:29 |只看该作者
原帖由 llzqq 于 2008-7-7 11:41 发表
我现在的一个做试验的PC内核配置。删除了scsi/usb/raid等部分:

#
# GENERIC -- Generic kernel configuration file for FreeBSD7.0/i386
#

cpu                I686_CPU
ident                MYCONF ...


对我有用,整好在研究着怎么优化系统,

我现在的基本思路写好make.conf然后编译world/内核/ports,

你看还有其他的方法吗?

论坛徽章:
2
丑牛
日期:2013-09-29 09:47:222015七夕节徽章
日期:2015-08-21 11:06:17
8 [报告]
发表于 2008-07-24 22:07 |只看该作者

论坛徽章:
89
水瓶座
日期:2014-04-01 08:53:31天蝎座
日期:2014-04-01 08:53:53天秤座
日期:2014-04-01 08:54:02射手座
日期:2014-04-01 08:54:15子鼠
日期:2014-04-01 08:55:35辰龙
日期:2014-04-01 08:56:36未羊
日期:2014-04-01 08:56:27戌狗
日期:2014-04-01 08:56:13亥猪
日期:2014-04-01 08:56:02亥猪
日期:2014-04-08 08:38:58程序设计版块每日发帖之星
日期:2016-01-05 06:20:00程序设计版块每日发帖之星
日期:2016-01-07 06:20:00
9 [报告]
发表于 2008-07-24 22:29 |只看该作者
原帖由 剑心通明 于 2008-7-24 22:07 发表
http://cnsnap.cn.freebsd.org/doc ... k/kernelconfig.html


已经看了好几遍了,中文的英文的都看了好几遍了,哈哈。

论坛徽章:
0
10 [报告]
发表于 2008-07-24 22:32 |只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP