Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1619566
  • 博文数量: 292
  • 博客积分: 10791
  • 博客等级: 上将
  • 技术积分: 2479
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-20 21:06
文章分类

全部博文(292)

文章存档

2011年(31)

2010年(261)

分类: Oracle

2010-03-27 09:51:36

在一般情况下,Linux的内核参数是不需要调整的;但在一些特定情况下,例如使用Oracle产品的情况下,厂商推荐调整参数设置。

对于Oracle,主要调整的是Linux内核参数的共享内存及网络部分。

什么是共享内存?

共享内存(Shared Memory)是最简单的进程间通信方式,它允许多个进程访问相同的内存,一个进程改变其中的数据后,其他的进程都可以看到数据的变化。
共 享内存是进程间最快速的通信方式:
`进程共享同一块内存空间。
`访问共享内存和访问私有内存一样快。
` 不需要系统调用和内核入口。
`不造成不必要的内存复制。

详细参考:via

使用ipcs可以显示共享内存及信号量的相关信息:

[oracle@localhost ~]$ ipcs

------ Shared Memory Segments --------

key shmid owner perms bytes nattch status

0xbe3bb918 0 oracle 640 169869312 27

------ Semaphore Arrays --------

key semid owner perms nsems

0xf5d4b884 98304 oracle 640 154

------ Message Queues --------

key msqid owner perms used-bytes messages


key:相当于用户程序中定义的变量,和shmid是一一对应的关系,便于程序引用共享内存的地址

shmid:共享内存段的ID

nattch:连接在关联的共享内存段的进程数

perms:权限

nsems:对应的信号量集中的可用资源个数


在应用中,(如果使用kill命令删除程序后,发现系统资源例如内存的使用量仍然很高)—nattch数为0的情况,则应检查系统 IPC状态,并使用ipcrm命令删除不使用的IPC。

IPC机制的相关介绍参考:、


可以使用sysctl –a查看所有可用的核心参数列表[高亮部分为Oracle需要配置的参数]:

[root@localhost ~]# sysctl -a

sunrpc.tcp_slot_table_entries = 16

sunrpc.udp_slot_table_entries = 16

sunrpc.max_resvport = 1023

sunrpc.min_resvport = 665

sunrpc.nlm_debug = 0

sunrpc.nfsd_debug = 0

sunrpc.nfs_debug = 0

sunrpc.rpc_debug = 0

dev.parport.parport0.devices.lp.timeslice = 200

dev.parport.parport0.devices.active = none

dev.parport.parport0.modes = PCSPP,TRISTATE

dev.parport.parport0.dma = -1

dev.parport.parport0.irq = -1

dev.parport.parport0.base-addr = 888 1912

dev.parport.parport0.spintime = 500

dev.parport.default.spintime = 500

dev.parport.default.timeslice = 200

dev.scsi.logging_level = 0

dev.raid.speed_limit_max = 200000

dev.raid.speed_limit_min = 1000

dev.cdrom.check_media = 0

dev.cdrom.lock = 1

dev.cdrom.debug = 0

dev.cdrom.autoeject = 0

dev.cdrom.autoclose = 1

dev.cdrom.info = CD-ROM information, Id: cdrom.c 3.20 2003/12/17

dev.cdrom.info =

dev.cdrom.info = drive name: hdc

dev.cdrom.info = drive speed: 1

dev.cdrom.info = drive # of slots: 1

dev.cdrom.info = Can close tray: 1

dev.cdrom.info = Can open tray: 1

dev.cdrom.info = Can lock tray: 1

dev.cdrom.info = Can change speed: 1

dev.cdrom.info = Can select disk: 0

dev.cdrom.info = Can read multisession: 1

dev.cdrom.info = Can read MCN: 1

dev.cdrom.info = Reports media changed: 1

dev.cdrom.info = Can play audio: 1

dev.cdrom.info = Can write CD-R: 0

dev.cdrom.info = Can write CD-RW: 0

dev.cdrom.info = Can read DVD: 0

dev.cdrom.info = Can write DVD-R: 0

dev.cdrom.info = Can write DVD-RAM: 0

dev.cdrom.info = Can read MRW: 1

dev.cdrom.info = Can write MRW: 1

dev.cdrom.info = Can write RAM: 1

dev.cdrom.info =

dev.cdrom.info =

