I ran a haproxy(nbproc=6) on freebsd 10-beta2, each frontend bind to a 
socket and share the same backend.  Context switch normally 60k+. But the load 
and throughput is confused me, in the past days I ran a haproxy instance 
(nbproc=1), it can handle  up to 500Mbps traffic . 


The info below is not on busy time:
# uptime
 3:10PM  up 4 days,  4:34, 3 users, load averages: 3.41, 3.82, 3.77

# top -HPS
last pid: 16550;  load averages:  3.92,  4.01,  3.82                            
                                                    up 4+04:31:33  15:07:55
123 processes: 15 running, 77 sleeping, 1 zombie, 30 waiting
CPU 0:  0.0% user,  0.0% nice,  0.0% system, 34.8% interrupt, 65.2% idle
CPU 1:  0.0% user,  0.0% nice,  0.0% system, 41.0% interrupt, 59.0% idle
CPU 2: 15.6% user,  0.0% nice, 22.3% system,  0.4% interrupt, 61.7% idle
CPU 3: 17.2% user,  0.0% nice, 31.6% system,  0.0% interrupt, 51.2% idle
CPU 4: 17.2% user,  0.0% nice, 20.3% system,  0.0% interrupt, 62.5% idle
CPU 5: 21.5% user,  0.0% nice, 26.2% system,  0.0% interrupt, 52.3% idle
CPU 6: 12.9% user,  0.0% nice, 21.5% system,  0.0% interrupt, 65.6% idle
CPU 7: 14.1% user,  0.0% nice, 24.6% system,  0.0% interrupt, 61.3% idle
Mem: 871M Active, 692M Inact, 560M Wired, 417M Buf, 1820M Free
Swap: 8192M Total, 8192M Free

  PID USERNAME   PRI NICE   SIZE    RES STATE   C   TIME    WCPU COMMAND
   11 root       155 ki31     0K   128K CPU2    2  79.0H  61.96% [idle{idle: 
cpu2}]
   11 root       155 ki31     0K   128K CPU6    6  76.1H  58.98% [idle{idle: 
cpu6}]
   11 root       155 ki31     0K   128K RUN     7  75.5H  58.98% [idle{idle: 
cpu7}]
   11 root       155 ki31     0K   128K RUN     5  77.1H  56.98% [idle{idle: 
cpu5}]
   11 root       155 ki31     0K   128K CPU4    4  77.6H  55.96% [idle{idle: 
cpu4}]
   11 root       155 ki31     0K   128K RUN     0  79.6H  54.98% [idle{idle: 
cpu0}]
   11 root       155 ki31     0K   128K CPU3    3  78.6H  52.98% [idle{idle: 
cpu3}]
   11 root       155 ki31     0K   128K RUN     1  79.6H  51.95% [idle{idle: 
cpu1}]
   12 root       -92    -     0K   496K WAIT    1  20.8H  50.98% [intr{irq257: 
bge1}]
15786 root        86    0   287M   249M CPU3    3  73:07  48.97% 
/usr/local/sbin/haproxy -q -f /usr/local/etc/haproxy.conf -p 
/var/run/haproxy.pid -sf 1570
   12 root       -92    -     0K   496K CPU0    0  20.7H  48.00% [intr{irq256: 
bge0}]
15787 root        86    0   239M   204M CPU4    4  73:53  46.97% 
/usr/local/sbin/haproxy -q -f /usr/local/etc/haproxy.conf -p 
/var/run/haproxy.pid -sf 1570
15789 root        85    0   251M   214M CPU6    6  76:12  46.00% 
/usr/local/sbin/haproxy -q -f /usr/local/etc/haproxy.conf -p 
/var/run/haproxy.pid -sf 1570
15788 root        52    0   246M   211M kqread  5  75:49  46.00% 
/usr/local/sbin/haproxy -q -f /usr/local/etc/haproxy.conf -p 
/var/run/haproxy.pid -sf 1570
15785 root        84    0   315M   275M CPU2    2  74:23  42.97% 
/usr/local/sbin/haproxy -q -f /usr/local/etc/haproxy.conf -p 
/var/run/haproxy.pid -sf 1570
15790 root        52    0   240M   205M RUN     7  73:22  40.97% 
/usr/local/sbin/haproxy -q -f /usr/local/etc/haproxy.conf -p 
/var/run/haproxy.pid -sf 1570


# netstat -b 1
            input        (Total)           output
   packets  errs idrops      bytes    packets  errs      bytes colls
    375218     0     0  232261646     424134     0  231909684     0
    366811     0     0  226394383     420581     0  229453967     0
    354549     0     0  218934804     398562     0  221149945     0
    343143     0     0  207114219     386270     0  208563374     0

# vmstat 1
 procs      memory      page                    disks     faults         cpu
 r b w     avm    fre   flt  re  pi  po    fr  sr ad0 pa0   in   sy   cs us sy 
id
 4 0 0   2335M  1821M    89   0   0   0    72 133   0   0 1950 6575 11313  7 15 
78
 2 0 0   2335M  1821M     0   0   0   0     0 385   0   0 23955 262207 63652 16 
34 50
 4 0 0   2335M  1821M     0   0   0   0     0 385   6   0 24381 270892 64521 14 
34 51
 1 0 0   2335M  1821M     0   0   0   0     0 385   0   0 23866 263830 62999 12 
38 50
 4 0 0   2335M  1821M     0   0   0   0     0 385   0   0 24315 269539 63936 13 
36 51


# ifstat -b
       bge0                bge1               vlan67             vlan705        
     vlan708             vlan709              lagg0
 Kbps in  Kbps out   Kbps in  Kbps out   Kbps in  Kbps out   Kbps in  Kbps out  
 Kbps in  Kbps out   Kbps in  Kbps out   Kbps in  Kbps out
315561.8  321251.0  291125.2  293214.0      1.96    726.08  552540.0  64954.99  
    0.00      0.00  54150.98  548661.9  621974.4  628548.3
281826.2  299858.7  316745.4  300973.6      1.46    705.18  543350.4  65773.75  
    0.00      0.00  55186.89  534110.3  589127.2  588204.5
279791.3  287347.3  272280.2  269952.9      1.50    686.32  502532.9  59567.50  
    0.00      0.00  49501.31  496878.4  539236.8  550590.8
272555.7  282285.0  295684.0  285037.7      2.39    650.30  515627.9  62465.26  
    0.00      0.00  52581.33  504110.8  537358.0  536251.5
276958.8  281172.9  274913.1  273436.9      1.51    586.52  503105.3  58543.24  
    0.00      0.00  48752.27  495364.4  545007.6  544610.7

#dmesg
Copyright (c) 1992-2013 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 10.0-BETA2 #0 r257417: Thu Oct 31 13:02:48 CST 2013
    root@sq-l1-n2:/usr/obj/usr/src/sys/stable10-20131031 amd64
FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
CPU: Quad-Core AMD Opteron(tm) Processor 2354 (2211.38-MHz K8-class CPU)
  Origin = "AuthenticAMD"  Id = 0x100f22  Family = 0x10  Model = 0x2  Stepping 
= 2
  
Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
  Features2=0x802009<SSE3,MON,CX16,POPCNT>
  AMD 
Features=0xee500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM,3DNow!+,3DNow!>
  AMD Features2=0x7ff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW,IBS>
  TSC: P-state invariant
real memory  = 8589934592 (8192 MB)
avail memory = 4108333056 (3918 MB)
Event timer "LAPIC" quality 400
ACPI APIC Table: <091208 APIC1000>
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
FreeBSD/SMP: 2 package(s) x 4 core(s)

Reply via email to