[FUG-BR] Servidor com load altíssimo

Marcelo Gondim gondim em bsdinfo.com.br
Terça Julho 10 10:46:32 BRT 2012


Em 10/07/2012 10:22, Leonardo Augusto escreveu:
> Marcelo,
>
> estou enviando algumas confs de um 7.2 onde o mysql funciona muito
> bem, nao fiz um teste de 4000 conexoes,
> mas na epoca fiz um text com o ab da apache, que chamava um php que
> conectava no mysql pegava uma string de 50k e
> enviava, foram na media 780 requests por segundo, sem keep alive.
>
> KERNEL (removi todos os drivers nao existentes na maquina)
> --------------------------------------------------------------------------------------------------------
> (detalhe, vc compilou o conf do amd64 certo ?)

Isso amd64 mesmo porque com 24Gb de ram só ele mesmo rsrsrsrs
Quanto aos drivers não removi todos todos porque como a máquina estava 
em um datacenter e muito longe, fiquei com medo de tirar algo em excesso 
mas tirei bastante coisa principalmente drivers das interfaces de rede, 
onde só deixei a igb mesmo que eu tava usando. usb, paralela, wireless, 
firewire, som essas coisas arranquei tudo. :)

Até o HZ eu tentei com 1000 e com 3000  :)