dev.rtc.max-user-freq = 64

net.ipv6.conf.default.max_addresses = 16

net.ipv6.conf.default.max_desync_factor = 600

net.ipv6.conf.default.regen_max_retry = 5

net.ipv6.conf.default.temp_prefered_lft = 86400

net.ipv6.conf.default.temp_valid_lft = 604800

net.ipv6.conf.default.use_tempaddr = 0

net.ipv6.conf.default.force_mld_version = 0

net.ipv6.conf.default.router_solicitation_delay = 1

net.ipv6.conf.default.router_solicitation_interval = 4

net.ipv6.conf.default.router_solicitations = 3

net.ipv6.conf.default.dad_transmits = 1

net.ipv6.conf.default.autoconf = 1

net.ipv6.conf.default.accept_redirects = 1

net.ipv6.conf.default.accept_ra = 1

net.ipv6.conf.default.mtu = 1280

net.ipv6.conf.default.hop_limit = 64

net.ipv6.conf.default.forwarding = 0

net.ipv6.conf.all.max_addresses = 16

net.ipv6.conf.all.max_desync_factor = 600

net.ipv6.conf.all.regen_max_retry = 5

net.ipv6.conf.all.temp_prefered_lft = 86400

net.ipv6.conf.all.temp_valid_lft = 604800

net.ipv6.conf.all.use_tempaddr = 0

net.ipv6.conf.all.force_mld_version = 0

net.ipv6.conf.all.router_solicitation_delay = 1

net.ipv6.conf.all.router_solicitation_interval = 4

net.ipv6.conf.all.router_solicitations = 3

net.ipv6.conf.all.dad_transmits = 1

net.ipv6.conf.all.autoconf = 1

net.ipv6.conf.all.accept_redirects = 1

net.ipv6.conf.all.accept_ra = 1

net.ipv6.conf.all.mtu = 1280

net.ipv6.conf.all.hop_limit = 64

net.ipv6.conf.all.forwarding = 0

net.ipv6.conf.eth0.max_addresses = 16

net.ipv6.conf.eth0.max_desync_factor = 600

net.ipv6.conf.eth0.regen_max_retry = 5

net.ipv6.conf.eth0.temp_prefered_lft = 86400

net.ipv6.conf.eth0.temp_valid_lft = 604800

net.ipv6.conf.eth0.use_tempaddr = 0

net.ipv6.conf.eth0.force_mld_version = 0

net.ipv6.conf.eth0.router_solicitation_delay = 1

net.ipv6.conf.eth0.router_solicitation_interval = 4

net.ipv6.conf.eth0.router_solicitations = 3

net.ipv6.conf.eth0.dad_transmits = 1

net.ipv6.conf.eth0.autoconf = 1

net.ipv6.conf.eth0.accept_redirects = 1

net.ipv6.conf.eth0.accept_ra = 1

net.ipv6.conf.eth0.mtu = 1500

net.ipv6.conf.eth0.hop_limit = 64

net.ipv6.conf.eth0.forwarding = 0

net.ipv6.conf.lo.max_addresses = 16

net.ipv6.conf.lo.max_desync_factor = 600

net.ipv6.conf.lo.regen_max_retry = 5

net.ipv6.conf.lo.temp_prefered_lft = 86400

net.ipv6.conf.lo.temp_valid_lft = 604800

net.ipv6.conf.lo.use_tempaddr = -1

net.ipv6.conf.lo.force_mld_version = 0

net.ipv6.conf.lo.router_solicitation_delay = 1

net.ipv6.conf.lo.router_solicitation_interval = 4

net.ipv6.conf.lo.router_solicitations = 3

net.ipv6.conf.lo.dad_transmits = 1

net.ipv6.conf.lo.autoconf = 1

net.ipv6.conf.lo.accept_redirects = 1

net.ipv6.conf.lo.accept_ra = 1

net.ipv6.conf.lo.mtu = 16436

net.ipv6.conf.lo.hop_limit = 64

net.ipv6.conf.lo.forwarding = 0

net.ipv6.neigh.eth0.locktime = 0

net.ipv6.neigh.eth0.proxy_delay = 79

net.ipv6.neigh.eth0.anycast_delay = 99

net.ipv6.neigh.eth0.proxy_qlen = 64

net.ipv6.neigh.eth0.unres_qlen = 3

