On the sort of hard disk that is used for bulk storage, the thing that limits the total throughput is moving the arm that carries the heads beween the cylinders, where a cylinder is the set of tracks at the same radial distance from the spindle.
As such the crtiical resource is that arm.
If you have more than one user, including, but not limited, to the result of having multiple virtual machines, they will all be fighting to have the arm in the part of the disk they want to use.
There are stieps that can be taken to minimise large arm movents, but they may mean that it takes longer to get back to the same place on the disk .
is there any configuration in asterisk to limit memory usage of service.
i gave the server 20gig memory last night, but still asterisk is consuming about 6.5gig like yesterday that total ram was 10g.
maybe there is a configuration to limit asterisk memory usage.
I havenāt read all lines here in detail, but is he is on a VM, say qemu/kvm, he could set the buffer mode to āunsafeā which minimizes real disk access (and is more fun in case the box crashes).
i gave 40 core cpu to the server (5core,8socket) and 40 gig memory,
but still we have problem : ivr and any other voice plays very slow and cdrs processed very late.
i check problem deeper
i found that CDR events raised with delay too,
qestion1 : cdr event raise after writing cdr to file and database???
question2 : with assuming that my database driver has problem and made this lag, did it cause that cdr didnt write EVEN in master.conf ???
i mean , if it had any problem with odbc for import cdr to sql , does it made lag on writing CDr to master.conf too?
if any problem exists in cdr writing , it didnāt write even in master.conf and no cdr event !!!
cdr in db and in master.conf and cdr events , all happened with delay about 30 minutes,
system load is abnormal too.
i see below options in sql configurations :
poolling = no
limit = 1
maybe these options are making problem.
i changed pooling to yes and limit = 50 last night
and i want to check applied configs today ( im waiting for 12:00pm (peak hour)) then i will inform you the result.
another question : can i reduce numbers of CDR in a call,
imagine a call :
call comes in and go to ivr then send to queue :
agent 1 rings and noAnswer ====> 1 cdr exactly after ring finished - during call
agent 2 rings and noAnswer ====> 1 cdr exactly after ring finished -during call
agent 3 rings and Answer ====> 1 cdr exactly after answer - during call
after agent 3 hangup the call again ====> 3 cdr - end of the call
general status is alittle better but problem not solved completely.
i double check res_odbc.conf and see below options :
; The maximum number of connections to have open at any given time.
; This defaults to 1 and it is highly recommended to only set this higher
; if using a version of UnixODBC greater than 2.3.1.
;max_connections => 20
; How long (in seconds) should we attempt to connect before considering the
; connection dead? The default is 10 seconds, but you may wish to reduce it,
; to increase responsiveness.
;connect_timeout => 10
i changed :
max_connections => 30 (as i update odbc version to 2.3.7)
and
connect_timeout => 7
question : are those changes applied with reload asterisk in console OR it need restart asterisk service ??? (as i canāt restart asterisk at this time with 70 concurrent calls)
You canāt. The CDR implementation is fundamentally single threaded. Changing that would require rewriting it. ODBC can be used for other things, and thus can result in multiple connections for them but not for CDR.
so how can i create multiple connection for odbc ?
my odbc configs:
odbc.ini
[MSSQL-asteriskcdrmssqldb]
Description=Dev DB MS SQL Server
Driver=ODBCDriver17forSQLServer
Database=AsteriskCDR
Username=app_cdr
Password=********************
Trace=no
Server=10.1.10.67
Port=1433
but with this 1 connection i have problem.
cdrs wait in a queue SO send to database and master.conf with big delay about 30 minutes.
this amount of waiting cdr will cause overload.
what do you suggest for the problem?
Donāt directly connect Asterisk to the database, but instead have it write to a file and have a separate process pick up the CDRs and put them into the database?
I have noticed that whenever there are high volume of calls on asterisk, CDR posting even to files gets delayed and different values(duration, billsec, start and end time) populated in CDR are incorrect.
Looking for solution since almost two months but got no success.