Vou guardar aqui a conf pra gente testar na máquina de testes. Show!
>
>
> cpu             HAMMER
> ident           KERNEL64
>
> options         SCHED_ULE               # ULE 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         NFSLOCKD                # Network Lock Manager
> 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_IA32             # Compatible with i386 binaries
> 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         STACK                   # stack(9) 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
>
> # Make an SMP-capable kernel by default
> options         SMP                     # Symmetric MultiProcessor Kernel
>
> # CPU frequency control
> device          cpufreq
>
> #---------------------------------------------
> maxusers        384
>
> options         IPFIREWALL
> options         IPFIREWALL_VERBOSE
> options         IPFIREWALL_VERBOSE_LIMIT=10
> options         IPFIREWALL_FORWARD
> options         IPFIREWALL_DEFAULT_TO_ACCEPT
>
> options         DEVICE_POLLING
> options         HZ=1000
>
> (o resto sao drivers....)
>
> SYSCTL.CONF
> ------------------------------------------------------------------------------------------------
>
> machdep.hyperthreading_allowed=1
>
>
> security.jail.set_hostname_allowed=0
> security.jail.allow_raw_sockets=1
> security.jail.socket_unixiproute_only=1
> security.jail.sysvipc_allowed=0
> security.jail.enforce_statfs=2
> security.jail.allow_raw_sockets=1
> security.jail.chflags_allowed=0
>
>
> kern.maxfiles=65535
> kern.maxfilesperproc=32768
>
> kern.ipc.somaxconn=8192
> kern.ipc.maxsockbuf=2097152
> kern.ipc.maxsockets=81920
>
> kern.ipc.shmmax=33554432
> kern.ipc.shmall=32768
> #kern.ipc.shm_use_phys=1 # kernel to lock shared memory into RAM
>                          # and prevent it from being paged out to swap
>
> kern.polling.enable=1
> kern.polling.user_frac=50
>
> vfs.vmiodirenable=1
> vfs.ufs.dirhash_maxmem=67108864
>
> kern.maxvnodes=500000
>
> net.inet.ip.check_interface=1
> net.inet.udp.blackhole=1
> net.inet.tcp.blackhole=2  # blackhole pings, traceroutes, etc.
>
> net.inet.icmp.icmplim=100
> net.inet.ip.fw.dyn_max=4000
>
> net.inet.tcp.sendspace=65535
> net.inet.tcp.recvspace=32768
> net.inet.udp.recvspace=65535
> net.inet.udp.maxdgram=57344
> net.local.stream.recvspace=65535
> net.local.stream.sendspace=65535
>
> LOADER.CONF
> -----------------------------------------------------------------------------------------
> accf_http_load="YES"
> #kern.ipc.nmbclusters="0"
> autoboot_delay="5"
> beastie_disable="NO"
> kern.ipc.nmbclusters=32768
> kern.ipc.maxsockets=9216
> kern.ipc.maxsockbuf=2097152
> kern.hz="1000"       # Set the kernel interval timer rate
> kern.cam.scsi_delay="5000"   # Delay (in ms) before probing SCSI
>
>
> sysctl -a | grep kern
> -----------------------------------------------------------------------------------
>
> kern.ostype: FreeBSD
> kern.osrelease: 7.2-STABLE
> kern.osrevision: 199506
> kern.version: FreeBSD 7.2-STABLE #1: Thu Jun 18 18:24:43 CDT 2009
> kern.maxvnodes: 500000
> kern.maxproc: 6164
> kern.maxfiles: 65535
> kern.argmax: 262144
> kern.securelevel: -1
> kern.hostname: server.intervir.com.br
> kern.hostid: 1951235573
> kern.clockrate: { hz = 1000, tick = 1000, profhz = 2000, stathz = 133 }
> kern.posix1version: 200112
> kern.ngroups: 16
> kern.job_control: 1
> kern.saved_ids: 0
> kern.boottime: { sec = 1260964550, usec = 387150 } Wed Dec 16 08:55:50 2009
> kern.domainname:
> kern.osreldate: 702103
> kern.bootfile: /boot/kernel/kernel
> kern.maxfilesperproc: 32768
> kern.maxprocperuid: 5547
> kern.ipc.maxsockbuf: 2097152
> kern.ipc.sockbuf_waste_factor: 8
> kern.ipc.somaxconn: 8192
> kern.ipc.max_linkhdr: 16
> kern.ipc.max_protohdr: 60
> kern.ipc.max_hdr: 76
> kern.ipc.max_datalen: 100
> kern.ipc.nmbjumbo16: 3200
> kern.ipc.nmbjumbo9: 6400
> kern.ipc.nmbjumbop: 12800
> kern.ipc.nmbclusters: 32768
> kern.ipc.piperesizeallowed: 1
> kern.ipc.piperesizefail: 0
> kern.ipc.pipeallocfail: 0
> kern.ipc.pipefragretry: 0
> kern.ipc.pipekva: 1769472
> kern.ipc.maxpipekva: 138403840
> kern.ipc.msgseg: 2048
> kern.ipc.msgssz: 8
> kern.ipc.msgtql: 40
> kern.ipc.msgmnb: 2048
> kern.ipc.msgmni: 40
> kern.ipc.msgmax: 16384
> kern.ipc.semaem: 16384
> kern.ipc.semvmx: 32767
> kern.ipc.semusz: 152
> kern.ipc.semume: 10
> kern.ipc.semopm: 100
> kern.ipc.semmsl: 60
> kern.ipc.semmnu: 30
> kern.ipc.semmns: 60
> kern.ipc.semmni: 10
> kern.ipc.semmap: 30
> kern.ipc.shm_allow_removed: 0
> kern.ipc.shm_use_phys: 0
> kern.ipc.shmall: 32768
> kern.ipc.shmseg: 128
> kern.ipc.shmmni: 192
> kern.ipc.shmmin: 1
> kern.ipc.shmmax: 33554432
> kern.ipc.maxsockets: 81920
> kern.ipc.numopensockets: 701
> kern.ipc.nsfbufsused: 0
> kern.ipc.nsfbufspeak: 0
> kern.ipc.nsfbufs: 0
> kern.dummy: 0
> kern.ps_strings: 140737488355296
> kern.usrstack: 140737488355328
> kern.logsigexit: 1
> kern.iov_max: 1024
> kern.hostuuid: 53d19f64-d663-a017-8922-00304835e0d8
> kern.cam.cam_srch_hi: 0
> kern.cam.scsi_delay: 5000
> kern.cam.cd.retry_count: 4
> kern.cam.cd.changer.max_busy_seconds: 15
> kern.cam.cd.changer.min_busy_seconds: 5
> kern.cam.da.da_send_ordered: 1
> kern.cam.da.default_timeout: 60
> kern.cam.da.retry_count: 4
> kern.disks: aacd0
> kern.geom.collectstats: 1
> kern.geom.debugflags: 0
> kern.geom.label.debug: 0
> kern.elf64.fallback_brand: -1
> kern.init_shutdown_timeout: 120
> kern.init_path:
> /sbin/init:/sbin/oinit:/sbin/init.bak:/rescue/init:/stand/sysinstall
> kern.acct_suspended: 0
> kern.acct_configured: 0
> kern.acct_chkfreq: 15
> kern.acct_resume: 4
> kern.acct_suspend: 2
> kern.cp_times: 662553908 52965 143680325 3902691 9957581048 634299537
> 48405 127901360 183344 10005337755 366104124 23628 95251473 159875
> 10306231301 230472264 9376 67299722 189634 10469799405 188141143 7698
> 65875527 127114 10513618919 1$
> kern.cp_time: 2615826147 164562 683151164 7952239 82835069632
> kern.openfiles: 3269
> kern.kq_calloutmax: 4096
> kern.ps_arg_cache_limit: 256
> kern.stackprot: 7
> kern.randompid: 0
> kern.lastpid: 88986
> kern.ktrace.request_pool: 100
> kern.ktrace.genio_size: 4096
> kern.module_path: /boot/kernel;/boot/modules
> kern.malloc_count: 238
> kern.fallback_elf_brand: -1
> kern.features.compat_freebsd6: 1
> kern.features.compat_freebsd5: 1
> kern.features.compat_freebsd4: 1
> kern.maxusers: 384
> kern.ident: KERNEL64
> kern.polling.idlepoll_sleeping: 1
> kern.polling.stalled: 1090
> kern.polling.suspect: 100334
> kern.polling.phase: 0
> kern.polling.enable: 1
> kern.polling.handlers: 2
> kern.polling.residual_burst: 0
> kern.polling.pending_polls: 0
> kern.polling.lost_polls: 215024
> kern.polling.short_ticks: 1406
> kern.polling.reg_frac: 20
> kern.polling.user_frac: 50
> kern.polling.idle_poll: 0
> kern.polling.each_burst: 5
> kern.polling.burst_max: 150
> kern.polling.burst: 150
> kern.kstack_pages: 4
> kern.shutdown.kproc_shutdown_wait: 60
> kern.shutdown.poweroff_delay: 5000
> kern.sync_on_panic: 0
> kern.corefile: %N.core
> kern.nodump_coredump: 0
> kern.coredump: 1
> kern.sugid_coredump: 0
> kern.sigqueue.alloc_fail: 0
> kern.sigqueue.overflow: 0
> kern.sigqueue.preallocate: 1024
> kern.sigqueue.max_pending_per_proc: 128
> kern.forcesigexit: 1
> kern.fscale: 2048
> kern.timecounter.tick: 1
> kern.timecounter.choice: TSC(-100) ACPI-safe(850) i8254(0) dummy(-1000000)
> kern.timecounter.hardware: ACPI-safe
> kern.timecounter.stepwarnings: 0
> kern.timecounter.tc.i8254.mask: 65535
> kern.timecounter.tc.i8254.counter: 33144
> kern.timecounter.tc.i8254.frequency: 1193182
> kern.timecounter.tc.i8254.quality: 0
> kern.timecounter.tc.ACPI-safe.mask: 16777215
> kern.timecounter.tc.ACPI-safe.counter: 8464478
> kern.timecounter.tc.ACPI-safe.frequency: 3579545
> kern.timecounter.tc.ACPI-safe.quality: 850
> kern.timecounter.tc.TSC.mask: 4294967295
> kern.timecounter.tc.TSC.counter: 1806470984
> kern.timecounter.tc.TSC.frequency: 2666774176
> kern.timecounter.tc.TSC.quality: -100
> kern.timecounter.smp_tsc: 0
> kern.timecounter.invariant_tsc: 0
> kern.threads.virtual_cpu: 8
> kern.threads.max_threads_hits: 0
> kern.threads.max_threads_per_proc: 1500
> kern.ccpu: 0
> kern.sched.preemption: 1
> kern.sched.topology: 0
> kern.sched.steal_thresh: 3
> kern.sched.steal_idle: 1
> kern.sched.steal_htt: 1
> kern.sched.balance_interval: 133
> kern.sched.balance: 1
> kern.sched.tryself: 1
> kern.sched.affinity: 3
> kern.sched.pick_pri: 1
> kern.sched.preempt_thresh: 64
> kern.sched.interact: 30
> kern.sched.slice: 13
> kern.sched.name: ULE
> kern.devstat.version: 6
> kern.devstat.generation: 177
> kern.devstat.numdevs: 4
> kern.kobj_methodcount: 135
> kern.log_wakeups_per_second: 5
> kern.sgrowsiz: 131072
> kern.maxssiz: 536870912
> kern.dflssiz: 8388608
> kern.maxdsiz: 34359738368
> kern.dfldsiz: 134217728
> kern.maxtsiz: 134217728
> kern.maxbcache: 419430400
> kern.maxswzone: 33554432
> kern.nswbuf: 256
> kern.nbuf: 25600
> kern.ncallout: 18508
> kern.hz: 1000
> kern.msgbuf_clear: 0
> kern.msgbuf: pd), uid 80: exited on signal 6
> kern.always_console_output: 0
> kern.log_console_output: 1
> kern.smp.forward_roundrobin_enabled: 1
> kern.smp.forward_signal_enabled: 1
> kern.smp.cpus: 8
> kern.smp.disabled: 0
> kern.smp.active: 1
> kern.smp.maxcpus: 16
> kern.smp.maxid: 7
> kern.nselcoll: 2526342
> kern.tty_nout: 875480559
> kern.tty_nin: 16285740
> kern.drainwait: 300
> kern.constty_wakeups_per_second: 5
> kern.consmsgbuf_size: 8192
> kern.consmute: 0
> kern.console: consolectl,/consolectl,ttyd1,
> kern.minvnodes: 25000
> kern.metadelay: 28
> kern.dirdelay: 29
> kern.filedelay: 30
> kern.chroot_allow_open_directories: 1
> kern.rpc.invalid: 0
> kern.rpc.unexpected: 0
> kern.rpc.timeouts: 0
> kern.rpc.request: 0
> kern.rpc.retries: 0
> kern.elf32.fallback_brand: -1
> kern.random.yarrow.gengateinterval: 10
> kern.random.yarrow.bins: 10
> kern.random.yarrow.fastthresh: 192
> kern.random.yarrow.slowthresh: 256
> kern.random.yarrow.slowoverthresh: 2
> kern.random.sys.seeded: 1
> kern.random.sys.harvest.ethernet: 1
> kern.random.sys.harvest.point_to_point: 1
> kern.random.sys.harvest.interrupt: 1
> kern.random.sys.harvest.swi: 0
> machdep.adjkerntz: 0
> -------------------------
> Histórico: http://www.fug.com.br/historico/html/freebsd/
> Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd
>




Mais detalhes sobre a lista de discussão freebsd