net.ipv6.neigh.eth0.gc_stale_time = 60

net.ipv6.neigh.eth0.delay_first_probe_time = 5

net.ipv6.neigh.eth0.base_reachable_time = 30

net.ipv6.neigh.eth0.retrans_time = 1000

net.ipv6.neigh.eth0.app_solicit = 0

net.ipv6.neigh.eth0.ucast_solicit = 3

net.ipv6.neigh.eth0.mcast_solicit = 3

net.ipv6.neigh.lo.locktime = 0

net.ipv6.neigh.lo.proxy_delay = 79

net.ipv6.neigh.lo.anycast_delay = 99

net.ipv6.neigh.lo.proxy_qlen = 64

net.ipv6.neigh.lo.unres_qlen = 3

net.ipv6.neigh.lo.gc_stale_time = 60

net.ipv6.neigh.lo.delay_first_probe_time = 5

net.ipv6.neigh.lo.base_reachable_time = 30

net.ipv6.neigh.lo.retrans_time = 1000

net.ipv6.neigh.lo.app_solicit = 0

net.ipv6.neigh.lo.ucast_solicit = 3

net.ipv6.neigh.lo.mcast_solicit = 3

net.ipv6.neigh.default.gc_thresh3 = 1024

net.ipv6.neigh.default.gc_thresh2 = 512

net.ipv6.neigh.default.gc_thresh1 = 128

net.ipv6.neigh.default.gc_interval = 30

net.ipv6.neigh.default.locktime = 0

net.ipv6.neigh.default.proxy_delay = 79

net.ipv6.neigh.default.anycast_delay = 99

net.ipv6.neigh.default.proxy_qlen = 64

net.ipv6.neigh.default.unres_qlen = 3

net.ipv6.neigh.default.gc_stale_time = 60

net.ipv6.neigh.default.delay_first_probe_time = 5

net.ipv6.neigh.default.base_reachable_time = 30

net.ipv6.neigh.default.retrans_time = 1000

net.ipv6.neigh.default.app_solicit = 0

net.ipv6.neigh.default.ucast_solicit = 3

net.ipv6.neigh.default.mcast_solicit = 3

net.ipv6.mld_max_msf = 10

net.ipv6.ip6frag_secret_interval = 600

net.ipv6.ip6frag_time = 60

net.ipv6.ip6frag_low_thresh = 196608

net.ipv6.ip6frag_high_thresh = 262144

net.ipv6.bindv6only = 0

net.ipv6.icmp.ratelimit = 1000

net.ipv6.route.min_adv_mss = 1

net.ipv6.route.mtu_expires = 600

net.ipv6.route.gc_elasticity = 0

net.ipv6.route.gc_interval = 30

net.ipv6.route.gc_timeout = 60

net.ipv6.route.gc_min_interval = 0

net.ipv6.route.max_size = 4096

net.ipv6.route.gc_thresh = 1024

net.unix.max_dgram_qlen = 10

net.token-ring.rif_timeout = 600000

net.ipv4.conf.eth0.force_igmp_version = 0

net.ipv4.conf.eth0.disable_policy = 0

net.ipv4.conf.eth0.disable_xfrm = 0

net.ipv4.conf.eth0.arp_ignore = 0

net.ipv4.conf.eth0.arp_announce = 0

net.ipv4.conf.eth0.arp_filter = 0

net.ipv4.conf.eth0.tag = 0

net.ipv4.conf.eth0.log_martians = 0

net.ipv4.conf.eth0.bootp_relay = 0

net.ipv4.conf.eth0.medium_id = 0

net.ipv4.conf.eth0.proxy_arp = 0

net.ipv4.conf.eth0.accept_source_route = 0

net.ipv4.conf.eth0.send_redirects = 1

net.ipv4.conf.eth0.rp_filter = 1

net.ipv4.conf.eth0.shared_media = 1

net.ipv4.conf.eth0.secure_redirects = 1

net.ipv4.conf.eth0.accept_redirects = 1

net.ipv4.conf.eth0.mc_forwarding = 0

net.ipv4.conf.eth0.forwarding = 0

net.ipv4.conf.lo.force_igmp_version = 0

net.ipv4.conf.lo.disable_policy = 0

net.ipv4.conf.lo.disable_xfrm = 0

net.ipv4.conf.lo.arp_ignore = 0

net.ipv4.conf.lo.arp_announce = 0

