Добрый день коллеги, отпишусь о своих результатах в поисках решения по оптимизации Asterisk под Hyper-V 2008 R2.
И так что я сделал.
1) Собрал dahdy, выключил в /etc/dahdi/modules все лишние модули и вписал туда загрузку dahdi_dummy
Код: Выделить всё
[root@pbx asterisk]# lsmod | grep dahdi
dahdi_dummy 2400 0
dahdi_transcode 5240 1 wctc4xxp
dahdi 206672 4 dahdi_dummy,dahdi_transcode
crc_ccitt 1369 1 dahdi
2) В Asterisk убрал загрузку всех модулей работающих со временем (файл modules.conf) и добавил загрузку res_timing_dahdi.so
Код: Выделить всё
pbx*CLI> module show like res_timing_dahdi.so
Module Description Use Count
res_timing_dahdi.so DAHDI Timing Interface 1
1 modules loaded
Код: Выделить всё
pbx*CLI> dahdi show status
Description Alarms IRQ bpviol CRC Fra Codi Options LBO
DAHDI_DUMMY/1 (source: HRtimer) 1 UNCONFI 0 0 0 CAS Unk 0 db (CSU)/0-133 feet (DSX-1)
3) /etc/asterisk/asterisk.conf добавил internal_timing = yes в секцию [options]
4) Далее в /boot/grub/grub.conf добавил в параметры загрузки следующие параметры ide0=noprobe ide1=noprobe clocksource=acpi_pm
Код: Выделить всё
[root@pbx asterisk]# vi /boot/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/mapper/VolGroup-lv_root
# initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=1
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
#hiddenmenu
title CentOS (2.6.32-431.el6.i686)
root (hd0,0)
kernel /vmlinuz-2.6.32-431.el6.i686 ro root=/dev/mapper/VolGroup-lv_root ide0=noprobe ide1=noprobe clocksource=acpi_pm rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD rd_LVM_LV=VolGroup/lv_swap SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=VolGroup/lv_root KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-2.6.32-431.el6.i686.img
5) Выключил виртуальную машину, в Параметрах -> службы интеграции убрал галочку с Синхронизация времени.
6) Запустил сервер. Результат такой:
Код: Выделить всё
[root@pbx asterisk]# cat /sys/devices/system/clocksource/clocksource0/current_clocksource
acpi_pm
Код: Выделить всё
[root@pbx asterisk]# dahdi_test
Opened pseudo dahdi interface, measuring accuracy...
99.991% 99.988% 99.995% 99.994% 99.994% 99.988% 99.995% 99.992%
99.995% 99.992% 99.995% 99.983% 99.998% 99.990% 99.994% 99.994%
99.995% 99.993% 99.994% 99.994% 99.994% 99.996% 99.992% 99.994% ^C
--- Results after 24 passes ---
Best: 99.998% -- Worst: 99.983% -- Average: 99.992975%
Cummulative Accuracy (not per pass): 99.993
Есть ли от этого толк? Думаю да, т.к. раньше для синхронизации времени на сервере мне приходилось пользоваться заданием в кроне на синхронизацию раз в час с контроллером домена. Теперь часики тикают как положено, вот мой ntp.conf
Код: Выделить всё
tinker panic 0
driftfile /var/lib/ntp/drift
restrict 127.0.0.1
restrict default kod nomodify notrap
server 172.16.0.90 - контроллер домена
server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
;server 127.127.1.0
;fudge 127.127.1.0 stratum 10
Записи разговоров на Asterisk стали писаться нормально, без тиков... и выпадания букв. Но не все. В моей компании есть специфический Софт Фон, из-за его возможностей мы не можем от него отказаться, он очень удобен в плане работы сквозной авторизации для доменных пользователей, и одновременно тащит в себя логины и пароли с АТС и jabber сервера, это очень удобно. За какой бы компьютер наш пользователь не сел, ему сразу запустится его месенджер и сефотфон без вопросов о вводе паролей.
Так есть вот следующая таблица
софтфон -> стационарный телефон = чистая запись разговора на АТС
Debug записи говорит
Код: Выделить всё
[2014-01-16 12:37:28] DEBUG[4377][C-0000000d]: audiohook.c:269 audiohook_read_frame_both: Write factory 0xb6f14b94 was pretty quick last time, waiting for them.
[2014-01-16 12:37:28] DEBUG[4377][C-0000000d]: audiohook.c:269 audiohook_read_frame_both: Write factory 0xb6f14b94 was pretty quick last time, waiting for them.
[2014-01-16 12:37:28] DEBUG[4377][C-0000000d]: audiohook.c:269 audiohook_read_frame_both: Write factory 0xb6f14b94 was pretty quick last time, waiting for them.
[2014-01-16 12:37:28] DEBUG[4377][C-0000000d]: audiohook.c:269 audiohook_read_frame_both: Write factory 0xb6f14b94 was pretty quick last time, waiting for them.
[2014-01-16 12:37:28] DEBUG[4377][C-0000000d]: audiohook.c:269 audiohook_read_frame_both: Write factory 0xb6f14b94 was pretty quick last time, waiting for them.
[2014-01-16 12:37:28] DEBUG[4377][C-0000000d]: audiohook.c:269 audiohook_read_frame_both: Write factory 0xb6f14b94 was pretty quick last time, waiting for them.
[2014-01-16 12:37:28] DEBUG[4377][C-0000000d]: audiohook.c:269 audiohook_read_frame_both: Write factory 0xb6f14b94 was pretty quick last time, waiting for them.
[2014-01-16 12:37:28] DEBUG[4377][C-0000000d]: audiohook.c:269 audiohook_read_frame_both: Write factory 0xb6f14b94 was pretty quick last time, waiting for them.
[2014-01-16 12:37:28] DEBUG[4377][C-0000000d]: audiohook.c:269 audiohook_read_frame_both: Write factory 0xb6f14b94 was pretty quick last time, waiting for them.
[2014-01-16 12:37:28] DEBUG[4377][C-0000000d]: audiohook.c:269 audiohook_read_frame_both: Write factory 0xb6f14b94 was pretty quick last time, waiting for them.
[2014-01-16 12:37:28] DEBUG[4377][C-0000000d]: audiohook.c:269 audiohook_read_frame_both: Write factory 0xb6f14b94 was pretty quick last time, waiting for them.
[2014-01-16 12:37:28] DEBUG[4377][C-0000000d]: audiohook.c:269 audiohook_read_frame_both: Write factory 0xb6f14b94 was pretty quick last time, waiting for them.
[2014-01-16 12:37:28] DEBUG[4377][C-0000000d]: audiohook.c:269 audiohook_read_frame_both: Write factory 0xb6f14b94 was pretty quick last time, waiting for them.
[2014-01-16 12:37:28] DEBUG[4377][C-0000000d]: audiohook.c:269 audiohook_read_frame_both: Write factory 0xb6f14b94 was pretty quick last time, waiting for them.
[2014-01-16 12:37:28] DEBUG[4377][C-0000000d]: audiohook.c:269 audiohook_read_frame_both: Write factory 0xb6f14b94 was pretty quick last time, waiting for them.
[2014-01-16 12:37:28] DEBUG[4377][C-0000000d]: audiohook.c:269 audiohook_read_frame_both: Write factory 0xb6f14b94 was pretty quick last time, waiting for them.
[2014-01-16 12:37:28] DEBUG[4377][C-0000000d]: audiohook.c:269 audiohook_read_frame_both: Write factory 0xb6f14b94 was pretty quick last time, waiting for them.
[2014-01-16 12:37:28] DEBUG[4377][C-0000000d]: audiohook.c:269 audiohook_read_frame_both: Write factory 0xb6f14b94 was pretty quick last time, waiting for them.
[2014-01-16 12:37:28] DEBUG[4377][C-0000000d]: audiohook.c:269 audiohook_read_frame_both: Write factory 0xb6f14b94 was pretty quick last time, waiting for them.
[2014-01-16 12:37:28] DEBUG[4377][C-0000000d]: audiohook.c:269 audiohook_read_frame_both: Write factory 0xb6f14b94 was pretty quick last time, waiting for them.
[2014-01-16 12:37:28] DEBUG[4377][C-0000000d]: audiohook.c:269 audiohook_read_frame_both: Write factory 0xb6f14b94 was pretty quick last time, waiting for them.
[2014-01-16 12:37:28] DEBUG[4377][C-0000000d]: audiohook.c:269 audiohook_read_frame_both: Write factory 0xb6f14b94 was pretty quick last time, waiting for them.
[2014-01-16 12:37:28] DEBUG[4377][C-0000000d]: audiohook.c:269 audiohook_read_frame_both: Write factory 0xb6f14b94 was pretty quick last time, waiting for them.
стационарный телефон -> стационарный телефон = чистая запись разговора на АТС
софтфон -> софтфон = плохая запись разговора, наблюдаются тики, пощёлкивания в записи.
Debug записи говорит
Код: Выделить всё
[2014-01-16 12:35:18] DEBUG[4375][C-0000000c]: audiohook.c:269 audiohook_read_frame_both: Write factory 0xb6f197b4 was pretty quick last time, waiting for them.
[2014-01-16 12:35:18] DEBUG[4375][C-0000000c]: audiohook.c:269 audiohook_read_frame_both: Write factory 0xb6f197b4 was pretty quick last time, waiting for them.
[2014-01-16 12:35:18] DEBUG[4375][C-0000000c]: audiohook.c:269 audiohook_read_frame_both: Write factory 0xb6f197b4 was pretty quick last time, waiting for them.
[2014-01-16 12:35:18] DEBUG[4375][C-0000000c]: audiohook.c:269 audiohook_read_frame_both: Write factory 0xb6f197b4 was pretty quick last time, waiting for them.
[2014-01-16 12:35:19] DEBUG[4375][C-0000000c]: audiohook.c:316 audiohook_read_frame_both: Failed to get 160 samples from write factory 0xb6f197b4
[2014-01-16 12:35:19] DEBUG[4375][C-0000000c]: audiohook.c:316 audiohook_read_frame_both: Failed to get 160 samples from write factory 0xb6f197b4
[2014-01-16 12:35:19] DEBUG[4375][C-0000000c]: audiohook.c:316 audiohook_read_frame_both: Failed to get 160 samples from write factory 0xb6f197b4
[2014-01-16 12:35:19] DEBUG[4375][C-0000000c]: audiohook.c:316 audiohook_read_frame_both: Failed to get 160 samples from write factory 0xb6f197b4
[2014-01-16 12:35:19] DEBUG[4375][C-0000000c]: audiohook.c:316 audiohook_read_frame_both: Failed to get 160 samples from write factory 0xb6f197b4
[2014-01-16 12:35:19] DEBUG[4375][C-0000000c]: audiohook.c:316 audiohook_read_frame_both: Failed to get 160 samples from write factory 0xb6f197b4
[2014-01-16 12:35:19] DEBUG[4375][C-0000000c]: audiohook.c:263 audiohook_read_frame_both: Read factory 0xb6f18b8c and write factory 0xb6f197b4 both fail to provide 160 samples
[2014-01-16 12:35:19] DEBUG[4375][C-0000000c]: audiohook.c:316 audiohook_read_frame_both: Failed to get 160 samples from write factory 0xb6f197b4
[2014-01-16 12:35:19] DEBUG[4375][C-0000000c]: audiohook.c:263 audiohook_read_frame_both: Read factory 0xb6f18b8c and write factory 0xb6f197b4 both fail to provide 160 samples
[2014-01-16 12:35:19] DEBUG[4375][C-0000000c]: audiohook.c:316 audiohook_read_frame_both: Failed to get 160 samples from write factory 0xb6f197b4
[2014-01-16 12:35:19] DEBUG[4375][C-0000000c]: audiohook.c:263 audiohook_read_frame_both: Read factory 0xb6f18b8c and write factory 0xb6f197b4 both fail to provide 160 samples
[2014-01-16 12:35:19] DEBUG[4375][C-0000000c]: audiohook.c:275 audiohook_read_frame_both: Read factory 0xb6f18b8c was pretty quick last time, waiting for them.
[2014-01-16 12:35:19] DEBUG[4375][C-0000000c]: audiohook.c:275 audiohook_read_frame_both: Read factory 0xb6f18b8c was pretty quick last time, waiting for them.
[2014-01-16 12:35:19] DEBUG[4375][C-0000000c]: audiohook.c:275 audiohook_read_frame_both: Read factory 0xb6f18b8c was pretty quick last time, waiting for them.
[2014-01-16 12:35:19] DEBUG[4375][C-0000000c]: audiohook.c:263 audiohook_read_frame_both: Read factory 0xb6f18b8c and write factory 0xb6f197b4 both fail to provide 160 samples
[2014-01-16 12:35:19] DEBUG[4375][C-0000000c]: audiohook.c:275 audiohook_read_frame_both: Read factory 0xb6f18b8c was pretty quick last time, waiting for them.
[2014-01-16 12:35:19] DEBUG[4375][C-0000000c]: audiohook.c:275 audiohook_read_frame_both: Read factory 0xb6f18b8c was pretty quick last time, waiting for them.
[2014-01-16 12:35:19] DEBUG[4375][C-0000000c]: audiohook.c:275 audiohook_read_frame_both: Read factory 0xb6f18b8c was pretty quick last time, waiting for them.
[2014-01-16 12:35:19] DEBUG[4375][C-0000000c]: audiohook.c:275 audiohook_read_frame_both: Read factory 0xb6f18b8c was pretty quick last time, waiting for them.
[2014-01-16 12:35:19] DEBUG[4375][C-0000000c]: audiohook.c:275 audiohook_read_frame_both: Read factory 0xb6f18b8c was pretty quick last time, waiting for them.
[2014-01-16 12:35:19] DEBUG[4375][C-0000000c]: audiohook.c:275 audiohook_read_frame_both: Read factory 0xb6f18b8c was pretty quick last time, waiting for them.
[2014-01-16 12:35:19] DEBUG[4375][C-0000000c]: audiohook.c:275 audiohook_read_frame_both: Read factory 0xb6f18b8c was pretty quick last time, waiting for them.
[2014-01-16 12:35:19] DEBUG[4375][C-0000000c]: audiohook.c:275 audiohook_read_frame_both: Read factory 0xb6f18b8c was pretty quick last time, waiting for them.
[2014-01-16 12:35:19] DEBUG[4375][C-0000000c]: audiohook.c:275 audiohook_read_frame_both: Read factory 0xb6f18b8c was pretty quick last time, waiting for them.
[2014-01-16 12:35:19] DEBUG[4375][C-0000000c]: audiohook.c:275 audiohook_read_frame_both: Read factory 0xb6f18b8c was pretty quick last time, waiting for them.
[2014-01-16 12:35:19] DEBUG[4375][C-0000000c]: audiohook.c:275 audiohook_read_frame_both: Read factory 0xb6f18b8c was pretty quick last time, waiting for them.
[2014-01-16 12:35:19] DEBUG[4375][C-0000000c]: audiohook.c:275 audiohook_read_frame_both: Read factory 0xb6f18b8c was pretty quick last time, waiting for them.
Это явно уже не связано с hyper-V и совсем другая история.
Надеюсь вам поможет мой пост, навсякий случай оставлю пример моей конфигурации.
Физический сервер WS 2008 R2 Hyper-V
Виртуальный сервер CentOS 6.5 (ему выделены 4 процессора и 4096 ОЗУ)
Код: Выделить всё
[root@pbx ~]# cat /etc/redhat-release
CentOS release 6.5 (Final)
[root@pbx ~]# uname -r
2.6.32-431.el6.i686
[root@pbx ~]# cat /proc/version
Linux version 2.6.32-431.el6.i686 (mockbuild@c6b8.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) ) #1 SMP Fri Nov 22 00:26:36 UTC 2013