On Fri, 17 Jun 2005, Alexandre Bunn wrote:

Boa tarde

Enviei a poucos dias uma mensagem a respeito de problemas com o processamento
relacionado ao squid retirei a regra de proxy transparente e parei o processo
do squid.

So pra relembrar

A maquina é um Pentium IV Xeon 3,06Gz, com 512MB de memoria, link de 6Mbps, as
placas de rede são:

bge0: <Broadcom BCM5702 Gigabit Ethernet, ASIC rev. 0x1002> mem
0xf5fe0000-0xf5feffff irq 5 at device 4.0 on pci0

xl0: <3Com 3c905C-TX Fast Etherlink XL> port 0x3000-0x307f mem
0xf7ff0000-0xf7ff007f irq 7 at device 1.0 on pci2

So que o processamento está em 77% só de Interrupt tanto system como User estão
baixos.

[EMAIL PROTECTED] root]# vmstat -i
interrupt                   total       rate
mux irq3                    34561          1
bge0 irq5                25797780        967
ata0 irq14                      3          0
xl0 irq7                 28000319       1050
fdc0 irq6                       2          0
atkbd0 irq1                   845          0
clk irq0                  2665934         99
rtc irq8                  3412453        127
Total                    59911897       2247


Boa tarde, Alexandre

Ha' algum tempo, fiz a mesma consulta nesta lista, sobre o mesmo problema. E' tambem um proxy transparente com squid-2.5.10_1, rodando no FreeBSD 5.4-STABLE. O host e' um:
------------------------------
CPU: Intel(R) Pentium(R) 4 CPU 2.80GHz (2793.01-MHz 686-class CPU)
Hyperthreading: 2 logical CPUs
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
real memory  = 2146631680 (2047 MB)
avail memory = 2094370816 (1997 MB)
------------------------------
em0: <Intel(R) PRO/1000 Network Connection, Version - 1.7.35> port 0xcf80-0xcf9f mem 0xfe9e0000
em0: Link is up 100 Mbps Full Duplex
------------------------------
ad0: 76319MB <ST380011A/3.06> [155061/16/63] at ata0-master UDMA100
ad1: 76319MB <ST380011A/3.06> [155061/16/63] at ata0-slave UDMA100
------------------------------
# vmstat -i
interrupt                          total       rate
irq1: atkbd0                        5385          0
irq6: fdc0                            10          0
irq8: rtc                      164487546        127
irq13: npx0                            1          0
irq14: ata0                      9852379          7
irq15: ata1                           46          0
irq18: em0                     308441113        240
irq0: clk                     2568564818       1998
Total                         3051351298       2374
------------------------------

Na epoca foram recebidas varias sugestoes e dicas. Algumas foram muito educativas e elucidadoras, mas poucas fizeram diferenca pratica no desempenho. Uma delas foi a de acrescentar as seguintes opcoes no kernel:

options         DEVICE_POLLING
options         HZ=2000

Entretanto, a "options DEVICE_POLLING" nao pode ser usada com o HT ativado. Para esta CPU, nos testes que fiz, a "options HZ=" com valor 2000 foi a que rendeu a maior queda no processamento.

Atualmente a carga esta' assim:
-----------------------
last pid: 23865;  load averages:  0.38,  0.50,  0.48 up 14+21:06:24 13:16:29
39 processes:  2 running, 37 sleeping
CPU states:  8.8% user,  0.0% nice, 42.5% system,  2.5% interrupt, 46.3% idle
Mem: 519M Active, 1128M Inact, 189M Wired, 64M Cache, 112M Buf, 103M Free
Swap: 4069M Total, 84K Used, 4069M Free

PID USERNAME PRI NICE   SIZE    RES STATE  C   TIME   WCPU    CPU   COMMAND
23814 squid    101    0   407M   399M RUN    0   5:31 43.95% 43.95% squid
-----------------------

O que e' intrigante e' a quantidade de processamento indicado por interrupcoes:

# systat -vmstat 1
----------------------
    2 users    Load  1.28  0.74  0.57                  Jun 17 13:21

Mem:KB REAL VIRTUAL VN PAGER SWAP PAGER Tot Share Tot Share Free in out in out
Act  543116    5456   604012     8296   95480 count
All 2045680    7524  4653352    11416         pages

Interrupts
Proc:r p d s w Csw Trp Sys Int Sof Flt cow 6462 total 2 4 33 7258 956 7389 8989 2615 221524 wire 1: atkb 547180 act 6: fdc0 32.8%Sys 5.3%Intr 56.5%User 0.0%Nice 5.3%Idl 1185876 inact 258 8: rtc | | | | | | | | | | 92476 cache 13: npx ================+++>>>>>>>>>>>>>>>>>>>>>>>>>>>> 3004 free 246 14: ata daefr 15: ata Namei Name-cache Dir-cache prcfr 1954 18: em0 Calls hits % hits % react 4004 0: clk
      156      131   84        3    2                     pdwake
                                          zfod            pdpgs
Disks   ad0   ad1                         ofod            intrn
KB/t    120  9.80                         %slo-z   114464 buf
tps      58    10                    4665 tfree       538 dirtybuf
MB/s 6.72 0.09 100000 desiredvnodes
% busy   57    18                                   90034 numvnodes
                                                    66536 freevnodes
----------------------

Qualquer progresso sera' muito valioso.

[]'s,
alex
_______________________________________________
Freebsd mailing list
Freebsd@fug.com.br
http://mail.fug.com.br/mailman/listinfo/freebsd_fug.com.br

Responder a