Имеется машина с Фряхой, к сожалению на ней стоит пре-релиз 6.2. Стоит профтпд привязаный к радиусу. Так же, есть гигабитная сетевуха.
Проблема в том, что скорость на закачку всегда не больше 1 мг/с. В то же время, скорост аплоада - 10 мг/с и больше.
Ограничений в конфиге специально все убрал. Фаер выключен. Никак не могу понять, в чем же дело...
Что посоветуете?
>Имеется машина с Фряхой, к сожалению на ней стоит пре-релиз 6.2. Стоит
>профтпд привязаный к радиусу. Так же, есть гигабитная сетевуха.
>Проблема в том, что скорость на закачку всегда не больше 1 мг/с.
>В то же время, скорост аплоада - 10 мг/с и больше.
>
>Ограничений в конфиге специально все убрал. Фаер выключен. Никак не могу понять,
>в чем же дело...
>Что посоветуете?Сетевуха какая? Если noname или Realtek ранний, надо сильно играться с дровами вплоть до кода. Для нормальной работы обычно рекомендуют ставить что-то типа linksys (ex 3-com), intel, в общем, посерьезней, чтоб не бороться потом с железячными проблемами софтовыми костылями.
PS: Из личного опыта - была проблема 1 в 1, только на RTL 8139B. Но никто, думаю, не даст гарантию, что RTL 8169x свободен от подобных глюков.
>Что посоветуете?Какие сетевухи?
Покажите netstat -m
>
>>Что посоветуете?
>
>Какие сетевухи?
>Покажите netstat -mМожет быть несогласование скорости передачи ...
Сетевуха хорошая, интеловская.
ifconfig em0
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=b<RXCSUM,TXCSUM,VLAN_MTU>
inet *** netmask 0xfffffff8 broadcast ***
ether 00:07:e9:2a:99:16
media: Ethernet autoselect (1000baseTX <full-duplex>)
status: active
netstat -m299/481/780 mbufs in use (current/cache/total)
297/279/576/1536 mbuf clusters in use (current/cache/total/max)
297/148 mbuf+clusters out of packet secondary zone in use (current/cache)
0/0/0/0 4k (page size) jumbo clusters in use (current/cache/total/max)
0/0/0/0 9k jumbo clusters in use (current/cache/total/max)
0/0/0/0 16k jumbo clusters in use (current/cache/total/max)
668K/678K/1347K bytes allocated to network (current/cache/total)
0/0/0 requests for mbufs denied (mbufs/clusters/mbuf+clusters)
0/0/0 requests for jumbo clusters denied (4k/9k/16k)
0/10/640 sfbufs in use (current/peak/max)
0 requests for sfbufs denied
0 requests for sfbufs delayed
62 requests for I/O initiated by sendfile
25725 calls to protocol drain routines
>62 requests for I/O initiated by sendfile
>25725 calls to protocol drain routinesНе нравится мне это.
Приведите, плиз, конфиг proftpd, без комментариев.Варианты решения:
понижаем mtu
maxusers увеличивает до 512
maxbufs увеличиваем раза в дваИ, как вариант, накатываем FreeBSD 6.3 или 7.
>[оверквотинг удален]
>Не нравится мне это.
>Приведите, плиз, конфиг proftpd, без комментариев.
>
>Варианты решения:
>
>понижаем mtu
>maxusers увеличивает до 512
>maxbufs увеличиваем раза в два
>
>И, как вариант, накатываем FreeBSD 6.3 или 7.Извиниясь за задержу.
Кстати, забыл сказать, что
uname -a
FreeBSD ftp.*.ru 6.2-BETA2 FreeBSD 6.2-BETA2 #0: Fri Oct 20 03:22:00 MSD 2006 asd@:/usr/src/sys/i386/compile/TERRA25 i386Досталось по наследству... Стоит программный рейд, на 2 террабайта.
proftpd.conf :
ServerName "file exchange server"
ServerType standalone
DefaultServer on
ServerIdent on "Welcome to file exchange server"
Port 21
Umask 022
MaxInstances 100
User nobody
Group nogroup
RequireValidShell no
PathAllowFilter ^[a-zA-Z0-9][-+_=a-zA-Z0-9.,#{}/!]*$
PathDenyFilter (\.dll|\.ico|\.bat|\.vxd|\.sys|\.mid|\.mmf|\.scr|\.sc|\.reg|.scp|\.inf|thumbs\.db)$
RadiusEngine on
RadiusAcctServer 12.12.12.12 X74xgedr4Z
RadiusAuthServer 12.12.12.12 X74xgedr4Z
RadiusLog /var/log/ftp/ftprad
ExtendedLog /var/log/ftp/ftp.log all
RadiusRealm .ftp-*-*-ru
RadiusUserInfo $(161:20000) $(162:20000) $(160:/ftp) $(25:/usr/bin/date)
CreateHome on 755
AuthOrder mod_radius.c<Directory />
AllowOverwrite on
HideFiles "(\.snap|quota\.group|quota\.user)"
</Directory><Limit ALL>
IgnoreHidden on
</Limit><Directory /users>
HideGroup users
</Directory>ScoreboardFile /var/run/proftpd.scoreboard
MaxClientsPerHost 2
MaxConnectionRate 20
MaxClients 50
TransferRate RETR,STOR,APPE 20000 user ftp
#TransferRate RETR 5000:5000 user ftp
PassivePorts 49152 65534
DefaultRoot /ftp/home
AllowStoreRestart on
UseReverseDNS off
SyslogLevel debug
ListOptions "-a+R"
DefaultChdir /users
DefaultTransferMode binary
Попробовал уменьшить mtu до 1400, с шагами по 10 - ничего не дало.ДОбавил в конфиг профтпд CommandBufferSize 2048 - тож на взгляд ничего не дало.
Дальше :sysctl kern.ipc.maxsockbuf=2097152
kern.ipc.maxsockbuf: 262144 -> 2097152ftp# sysctl net.inet.tcp.sendspace=131070
net.inet.tcp.sendspace: 32768 -> 131070ftp# sysctl net.inet.tcp.recvspace=131070
net.inet.tcp.recvspace: 65536 -> 131070kern.maxfiles=65536 - стоит.
Скорость увеличилась на 300-600 килобайт. Т.е. Стала ~1200 кб/с. Хоть что-то конечно. Но на аплоад в 10 раз больше :)Посоветуйте что-нить =/
>Посоветуйте что-нить =/Что за программный RAID?
Винты справляются с нагрузкой?
Вдогонку.Непосредственно патч-корд пытались воткнуть?
Чтоб проверить на линке сервер-комп.
На пути между сервером и юзверями нет никаких шейперов?
Обновите исходники и установите драйвер сетевухи посвежеее.
Building and Installation
=========================NOTE: The driver can be installed as a dynamic loadable kernel module or
compiled into the kernel. You must have kernel sources installed in
order to compile the driver module.In the instructions below, x.x.x is the driver version as indicated in the
name of the driver tar file.1. Move the base driver tar file to the directory of your choice. For
example, use /home/username/em or /usr/local/src/em.2. Untar/unzip the archive:
tar xzvf em-x.x.x.tar.gz
This will create an em-x.x.x directory.
3. To create a loadable module, perform the following steps.
NOTE: To compile the driver into the kernel, go directly to step 4.a. To compile the module
cd em-x.x.x
makeb. To install the compiled module to the system directory:
make install
c. If you want the driver to load automatically when the system is booted:
1. Edit /boot/loader.conf, and add the following line:
if_em_load="YES"
4. To compile the driver into the kernel, enter:
cd em-x.x.x/src
cp *.[ch] /usr/src/sys/dev/emEdit the kernel configuration file (i.e., GENERIC or MYKERNEL) in
/usr/src/sys/i386/conf, and ensure the following line is present:device em
Compile and install the kernel. The system must be rebooted for the
kernel updates to take effect. For additional information on compiling
the kernel, consult the FreeBSD operating system documentation.5. To assign an IP address to the interface, enter the following:
ifconfig em<interface_num> <IP_address>
6. Verify that the interface works. Enter the following, where <IP_address>
is the IP address for another machine on the same subnet as the interface
that is being tested:ping <IP_address>
7. To configure the IP address to remain after reboot, edit /etc/rc.conf,
and create the appropriate ifconfig_em<interface_num>entry:ifconfig_em<interface_num>="<ifconfig_settings>"
Example usage:
ifconfig_em0="inet 192.168.10.1 netmask 255.255.255.0"
NOTE: For assistance, see the ifconfig man page.
А еще есть polling:
Polling
-------To enable polling in the driver, add the following options to the kernel
configuration, and then recompile the kernel:options DEVICE_POLLING
options HZ=1000At runtime use:
ifconfig emX polling (to turn polling on)
and:
ifconfig emX -polling (to turn it off)
Нет никаких шейпов. Специально в локальную сеть сервер выставили.
Рейд справляется. Там простая файло-помойка, для абонентов.
Спасибо за советы. Буду пробовать. Скоро отпишусь :)