net.ipv4.conf.lo.arp_filter = 0

net.ipv4.conf.lo.tag = 0

net.ipv4.conf.lo.log_martians = 0

net.ipv4.conf.lo.bootp_relay = 0

net.ipv4.conf.lo.medium_id = 0

net.ipv4.conf.lo.proxy_arp = 0

net.ipv4.conf.lo.accept_source_route = 0

net.ipv4.conf.lo.send_redirects = 1

net.ipv4.conf.lo.rp_filter = 1

net.ipv4.conf.lo.shared_media = 1

net.ipv4.conf.lo.secure_redirects = 1

net.ipv4.conf.lo.accept_redirects = 1

net.ipv4.conf.lo.mc_forwarding = 0

net.ipv4.conf.lo.forwarding = 0

net.ipv4.conf.default.force_igmp_version = 0

net.ipv4.conf.default.disable_policy = 0

net.ipv4.conf.default.disable_xfrm = 0

net.ipv4.conf.default.arp_ignore = 0

net.ipv4.conf.default.arp_announce = 0

net.ipv4.conf.default.arp_filter = 0

net.ipv4.conf.default.tag = 0

net.ipv4.conf.default.log_martians = 0

net.ipv4.conf.default.bootp_relay = 0

net.ipv4.conf.default.medium_id = 0

net.ipv4.conf.default.proxy_arp = 0

net.ipv4.conf.default.accept_source_route = 0

net.ipv4.conf.default.send_redirects = 1

net.ipv4.conf.default.rp_filter = 1

net.ipv4.conf.default.shared_media = 1

net.ipv4.conf.default.secure_redirects = 1

net.ipv4.conf.default.accept_redirects = 1

net.ipv4.conf.default.mc_forwarding = 0

net.ipv4.conf.default.forwarding = 0

net.ipv4.conf.all.force_igmp_version = 0

net.ipv4.conf.all.disable_policy = 0

net.ipv4.conf.all.disable_xfrm = 0

net.ipv4.conf.all.arp_ignore = 0

net.ipv4.conf.all.arp_announce = 0

net.ipv4.conf.all.arp_filter = 0

net.ipv4.conf.all.tag = 0

net.ipv4.conf.all.log_martians = 0

net.ipv4.conf.all.bootp_relay = 0

net.ipv4.conf.all.medium_id = 0

net.ipv4.conf.all.proxy_arp = 0

net.ipv4.conf.all.accept_source_route = 0

net.ipv4.conf.all.send_redirects = 1

net.ipv4.conf.all.rp_filter = 0

net.ipv4.conf.all.shared_media = 1

net.ipv4.conf.all.secure_redirects = 1

net.ipv4.conf.all.accept_redirects = 1

net.ipv4.conf.all.mc_forwarding = 0

net.ipv4.conf.all.forwarding = 0

net.ipv4.neigh.eth0.locktime = 99

net.ipv4.neigh.eth0.proxy_delay = 79

net.ipv4.neigh.eth0.anycast_delay = 99

net.ipv4.neigh.eth0.proxy_qlen = 64

net.ipv4.neigh.eth0.unres_qlen = 3

net.ipv4.neigh.eth0.gc_stale_time = 60

net.ipv4.neigh.eth0.delay_first_probe_time = 5

net.ipv4.neigh.eth0.base_reachable_time = 30

net.ipv4.neigh.eth0.retrans_time = 99

net.ipv4.neigh.eth0.app_solicit = 0

net.ipv4.neigh.eth0.ucast_solicit = 3

net.ipv4.neigh.eth0.mcast_solicit = 3

net.ipv4.neigh.lo.locktime = 99

net.ipv4.neigh.lo.proxy_delay = 79

net.ipv4.neigh.lo.anycast_delay = 99

net.ipv4.neigh.lo.proxy_qlen = 64

net.ipv4.neigh.lo.unres_qlen = 3

net.ipv4.neigh.lo.gc_stale_time = 60

net.ipv4.neigh.lo.delay_first_probe_time = 5

net.ipv4.neigh.lo.base_reachable_time = 30

net.ipv4.neigh.lo.retrans_time = 99

net.ipv4.neigh.lo.app_solicit = 0

net.ipv4.neigh.lo.ucast_solicit = 3

net.ipv4.neigh.lo.mcast_solicit = 3

