Ну в общем после некоторых перенастроек стало и легче и тяжелее ;)
Hits доходит до 20-25% (что неплохо за полчаса работы ;) )
А вот потом - падает oops

Что делать? Пробовать CVS версию опять? Перейти на гигабейз?

Сторадж более двух гигов - ну на линуксе давно уже пофиксили все траблы с
большими файлами
Тем паче что изначально с raw пытался запустить

Перед падением в логе появляются такие вещи:

Wed Feb 25 11:46:55 2004  [0x6a01a8]fill_mem_obj(): Can't store.
Wed Feb 25 11:46:55 2004  [0x8ac22b]fill_mem_obj(): Can't create container.
Wed Feb 25 11:46:55 2004  [0x3200c8]fill_mem_obj(): Can't create container.
Wed Feb 25 11:46:55 2004  [0x24c093]continue_load(): Can't store.
Wed Feb 25 11:46:56 2004  [0x3400d]format_av_pair(): No mem at send_av_pair.
Wed Feb 25 11:46:56 2004  [0x57c15f]format_av_pair(): No mem at
send_av_pair.
Wed Feb 25 11:46:57 2004  [0x7c01f0]attach_data(): No mem in attach data.
Wed Feb 25 11:46:57 2004  [0x3000c0]Wed Feb 25 11:46:57 2004
[0x7401d]check_validity(): Can't create container.
fill_mem_obj(): Can't create container.
Wed Feb 25 11:46:57 2004  [0x950254]fill_mem_obj(): Can't create container.
Wed Feb 25 11:46:57 2004  [0xdc037]run_client(): Can't create or find memory
object.
Wed Feb 25 11:46:57 2004  [0x7b41ed]fill_mem_obj(): Can't store.
Wed Feb 25 11:46:57 2004  [0x5e817a]check_validity(): Can't create
container.
Wed Feb 25 11:46:57 2004  [0x200080]fill_mem_obj(): Can't store.
Wed Feb 25 11:46:58 2004  [0x1b406d]Wed Feb 25 11:46:58 2004
[0x988262]fill_mem_obj(): Can't store.
fill_mem_obj(): Can't store.
Wed Feb 25 11:46:58 2004  [0x160058]process_call(): Accept called on 289
Wed Feb 25 11:47:01 2004  [0x2cc0b3]parse_http_request(): Unrecognized
method `BMOVE'.
Wed Feb 25 11:47:07 2004  [0x43810e]check_validity(): Server closed
connection too early.
Wed Feb 25 11:47:08 2004  [0x7601d8]fill_mem_obj(): select: timed out.
Wed Feb 25 11:47:29 2004  [0x8003]statistics(): clients      : 493
Wed Feb 25 11:47:29 2004  [0x8003]statistics(): http_requests: 145287
Wed Feb 25 11:47:29 2004  [0x8003]statistics(): icp_requests : 0
Wed Feb 25 11:47:29 2004  [0x8003]statistics(): req_rate     : 110/s
Wed Feb 25 11:47:29 2004  [0x8003]statistics(): hits_rate    : 21%
Wed Feb 25 11:47:37 2004  [0x34c0d3]fill_mem_obj(): Can't store.
Wed Feb 25 11:47:37 2004  [0x150054]run_client(): No mem to read request.
Wed Feb 25 11:47:37 2004  [0x9a826a]fill_mem_obj(): Can't store.
Wed Feb 25 11:47:45 2004  [0x6f01bc]attach_data(): No mem in attach data.
Wed Feb 25 11:47:46 2004  [0x1dc077]fill_mem_obj(): Can't store.
Wed Feb 25 11:47:46 2004  [0x90024]fill_mem_obj(): Can't store.
Wed Feb 25 11:47:51 2004  [0xb342cd]fill_mem_obj(): select: timed out.
Wed Feb 25 11:47:53 2004  [0x28c0a3]fill_mem_obj(): select: timed out.
Wed Feb 25 11:47:55 2004  [0xe4039]check_validity(): Can't create fake
header.

Сторадж снизил до 10 гигов и сделал в файле (был - /dev/sdb т.е. raw на 130
гигов)

oopsctl stat:

## --  General info   --
Version      : 1.5.23
Uptime       : 1343sec, (0day(s), 0hour(s), 22min(s))
Last update  : Wed Feb 25 12:11:01 2004
Clients      : 531 (max: 565)
HTTP requests: 130971
ICP  requests: 0
Total hits   : 21874
Thread pool  : 670 ready to serve (out of 4096 max)
Curr.req.rate: 95.75 req/sec (max: 108.38)
Tot.req.rate : 97.52 req/sec
Curr.hit.rate: 18.85 %
Tot.hit.rate : 16.70 %
Curr.icp.rate: 0.00 req/sec (max: 0.00)
## --       CPU       --
Total usage  : 1277ms
Delta usage  : 89ms
Delta time   : 60000ms
Curr. CPU    : 0.15 % (0.01s+0.14u)
Aver. CPU    : 0.10 % (0.00s+0.09u)
## --    storages     --
Disks msg    : Cleanup finished
Storage      : /srv/proxy/proxydata
Size         : 10240.00 MB
Free blks    : 2621359 blks (10239.68Mb) 100.00 %
State        : READY
Fileno       : 9
## -- end of storages --
## --     modules     --
berkeley_db   BerkeleyDB 4.1.25 API (DB Interface)
CustomLog     Customized access log. (Log recording)
err           Error reporting module (Error reporting)
lang          National languages handling module (Output handling)
DummyLog      Dummy logging module (Log recording)
oopsctl       Oops controlling module (Independent port listener)
transparent   Transparent proxy (URL redirector)
wccp2         Web Cache Coordination Protocol v2.0 (Independent port
listener)

---------------------------------------------------------------------
oops.cfg:

nameserver 213.157.196.130

http_port       3128
icp_port        3130

userid  oops

#logfile                /dev/null
logfile /usr/local/oops/logs/oops.log { 3 1m } unbuffered

accesslog       /dev/null
#accesslog      /usr/local/oops/logs/access.log

pidfile         /usr/local/oops/logs/oops.pid
statistics      /usr/local/oops/logs/oops_statfile

icons-host      213.157.211.130
icons-port      81
icons-path      icons

mem_max         2048m
lo_mark         1024m
#start_red      0
#refuse_at      0
default-expire-value    30
ftp-expire-value        30
#anon_ftp_passw [EMAIL PROTECTED]
#expiretime     Sun:Sat 0100:0700
max-expire-value        30
last-modified-factor    5
#dont_cache_without_last_modified
default-expire-interval 5
#negative_cache 0
icp_timeout     1000
disk-low-free   0
disk-ok-free    0
force_http11
#always_check_freshness
force_completion 75
maxresident     32m
#minresident    0

insert_x_forwarded_for  yes
insert_via              yes
fetch_with_client_speed no
#       ACLs - currently: urlregex, urlpath, usercharset
#               port, dstdom, dstdom_regex, src_ip, time
#               each acl can be loaded from file.
##
#acl    CACHEABLECGI    urlregex
http://www\.topping\.com\.ua/cgi-bin/pingstat\.cgi\?072199131826
#acl    WWWPACO         urlregex        www\.paco\.net
#acl    NO_RLH          urlregex        zipper
#acl    REWRITEPORTS    urlregex        (www.job.ru|www.sale.ru)
#acl    REWRITEHOSTS    urlregex        (www.asm.ru|zipper\.paco)
#acl    WINUSER         usercharset     windows-1251
#acl    DOSUSER         usercharset     ibm866
#acl    UNIXUSER        usercharset     koi8-r
#acl    RUS             dstdom          ru su
#acl    UKR             dstdom          ua
#acl    BADPORTS        port            [0:79],110,138,139,513,[6000:6010]
#acl    BADDOMAIN       dstdom          baddomain1.com baddomain2.com
#acl    BADDOMREGEX     dstdom_regex    baddomain\.((com)|(org))
#acl    LOCAL_NETWORKS  src_ip
include:/usr/local/oops/acl_local_networks
#acl    BADNETWORKS     src_ip          192.168.10/24
## WARNING: acl dst_ip is applyed to destination hostname BEFORE
## any redirection used.
#acl    LOCALDST        dst_ip          192.168.10/24
##
#acl    WORKTIME        time            Mon,Tue:Fri 0900:1800
#acl    HTMLS           content_type    text/html
#acl    USERS           username        joe
acl     MSIE            header_substr   user-agent MSIE
acl     ADMINS          src_ip          127.0.0.1
acl     PURGE           method          PURGE
acl     CONNECT         method          CONNECT
acl     SSLPORT         port            443

acl_deny PURGE !ADMINS
acl_deny CONNECT !SSLPORT

##
#  Never cache objects with URL, containing next strings in path
##
stop_cache      ?
stop_cache      cgi-bin
stop_cache      vbs
stop_cache      php
stop_cache      php3
stop_cache      perl

#stop_cache_acl WWWPACO
#refresh_pattern        CACHEABLECGI    20 50% 200
#refresh_pattern        WWWPACO         0 0% 0

#bind_acl       outname1 RUS

#always_check_freshness_acl     HTMLS

local-domain    online.ge

local-networks  10/8 192.168/16

#
# Groups
#
group onlinegetransp    {
        networks        213.157.192.0/19 192.168.0.0/24;
        badports        [0:79],110,138,139,513,[6000:6010] ;
        miss            allow;
        redir_mods      transparent;

        http {
                allow   dstdomain * ;
        }
}

#group  onlinege        {
#       networks        127/8 81.195.15.134/32 ;
#       networks_acl    LOCAL_NETWORKS !BAD_NETWORKS ;
#       badports        [0:79],110,138,139,513,[6000:6010] ;
#       miss            allow;
#
#       http {
#               allow   dstdomain * ;
#       }
#}

group   world   {
        networks        0/0;
        badports        [0:79],110,138,139,513,[6000:6010];
        http {
                deny    dstdomain * ;
        }
        icp {
                deny    dstdomain * ;
        }
}

storage {
        path /srv/proxy/proxydata;
        size 10G;
#       offset  512;
}

module lang {

        default_charset koi8-r

        # Recode tables and other charset stuff
        CharsetRecodeTable windows-1251 /usr/local/oops/tables/koi-win.tab
        CharsetRecodeTable ISO-8859-5 /usr/local/oops/tables/koi-iso.tab
        CharsetRecodeTable ibm866 /usr/local/oops/tables/koi-alt.tab
        CharsetAgent windows-1251 AIR_Mosaic IWENG/1 MSIE WinMosaic (Windows
(WinNT;
        CharsetAgent windows-1251 (Win16; (Win95; (Win98; (16-bit) Opera/3.0
        CharsetAgent ibm866 DosLynx Lynx2/OS/2
}

module err {
        # error reporting module

        # template
        template /usr/local/oops/err_template.html

        # Language to use when generate Error messages
        lang ru
}

module passwd_file {
        # password proxy-authentication module
        #
        # default realm, scheme and passwd file
        # the only thing you really want to change is 'file' and 'template'
        # you don't have to reconfigure oops if you only
        # change content passwd file or template: oops authomatically
        # reload file

        realm           oops
        scheme          Basic
        file            /usr/local/oops/passwd
        template        /usr/local/oops/auth_template.html
}

module pam {
        realm           oops
        scheme          Basic
        service         oops
        template        /usr/local/oops/auth_template.html
}

module redir {
        # file - regex rules.
        # each line consist of one or two fields (separated with white
space)
        # 1. regular expression
        # 2. redirect-location
        # if requested (by client) url match regex then
        # if we have redirect-url then we send '302 Moved Temporary' to
        #       redirect-location
        # if we have no redirect-location (i.e. we have no 2-nd field)
        #       then we send template.html (%R will be substituted by rule)
        #    or some default message if we have no template.
        # you don't have to reconfigure oops each time
        # you edit rules or template, they will be reloaded authomatically

        file            /usr/local/oops/redir_rules
        template        /usr/local/oops/redir_template.html
##      mode control will redir rewrite url or send Location: header
##      with new location. Values are 'rewrite' or 'bounce'
#       mode            rewrite

        # myport can have next form:
        # myport [{hostname|ip_addr}:]port ...
        #       myport  3128
        # it configure redir module to process requests on
        # given port
        #       myport 3128
        # This module can process requests which come on http_port
        # and/or on different port. For example, you wish oops
        # bind on two ports - 3128 and 3129, and all requests which come on
        # port 3129 must pass through filters, and requests which come on
port
        # 3128 (common http_port) - not. Then you have to uncomment next
line
        # myport 3129
        # which means exactly: bind oops to additional port 3129 and process
        # requests which come on this port.
        # myport can be in the next form:
        # myport [{hostname|ip_addr}:]port
}

module oopsctl {
        # path to oopsctl unix socket
        socket_path     /usr/local/oops/logs/oopsctl
        # time to auto-refresh page (seconds)
        html_refresh    300
}

module  vary {
        user-agent      by_charset
        accept-charset  ignore
}

module  transparent {
        myport                  3131
#       broken_browsers         MSIE
}

##
## %h -                 remote ip address
## %A -                 local ip address
## %d -                 ip address of source (peer or document server)
## %l -                 remote logname from identd (not suported now)
## %U -                 remote user (from 'Authorization' header)
## %u -                 remote user (from proxy-auth)
## %{format}t -         time with optional {format} (for strftime)
## %t -                 time with standard format %d/%b/%Y:%T %Z
## %r -                 request line
## %s -                 status code
## %b -                 bytes received
## %{header}i -         value of header in request
## %m -                 HIT/MISS
## %k -                 hierarchy (DIRECT/NONE/...)
##
## directive buffered can be followed by size of the buffer,
## like 'buffered 32000'
##
#module customlog {
#       path    /usr/local/oops/logs/access_custom1
#       format  "%h %l %u %t \"%r\" %>s %b"
#  squid httpd mode log emulation
#       format  "%h %u %l %t \"%r\" %s %b %m:%k"
#       buffered
#       path    /usr/local/oops/logs/access_custom2
#       format  "%h->%A %l %u [%t] \"%r\" %s %b \"%{User-Agent}i\""
#}

module  berkeley_db {
    ##
    #  dbhome - directory where all DB indexes reside. Use full path
    #       this directory must exist.
    #  dbname - filename for index file. Use just filename (no full path)
    ##

        dbhome  /usr/local/oops/DB
        dbname  dburl

    ##
    #  This parameter specifies internal cache size of BerkeleyDB.
    #  Increase this parameter for best performance (if you have a lot of
memory).
    #  For example:  db_cache_mem       64m
    #  Default and minimum value:       4m
    #
    #  This memory pool is not part of memory pool, specified by mem_max
parameter.
    #  WARNING: the amount of RAM used by oops will be increased by the
value of
    #  this parameter.
    ##
    db_cache_mem        128m

}

#module gigabase_db {
#    This module enable GigaBASE as database engine.
#    You can use berkeley_db or gigabase_db, not both.
#    Also, important notice - indexes created with different modules
#    are not compatible.
#    ##
#    #  dbhome - directory where all DB indexes reside. Use full path
#    #      this directory must exist.
#    #  dbname - filename for index file. Use just filename (no full path)
#    ##
#
#       dbhome  /usr/local/oops/DB
#       dbname  gdburl
#
#    ##
#    #  This parameter specifies internal cache size of BerkeleyDB.
#    #  Increase this parameter for best performance (if you have a lot of
memory).
#    #  For example:  db_cache_mem      64m
#    #  Default and minimum value:      4m
#    #
#    #  This memory pool is not part of memory pool, specified by mem_max
parameter.
#    #  WARNING: the amount of RAM used by oops will be increased by the
value of
#    #  this parameter.
#    ##
#       db_cache_mem    64m
#
#}

module wccp2 {
        identity  213.157.211.130
        service-group web-cache
        router  213.157.211.129
}

#module netflow {
#
# This module exports netflow v5 records to flow collector(s)
# Each record consists of source (document source, peer,...) address
# destination address (client requested document), bytes transferred.
# If you supply file with route prefix table and autonomouos system numbers,
# then source and desctination ASNs will also present in flow records
#
#       file - path to the tile with prefixes (see file INSTALL).
#
#       file /usr/local/oops/prefix_table
#
#       source - flow records source address and port.
#
#       source    127.0.0.1:3333
#
#       collector - address and port of collector
#       you can have several lines(collectors).
#
#       collector 127.0.0.1:6666
#}

#module passwd_ldap {
# Time to keep login/pass in cache
#        refresh         3600
# searcbase - base, where we look for users
#        searchbase      ou=people,dc=elcom
# hostname of the ldap server
#        ldapserver      sunray
# port, where ldap server listen
#        ldapport        1389
#        template        /var/oops/auth_template.html
#}

----- Original Message ----- 
From: "Igor Khasilev" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 25, 2004 9:47 AM
Subject: Re: [OOPS] Вопросы по оптимизации oops


> On Tue, 24 Feb 2004, Max Shaposhnikov wrote:
>
> >     Тут в общем понадобился прокси для большого количества клиентов -
~1500
> > в пиковое время легко (в общем-то речь идет о масштабе нац. оператора)
> >     В общем сразу хочу сказать что транспарент в CVS версии битый -
работать
> > не хотел ни в какую. 1.5.23 - запустилась нормально в общем-то и
работает.
>
> Странно, в cvs-е ничего, относящегося к транспаренту не менялось.
>
> >     Железка - SMP Xeon 2.4Ghz / 4Gb /130 гигов 320 SCSI винт - в
общем-то
> > неплохой агрегат
> >     OS - Linux (да-да, solaris куда лучше - но пляшем от того что имеем
тем
> > паче что проблем с загрузкой машины нет), SuSE9 (что не очень то и
важно)
> > ядро 2.4.19
> >
> >     Работает все почти пристойно...
> >
> >      Проблемы
> >     1) Проработал 6 часов и умер (seg fault)
>
> Можно поставить unlimited на core file size и при повторе посмотреть
> что там в корке.
>
> >     2) Малый hit rate (при таком количестве юзеров думал поболе чем 4-5%
> > будет)
> >     3) Storage почти все свободен на 100% (дай бог один гиг
используется) -
> > это еще почему?
>
> Это нужно смотреть настройки, успешность прилинковки библиотеки db и
ошибок
> при работе со storage. Еще, предупреждаю, были сообщения о проблемах oops
> под линуксом при работе с файлом хранилища более 2G.
>
> >     4) Даже при максимальной загрузке top кажет что используется 256
мегов
> > памяти - это из 4-х-то гигов - а это с какой радости? При этом со
storage
> > работа весьма активная - vmstat 1 кажет что до 20мб/сек  на/с винта
> > прокачивается
>
> Недостаточно информации для ответа. 256М - это за сколько часов работы?
>
> > В общем - вопрос почти риторический - что крутить-то? ;)
>
> Если речь о малом проценте хитов то нужно начать с того, что увидеть что
> storage наполняется. небольшой занятый обьем в памяти регулируется с
помощью
> некскольких опций в oops.cfg, относящихся к памяти (владельцы FreeBSD
> в этом месте скептически улыбаются :)
>
> В общем - неплохо-бы увидеть oops.cfg, oopsctl stat и уже дальше думать.
>
>
> Igor Khasilev                   |
> PACO Links, igor at paco dot net  |
>
> =====================================================================
> If you would like to unsubscribe from this list send message to
> [EMAIL PROTECTED] with "unsubscribe oops" in message body.
> Archive is accessible on http://lists.paco.net/oops-rus/
>

=====================================================================
If you would like to unsubscribe from this list send message to
[EMAIL PROTECTED] with "unsubscribe oops" in message body.
Archive is accessible on http://lists.paco.net/oops-rus/

Дати відповідь електронним листом