+ Responder ao Tópico



  1. #1

    Padrão Configura HD Sata com diskd ou aufs????

    Olá pessoal,

    utilizo o a configuracao do squid.conf myauth com um gateway em um servidor dell Processador Intel® Pentium® D 935 (2X2MB Cache, 3.2GHZ, 800MHz FSB) com 4 gb de memoria 01 HD sata de 80GB e outro de 160 GB. no momento não estou utilizando o myauth ainda, só está fazendo o cache e controle de banda com CBQ.

    Tenho picos de 200 clientes conectados simultaneamente e em determinados horários começa a demorar para abrir as paginas, depois que são exibidas abrem de uma vez só.

    Já alterei o filedescriptor pra rodar com 8192 pois estava dando um estouro do mesmo (problema resolvido). Coloquei um outro HD com 5 particoes de 30 gb para ter cache em outro hd tambem( 2º HD com 160GB). Seria melhor utilizar o diskd ou deixaria com aufs mesmo? do jeito que esta esta bom?? segue abaixo a minha configuração.

    desde ja agradeço

    camilo


    http_port 3128 transparent
    icp_port 0

    hierarchy_stoplist cgi-bin ?
    acl QUERY urlpath_regex cgi-bin \?
    no_cache deny QUERY

    cache_mem 1024 MB
    cache_swap_low 90
    cache_swap_high 95

    maximum_object_size 32 MB
    minimum_object_size 0 KB
    maximum_object_size_in_memory 64 KB

    ipcache_size 1024
    ipcache_low 90
    ipcache_high 95

    fqdncache_size 1024

    # lru, heap GDSF, heap LFUDA, heap LRU
    cache_replacement_policy heap LFUDA
    memory_replacement_policy heap GDSF

    cache_dir aufs /cache/squid1 10000 32 256
    cache_dir aufs /cache/squid2 10000 32 256
    cache_dir aufs /cache/squid3 10000 32 256
    cache_dir aufs /cache/squid4 10000 32 256
    cache_dir aufs /cache/squid5 10000 32 256
    cache_dir aufs /cache/squid6 10000 32 256

    cache_log /var/log/squid/cache.log

    cache_access_log none
    cache_store_log none

    mime_table /etc/squid/mime.conf
    pid_filename /usr/local/squid/var/logs/squid.pid

    debug_options ALL,1

    log_fqdn off

    # cache_dns_program /usr/local/squid/libexec/dnsserver

    refresh_pattern ^ftp: 15 20% 2280
    refresh_pattern ^gopher: 15 0% 2280
    refresh_pattern . 15 20% 2280

    acl all src 0.0.0.0/0.0.0.0

    # coloque susa redes validas aqui
    acl internet src 201.11.11.11/29

    # redes invalidas, nao tem perigo pois nunca virao da internet
    acl intranetac src 192.168.0.0/16 10.0.0.0/8
    acl intranetb src 172.16.0.0/16 172.17.0.0/16 172.18.0.0/16 172.19.0.0/16 172.20.0.0/16 172.21.0.0/16 172.22.0.0/1

    acl manager proto cache_object
    acl localhost src 127.0.0.1/255.255.255.255
    acl to_localhost dst 127.0.0.0/8
    acl SSL_ports port 443 563
    acl Safe_ports port 80 # http
    acl Safe_ports port 21 # ftp
    acl Safe_ports port 443 563 # https, snews
    acl Safe_ports port 70 # gopher
    acl Safe_ports port 210 # wais
    acl Safe_ports port 1025-65535 # unregistered ports
    acl Safe_ports port 280 # http-mgmt
    acl Safe_ports port 488 # gss-http
    acl Safe_ports port 591 # filemaker
    acl Safe_ports port 777 # multiling http
    acl CONNECT method CONNECT

    http_access allow manager localhost
    http_access deny manager

    http_access deny !Safe_ports
    http_access deny CONNECT !SSL_ports

    http_access allow localhost
    http_access allow internet
    http_access allow intranetac
    http_access allow intranetb
    http_access deny all

    icp_access deny all
    always_direct allow all

    cache_mgr myauth.com.br

    cache_effective_user squid
    cache_effective_group squid

    visible_hostname localhost


    #dns_testnames registro.br
    # icon_directory /usr/local/squid/share/icons
    # error_directory /usr/local/squid/share/errors/Portuguese

    coredump_dir /var/cache/squid

    # configuracoes SNMP
    #snmp_port 161

    acl snmppublic snmp_community public
    snmp_access allow snmppublic localhost
    snmp_access deny all

    snmp_incoming_address 0.0.0.0
    snmp_outgoing_address 255.255.255.255




    cache.log
    2007/08/20 21:45:40| Starting Squid Cache version 2.6.STABLE14 for i686-pc-linux-gnu...
    2007/08/20 21:45:40| Process ID 31866
    2007/08/20 21:45:40| With 8192 file descriptors available
    2007/08/20 21:45:40| Using poll for the IO loop
    2007/08/20 21:45:40| DNS Socket created at 0.0.0.0, port 32959, FD 4
    2007/08/20 21:45:40| Adding nameserver 200.222.0.34 from /etc/resolv.conf
    2007/08/20 21:45:40| Adding nameserver 200.222.0.35 from /etc/resolv.conf
    2007/08/20 21:45:40| Adding nameserver 200.184.26.3 from /etc/resolv.conf
    2007/08/20 21:45:40| Adding nameserver 200.184.26.4 from /etc/resolv.conf
    2007/08/20 21:45:40| Adding nameserver 200.222.97.123 from /etc/resolv.conf
    2007/08/20 21:45:40| Unlinkd pipe opened on FD 8
    2007/08/20 21:45:40| Swap maxSize 61440000 KB, estimated 4726153 objects
    2007/08/20 21:45:40| Target number of buckets: 236307
    2007/08/20 21:45:40| Using 262144 Store buckets
    2007/08/20 21:45:40| Max Mem size: 1048576 KB
    2007/08/20 21:45:40| Max Swap size: 61440000 KB
    2007/08/20 21:45:40| Store logging disabled
    2007/08/20 21:45:40| Rebuilding storage in /cache/squid1 (DIRTY)
    2007/08/20 21:45:40| Rebuilding storage in /cache/squid2 (DIRTY)
    2007/08/20 21:45:40| Rebuilding storage in /cache/squid3 (DIRTY)
    2007/08/20 21:45:40| Rebuilding storage in /cache/squid4 (DIRTY)
    2007/08/20 21:45:40| Rebuilding storage in /cache/squid5 (DIRTY)
    2007/08/20 21:45:40| Rebuilding storage in /cache/squid6 (DIRTY)
    2007/08/20 21:45:40| Using Least Load store dir selection
    2007/08/20 21:45:40| Set Current Directory to /var/cache/squid
    2007/08/20 21:45:40| Loaded Icons.
    2007/08/20 21:45:40| Accepting transparently proxied HTTP connections at 0.0.0.0, port 3128, FD 23.
    2007/08/20 21:45:40| Accepting SNMP messages on port 3401, FD 24.
    2007/08/20 21:45:40| Accepting transparently proxied HTTP connections at 0.0.0.0, port 3128, FD 23.
    2007/08/20 21:45:40| Accepting SNMP messages on port 3401, FD 24.
    2007/08/20 21:45:40| WCCP Disabled.
    2007/08/20 21:45:40| Ready to serve requests.
    2007/08/20 21:45:42| Store rebuilding is 2.6% complete
    2007/08/20 21:45:58| Store rebuilding is 23.9% complete
    2007/08/20 21:46:14| Store rebuilding is 49.9% complete
    2007/08/20 21:46:30| Store rebuilding is 65.6% complete
    2007/08/20 21:46:45| Store rebuilding is 76.0% complete
    2007/08/20 21:47:01| Store rebuilding is 89.1% complete
    2007/08/20 21:47:11| Done reading /cache/squid4 swaplog (151355 entries)
    2007/08/20 21:47:13| Done reading /cache/squid6 swaplog (152811 entries)
    2007/08/20 21:47:15| Done reading /cache/squid1 swaplog (156728 entries)
    2007/08/20 21:47:16| Done reading /cache/squid3 swaplog (158155 entries)
    2007/08/20 21:47:17| Store rebuilding is 98.2% complete
    2007/08/20 21:47:17| Done reading /cache/squid2 swaplog (160200 entries)
    2007/08/20 21:47:17| Done reading /cache/squid5 swaplog (164031 entries)
    2007/08/20 21:47:17| Finished rebuilding storage from disk.
    2007/08/20 21:47:17| 942541 Entries scanned
    2007/08/20 21:47:17| 0 Invalid entries.
    2007/08/20 21:47:17| 0 With invalid flags.
    2007/08/20 21:47:17| 942470 Objects loaded.
    2007/08/20 21:47:17| 0 Objects expired.
    2007/08/20 21:47:17| 533 Objects cancelled.
    2007/08/20 21:47:17| 246 Duplicate URLs purged.
    2007/08/20 21:47:17| 10 Swapfile clashes avoided.
    2007/08/20 21:47:17| Took 96.9 seconds (9724.2 objects/sec).
    2007/08/20 21:47:17| Beginning Validation Procedure
    2007/08/20 21:47:19| 262144 Entries Validated so far.
    2007/08/20 21:47:21| 524288 Entries Validated so far.
    2007/08/20 21:47:22| 786432 Entries Validated so far.
    2007/08/20 21:47:23| Completed Validation Procedure
    2007/08/20 21:47:23| Validated 941752 Entries
    2007/08/20 21:47:23| store_swap_size = 12378800k
    2007/08/20 21:47:23| storeLateRelease: released 39 objects

  2. #2

    Padrão

    voce so tera perda de performance usando varios cache_dir em um UNICO hd !!

    crie uma particao apenas, passe o L1 para 64 e o L2 sempre em 256..

    seu cache_mem esta absuardamente alto.. o ideial é 64mb .. se o sistema for dedicado para proxy e tiver muita memoria... (2gb no minimo) tente usar 128mb ...

    compila o squid com suporte a epoll !!

  3. #3

    Padrão

    qual a função do epool????

    e outra coisa. se eu fosse utilizar por exemplo um uma partição so com cache de 50 gb qual seria o L1 e L2 recomendado? Posso estar utilizando assim sem perda de performace??


    desde já agradeço

    essa eh a minha compilação

    Squid Cache: Version 2.6.STABLE3
    configure options: '--sysconfdir=/etc/squid' '--enable-storeio=aufs' '--enable-heap-replacement' '--enable-ssl' '--enable-arp-acl' '--enable-removal-policies=lru heap' '--disable-hostname-checks' '--enable-default-err-language=Portuguese' '--enable-err-languages=Portuguese' '--enable-linux-netfilter' '--with-large-files' '--enable-snmp' '--disable-ident-lookups'