net.ipv4.neigh.default.gc_thresh3 = 1024

net.ipv4.neigh.default.gc_thresh2 = 512

net.ipv4.neigh.default.gc_thresh1 = 128

net.ipv4.neigh.default.gc_interval = 30

net.ipv4.neigh.default.locktime = 99

net.ipv4.neigh.default.proxy_delay = 79

net.ipv4.neigh.default.anycast_delay = 99

net.ipv4.neigh.default.proxy_qlen = 64

net.ipv4.neigh.default.unres_qlen = 3

net.ipv4.neigh.default.gc_stale_time = 60

net.ipv4.neigh.default.delay_first_probe_time = 5

net.ipv4.neigh.default.base_reachable_time = 30

net.ipv4.neigh.default.retrans_time = 99

net.ipv4.neigh.default.app_solicit = 0

net.ipv4.neigh.default.ucast_solicit = 3

net.ipv4.neigh.default.mcast_solicit = 3

net.ipv4.tcp_slow_start_after_idle = 1

net.ipv4.tcp_workaround_signed_windows = 1

net.ipv4.tcp_bic_beta = 819

net.ipv4.tcp_tso_win_divisor = 8

net.ipv4.tcp_moderate_rcvbuf = 1

net.ipv4.tcp_bic_low_window = 14

net.ipv4.tcp_bic_fast_convergence = 1

net.ipv4.tcp_bic = 1

net.ipv4.tcp_vegas_gamma = 2

net.ipv4.tcp_vegas_beta = 6

net.ipv4.tcp_vegas_alpha = 2

net.ipv4.tcp_vegas_cong_avoid = 0

net.ipv4.tcp_westwood = 0

net.ipv4.tcp_no_metrics_save = 0

net.ipv4.ipfrag_secret_interval = 600

net.ipv4.tcp_low_latency = 0

net.ipv4.tcp_frto = 0

net.ipv4.tcp_tw_reuse = 0

net.ipv4.icmp_ratemask = 6168

net.ipv4.icmp_ratelimit = 1000

net.ipv4.tcp_adv_win_scale = 2

net.ipv4.tcp_app_win = 31

net.ipv4.tcp_rmem = 4096 87380 174760

net.ipv4.tcp_wmem = 4096 16384 131072

net.ipv4.tcp_mem = 393216 524288 786432

net.ipv4.tcp_dsack = 1

net.ipv4.tcp_ecn = 0

net.ipv4.tcp_reordering = 3

net.ipv4.tcp_fack = 1

net.ipv4.tcp_orphan_retries = 0

net.ipv4.inet_peer_gc_maxtime = 120

net.ipv4.inet_peer_gc_mintime = 10

net.ipv4.inet_peer_maxttl = 600

net.ipv4.inet_peer_minttl = 120

net.ipv4.inet_peer_threshold = 65664

net.ipv4.igmp_max_msf = 10

net.ipv4.igmp_max_memberships = 20

net.ipv4.route.secret_interval = 600

net.ipv4.route.min_adv_mss = 256

net.ipv4.route.min_pmtu = 552

net.ipv4.route.mtu_expires = 600

net.ipv4.route.gc_elasticity = 8

net.ipv4.route.error_burst = 5000

net.ipv4.route.error_cost = 1000

net.ipv4.route.redirect_silence = 20480

net.ipv4.route.redirect_number = 9

net.ipv4.route.redirect_load = 20

net.ipv4.route.gc_interval = 60

net.ipv4.route.gc_timeout = 300

net.ipv4.route.gc_min_interval = 0

net.ipv4.route.max_size = 524288

net.ipv4.route.gc_thresh = 32768

net.ipv4.route.max_delay = 10

net.ipv4.route.min_delay = 2

net.ipv4.icmp_errors_use_inbound_ifaddr = 0

net.ipv4.icmp_ignore_bogus_error_responses = 0

net.ipv4.icmp_echo_ignore_broadcasts = 0

net.ipv4.icmp_echo_ignore_all = 0

net.ipv4.ip_local_port_range = 1024 65000 //ipv4的本地的端口范围,在高吞吐量的Server上,缺省范围太小,需增大。

net.ipv4.tcp_max_syn_backlog = 1024

net.ipv4.tcp_rfc1337 = 0

net.ipv4.tcp_stdurg = 0

net.ipv4.tcp_abort_on_overflow = 0

net.ipv4.tcp_tw_recycle = 0

net.ipv4.tcp_syncookies = 0

net.ipv4.tcp_fin_timeout = 60

net.ipv4.tcp_retries2 = 15

net.ipv4.tcp_retries1 = 3

net.ipv4.tcp_keepalive_intvl = 75

net.ipv4.tcp_keepalive_probes = 9

net.ipv4.tcp_keepalive_time = 7200

net.ipv4.ipfrag_time = 30

net.ipv4.ip_dynaddr = 0

net.ipv4.ipfrag_low_thresh = 196608

net.ipv4.ipfrag_high_thresh = 262144

net.ipv4.tcp_max_tw_buckets = 180000

net.ipv4.tcp_max_orphans = 131072

net.ipv4.tcp_synack_retries = 5

net.ipv4.tcp_syn_retries = 5

net.ipv4.ip_nonlocal_bind = 0

net.ipv4.ip_no_pmtu_disc = 0

net.ipv4.ip_autoconfig = 0

net.ipv4.ip_default_ttl = 64

net.ipv4.ip_forward = 0

net.ipv4.tcp_retrans_collapse = 1

net.ipv4.tcp_sack = 1

net.ipv4.tcp_window_scaling = 1

net.ipv4.tcp_timestamps = 1

net.core.somaxconn = 128

net.core.divert_version = 0.46

net.core.optmem_max = 10240

net.core.message_burst = 10

net.core.message_cost = 5

net.core.mod_cong = 290

net.core.lo_cong = 100

net.core.no_cong = 20

net.core.no_cong_thresh = 10

net.core.netdev_max_backlog = 300

net.core.dev_weight = 64

net.core.rmem_default = 262144 //默认的TCP数据接收缓冲

net.core.wmem_default = 262144 //默认的TCP数据发送缓冲

net.core.rmem_max = 262144 //最大的TCP数据接收缓冲

net.core.wmem_max = 262144 //最大的TCP数据发送缓冲

vm.nfs-writeback-lowmem-only = 0

vm.write-mapped = 1

vm.drop_caches = 0

vm.inactive_percent = 0

vm.pagecache = 100

vm.percpu_pagelist_fraction = 0

vm.max_queue_depth = 0

vm.oom-kill = 1

vm.legacy_va_layout = 0

vm.vfs_cache_pressure = 100

vm.block_dump = 0

vm.laptop_mode = 0

vm.max_map_count = 65536

vm.min_free_kbytes = 2850

vm.lower_zone_protection = 0

vm.hugetlb_shm_group = 0

vm.nr_hugepages = 0

vm.swappiness = 60

vm.nr_pdflush_threads = 2

vm.dirty_expire_centisecs = 3000

vm.dirty_writeback_centisecs = 500

vm.dirty_ratio = 40

vm.dirty_background_ratio = 10

vm.page-cluster = 3

vm.overcommit_ratio = 50

vm.panic_on_oom = 0

vm.overcommit_memory = 0

kernel.panic_on_unrecovered_nmi = 0

kernel.wake_balance = 1

kernel.suid_dumpable = 0

kernel.unknown_nmi_panic = 0

kernel.ngroups_max = 65536

kernel.printk_ratelimit_burst = 10

kernel.printk_ratelimit = 5

kernel.panic_on_oops = 1

kernel.pid_max = 32768

kernel.sercons_esc = -1

kernel.overflowgid = 65534

kernel.overflowuid = 65534

kernel.pty.nr = 1

kernel.pty.max = 4096

kernel.random.uuid = 872329aa-2624-4fa4-941e-96148e6084f9

kernel.random.boot_id = c00708b8-abb1-46b4-9190-325b4e68da94

kernel.random.write_wakeup_threshold = 128

kernel.random.read_wakeup_threshold = 64

kernel.random.entropy_avail = 3616

kernel.random.poolsize = 512

kernel.threads-max = 16384

kernel.cad_pid = 1

kernel.sysrq = 0

kernel.sem = 250 32000 100 128

第一列SEMMSL ,表示每个信号集中的最大信号量数目。 应该设置为服务器中各个实例中最大的PROCESSES{SQLPLUS 中执行show parameter processes可以查看此参数}参数+10,例如,当最大的 PROCESSES参数为5000时,SEMMSL应设置为5010

第二列SEMMNS,表示系统范围内的最大信号量总数目。参数应设置为SEMMSL*SEMMNI,接上例 SEMMSL为5010,SEMMNS参数应为(5010*128)=641280

第三列SEMOPM,表示每个信号发生时的最大系统操作数目。参数应设置与SEMMSL参数相同,接上例此处应 设置为5010

第四列SEMMNI,表示系统范围内的最大信号集总数目。

以 上的设置是Oracle安装文档中的推荐值,对于一个大实例这是不够用的

kernel.msgmnb = 16384

kernel.msgmni = 16

kernel.msgmax = 8192

kernel.shmmni = 4096

//shmmni 内核参数是共享内存段的最大数量(注意这个参数不是 shmmin,是

shmmni, shmmin 表示内存段最小大小 ) 。shmmni 缺省值 4096 ,一般肯定是够用了 。

kernel.shmall = 2097152

//kernel.shmall 参数是控制共享内存页数 。 共享内存页大小为4KB, 共享内存段的大小都是共享内存页大小的整数倍。一个共享内存段的最大大小是16G,那么需要共享内存页数是 16GB/4KB=16777216KB/4KB=4194304 (页),也就是64Bit 系统下16GB 物理内存,设置 kernel.shmall = 4194304 才符合要求(几乎是原来设置的两倍)。这时可以将shmmax 参数调整到 16G 了,同时可以修改SGA_MAX_SIZE 和SGA_TARGET 为 12G(您想设置的SGA 最大大小,当然也可以是2G~14G 等,还要协调PGA参数及OS 等其他内存使用,不能设置太满,比如16G)。如果shmall

kernel.shmmax = 2147483648

// Shmmax是核心参数中最重要的参数之一,用于定义单个共享内存段的最大值,shmmax 设置应该足够大,能在一个共享内存段下容纳下整个的SGA ,设置的过低可能会导致需要创建多个共享内存段,这样可能导致系统性能的下降 。

Oracle 安装文档建议 32Bit Linux 系统设置shmmax 为32Bit 最大的限制值 (setting shmmax to the 32-bit number limit),也就是4G。

kernel.acct = 4 2 30

kernel.hotplug = /sbin/hotplug

kernel.modprobe = /sbin/modprobe

kernel.printk = 6 4 1 7

kernel.ctrl-alt-del = 0

kernel.real-root-dev = 0

kernel.cap-bound = -257

kernel.tainted = 0

kernel.core_pattern = core

kernel.core_uses_pid = 1

kernel.vdso = 0

kernel.print-fatal-signals = 0

kernel.exec-shield-randomize = 1

kernel.exec-shield = 1

kernel.panic = 0

kernel.domainname = (none)

kernel.hostname = localhost.localdomain

kernel.version = #1 SMP Wed Jul 9 15:39:47 EDT 2008

kernel.osrelease = 2.6.9-78.ELsmp

kernel.ostype = Linux

fs.mqueue.msgsize_max = 8192

fs.mqueue.msg_max = 10

fs.mqueue.queues_max = 256

fs.quota.syncs = 18

fs.quota.free_dquots = 0

fs.quota.allocated_dquots = 0

fs.quota.cache_hits = 0

fs.quota.writes = 0

fs.quota.reads = 0

fs.quota.drops = 0

fs.quota.lookups = 0

fs.aio-max-nr = 65536

fs.aio-nr = 0

fs.lease-break-time = 45

fs.dir-notify-enable = 1

fs.leases-enable = 1

fs.overflowgid = 65534

fs.overflowuid = 65534

fs.dentry-state = 3982 2549 45 0 0 0

fs.file-max = 65536 //系统中能同时打开的文件句柄的最大值,推荐:512*PROCESS,注意区别/etc /security/limits.conf中的nofile,后者只针对某一用户

fs.file-nr = 760 0 65536

fs.inode-state = 3598 126 0 0 0 0 0

fs.inode-nr = 3598 126

fs.binfmt_misc.status = enabled

通过编辑/etc/sysctl.conf文件,初始的时候应该没有设置任何参数,可以在文件中添加相应的参数,通过sysctl –p命令重新加载sysctl.conf并立即使之生效。

[root@localhost ~]# vi /etc/sysctl.conf

[root@localhost ~]# sysctl –p

-EOF-

阅读(3114) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~