Re: [asterisk-users] IOPS required by Asterisk for Call Recording

2014-01-29 Thread Amit

Thanks Ron.
I will try to get these readings. About RAM disk, I will study on how to 
create RAM disk and conduct this test again.

There is no bottleneck on network.

After 80 calls, I see call drops, delay in responding, time out, 
re-transmission of SIP messages. If load is reduced, it settles again to 
normal.


*Thanks  Regards,*
Amit Patkar



On 1/28/2014 12:32 AM, Ron Wheeler wrote:
Can you get a reading of the total number of I/Os during your test? 
Peak IOPS?
That might tell you very quickly about the storage pattern that 
Asterisk uses.


Can you configure a RAM drive to see if disk is really the bottleneck. 
May need to add some more RAM memory to your configuration.


What is your network capacity? Usually one can write faster than the 
network can deliver - just to make sure that you are chasing the right 
bottleneck.


What happens at 80 calls to tell you that you have run out of IOPS?

Sorry for more questions than answers.

Ron



On 25/01/2014 12:26 AM, Amit wrote:

Thanks for response.
How do I derive the requirement? I need to size IO system to record multiple 
calls concurrently.
I ran test with following configuration
Quad Core Xeon with 4GB RAM
250GB SATA disk (No RAID)
Linux (CentOS 5.9)
Asterisk 1.8.20

I failed to record more than 80 calls.

If I run test with simple IVR, I achieved 400+ calls with same server.
So write seem to be an issue.
Is there any way to tune / optimize / configure for better write performance?

I am not sure if I need to post this query on developers list? Please guide...

Regards
Amit Patkar

Message: 1
Date: Fri, 24 Jan 2014 11:46:39 -0400
From: Mikeispbuil...@gmail.com
To: Asterisk Users Mailing List - Non-Commercial Discussion
asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] IOPS required by Asterisk for Call
Recording
Message-ID:52e28adf.8020...@gmail.com
Content-Type: text/plain; charset=iso-8859-1

On 14-01-24 11:16 AM, Amit wrote:

If I assume that Asterisk will write data on disk every second for
each call, I will need disk array to support minimum of 500 IOPS.
Where as if Asterisk push data every 2 seconds, I can deal with array
supporting 250 IOPS.
But if I assume that Asterisk will write data on disk for every RTP
packet received, as and when received, I will need disk IO system with
approx 25000 IOPS assuming 20 ms RTP packet.

You're assuming that asterisk will perform an fsync() after each write.
If asterisk writes without an fsync after each write, then the OS will
schedule writes intelligently based on RAM/disk IO available rather than
scheduling each one as a separate write.

Looking at the code for ast_writestream() there doesn't appear to be an
fsync() type call after each write, but someone more familiar with the
internals of Asterisk would be better able to verify that.


--
Ron Wheeler
President
Artifact Software Inc
email:rwhee...@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102



-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] IOPS required by Asterisk for Call Recording

2014-01-29 Thread Mike
On 14-01-29 08:34 AM, Amit wrote:
 Thanks Ron.
 I will try to get these readings. About RAM disk, I will study on how
 to create RAM disk and conduct this test again.
 There is no bottleneck on network.

To create a ramdisk under Linux, assuming you have enough ram -


# mkdir /ramdisk
# mount -t tmpfs tmpfs /ramdisk


-- 
Looking for (employment|contract) work in the
Internet industry, preferably working remotely. 
Building / Supporting the net since 2400 baud was
the hot thing. Ask for a resume! ispbuil...@gmail.com

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] IOPS required by Asterisk for Call Recording

2014-01-29 Thread Amit

I am using Monitor function. Let me try with MixMonitor and update.
After 80 calls, I see retransmission of SIP messages, unanswered calls..

*Thanks  Regards,*
Amit Patkar


On 1/28/2014 3:25 AM, Matthew Jordan wrote:

On Mon, Jan 27, 2014 at 1:02 PM, Ron Wheeler
rwhee...@artifact-software.com wrote:

Can you get a reading of the total number of I/Os during your test? Peak
IOPS?
That might tell you very quickly about the storage pattern that Asterisk
uses.

Can you configure a RAM drive to see if disk is really the bottleneck. May
need to add some more RAM memory to your configuration.

What is your network capacity? Usually one can write faster than the network
can deliver - just to make sure that you are chasing the right bottleneck.

What happens at 80 calls to tell you that you have run out of IOPS?

Dovetailing on this question, I'll add one as well:

Are you recording using MixMonitor, or Monitor?

Depending on your answer to the what happens at 80 calls, you may
get better results with MixMonitor over Monitor. MixMonitor offloads
the recording of the media to a separate thread; Monitor attempts to
record the audio on the thread servicing the channel(s).

Matt




-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] IOPS required by Asterisk for Call Recording

2014-01-29 Thread Amit

Will check and update.

*Thanks  Regards,*
Amit Patkar


On 1/28/2014 5:45 AM, Tiago Geada wrote:

Hi,

MixMonitor takes a parameter of a system command to run when the 
recording finishes. Like Chris said, you can write to ramdisk, and run 
a script that will move the file into final position only when the 
call has done recording


Here we use:
Set(recordFile=${UNIQUEID}_${NUMBER}.gsm);
Set(recordPath=/var/log/asterisk/recordings/${CALLERID(dnid)}/${STRFTIME(${EPOCH},GMT+0,%F)});
MixMonitor(/ramdrive/${recordFile},,/usr/local/bin/mixmon 
${recordFile} ${recordPath});

SIPAddHeader(X-REC-FILE: ${recordPath}/${recordFile});

and /usr/local/bin/mixmon will move the file to $recordPath and 
whatever else needs done on that file...




On 27 January 2014 21:55, Matthew Jordan mjor...@digium.com 
mailto:mjor...@digium.com wrote:


On Mon, Jan 27, 2014 at 1:02 PM, Ron Wheeler
rwhee...@artifact-software.com
mailto:rwhee...@artifact-software.com wrote:
 Can you get a reading of the total number of I/Os during your
test? Peak
 IOPS?
 That might tell you very quickly about the storage pattern that
Asterisk
 uses.

 Can you configure a RAM drive to see if disk is really the
bottleneck. May
 need to add some more RAM memory to your configuration.

 What is your network capacity? Usually one can write faster than
the network
 can deliver - just to make sure that you are chasing the right
bottleneck.

 What happens at 80 calls to tell you that you have run out of IOPS?

Dovetailing on this question, I'll add one as well:

Are you recording using MixMonitor, or Monitor?

Depending on your answer to the what happens at 80 calls, you may
get better results with MixMonitor over Monitor. MixMonitor offloads
the recording of the media to a separate thread; Monitor attempts to
record the audio on the thread servicing the channel(s).

Matt

--
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com  http://asterisk.org

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users





-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] IOPS required by Asterisk for Call Recording

2014-01-29 Thread Ron Wheeler
I am surprised about the network. It should go before the disk if you 
have a lot of short transactions. There is a high percentage of overhead 
on streams of short messages.

Make sure that you check at each point where messages are passing.

Have you done any mathematical modeling of the disk and network traffic?

Try changing your RAM to see if raising it (or lowering it if that is 
easier) affects the problem.


What is your CPU utilization like at 80 calls?

How many open files do you have at 80 calls? is this near the limit?

Can you adjust the quality of the recordings to reduce the bits stored 
for each second of audio?

What happens when you do this?

Ron

On 29/01/2014 7:34 AM, Amit wrote:

Thanks Ron.
I will try to get these readings. About RAM disk, I will study on how 
to create RAM disk and conduct this test again.

There is no bottleneck on network.

After 80 calls, I see call drops, delay in responding, time out, 
re-transmission of SIP messages. If load is reduced, it settles again 
to normal.


*Thanks  Regards,*
Amit Patkar



On 1/28/2014 12:32 AM, Ron Wheeler wrote:
Can you get a reading of the total number of I/Os during your test? 
Peak IOPS?
That might tell you very quickly about the storage pattern that 
Asterisk uses.


Can you configure a RAM drive to see if disk is really the 
bottleneck. May need to add some more RAM memory to your configuration.


What is your network capacity? Usually one can write faster than the 
network can deliver - just to make sure that you are chasing the 
right bottleneck.


What happens at 80 calls to tell you that you have run out of IOPS?

Sorry for more questions than answers.

Ron



On 25/01/2014 12:26 AM, Amit wrote:

Thanks for response.
How do I derive the requirement? I need to size IO system to record multiple 
calls concurrently.
I ran test with following configuration
Quad Core Xeon with 4GB RAM
250GB SATA disk (No RAID)
Linux (CentOS 5.9)
Asterisk 1.8.20

I failed to record more than 80 calls.

If I run test with simple IVR, I achieved 400+ calls with same server.
So write seem to be an issue.
Is there any way to tune / optimize / configure for better write performance?

I am not sure if I need to post this query on developers list? Please guide...

Regards
Amit Patkar

Message: 1
Date: Fri, 24 Jan 2014 11:46:39 -0400
From: Mikeispbuil...@gmail.com
To: Asterisk Users Mailing List - Non-Commercial Discussion
asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] IOPS required by Asterisk for Call
Recording
Message-ID:52e28adf.8020...@gmail.com
Content-Type: text/plain; charset=iso-8859-1

On 14-01-24 11:16 AM, Amit wrote:

If I assume that Asterisk will write data on disk every second for
each call, I will need disk array to support minimum of 500 IOPS.
Where as if Asterisk push data every 2 seconds, I can deal with array
supporting 250 IOPS.
But if I assume that Asterisk will write data on disk for every RTP
packet received, as and when received, I will need disk IO system with
approx 25000 IOPS assuming 20 ms RTP packet.

You're assuming that asterisk will perform an fsync() after each write.
If asterisk writes without an fsync after each write, then the OS will
schedule writes intelligently based on RAM/disk IO available rather than
scheduling each one as a separate write.

Looking at the code for ast_writestream() there doesn't appear to be an
fsync() type call after each write, but someone more familiar with the
internals of Asterisk would be better able to verify that.


--
Ron Wheeler
President
Artifact Software Inc
email:rwhee...@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102








--
Ron Wheeler
President
Artifact Software Inc
email: rwhee...@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] IOPS required by Asterisk for Call Recording

2014-01-27 Thread Amit

Thanks for response.
How do I derive the requirement? I need to size IO system to record multiple 
calls concurrently.
I ran test with following configuration
Quad Core Xeon with 4GB RAM
250GB SATA disk (No RAID)
Linux (CentOS 5.9)
Asterisk 1.8.20

I failed to record more than 80 calls.

If I run test with simple IVR, I achieved 400+ calls with same server.
So write seem to be an issue.
Is there any way to tune / optimize / configure for better write performance?

I am not sure if I need to post this query on developers list? Please guide...

Regards
Amit Patkar

Message: 1
Date: Fri, 24 Jan 2014 11:46:39 -0400
From: Mikeispbuil...@gmail.com
To: Asterisk Users Mailing List - Non-Commercial Discussion
asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] IOPS required by Asterisk for Call
Recording
Message-ID:52e28adf.8020...@gmail.com
Content-Type: text/plain; charset=iso-8859-1

On 14-01-24 11:16 AM, Amit wrote:


If I assume that Asterisk will write data on disk every second for
each call, I will need disk array to support minimum of 500 IOPS.
Where as if Asterisk push data every 2 seconds, I can deal with array
supporting 250 IOPS.
But if I assume that Asterisk will write data on disk for every RTP
packet received, as and when received, I will need disk IO system with
approx 25000 IOPS assuming 20 ms RTP packet.


You're assuming that asterisk will perform an fsync() after each write.
If asterisk writes without an fsync after each write, then the OS will
schedule writes intelligently based on RAM/disk IO available rather than
scheduling each one as a separate write.

Looking at the code for ast_writestream() there doesn't appear to be an
fsync() type call after each write, but someone more familiar with the
internals of Asterisk would be better able to verify that.

-- Looking for (employment|contract) work in the Internet industry, 
preferably working remotely. Building / Supporting the net since 2400 
baud was the hot thing. Ask for a resume! ispbuil...@gmail.com 
-- next part -- An HTML attachment was 
scrubbed... URL: 
http://lists.digium.com/pipermail/asterisk-users/attachments/20140124/590804b7/attachment-0001.html 
-- Message: 2 Date: Fri, 24 Jan 2014 
16:34:17 + From: A J Stiles asterisk_l...@earthshod.co.uk To: 
Asterisk Users Mailing List - Non-Commercial Discussion 
asterisk-users@lists.digium.com Subject: Re: [asterisk-users] IOPS 
required by Asterisk for Call Recording Message-ID: 
201401241634.17311.asterisk_l...@earthshod.co.uk Content-Type: 
Text/Plain; charset=iso-8859-6 On Friday 24 January 2014, Mike wrote:



On 14-01-24 11:16 AM, Amit wrote:

If I assume that Asterisk will write data on disk every second for
each call, I will need disk array to support minimum of 500 IOPS.
Where as if Asterisk push data every 2 seconds, I can deal with array
supporting 250 IOPS.
But if I assume that Asterisk will write data on disk for every RTP
packet received, as and when received, I will need disk IO system with
approx 25000 IOPS assuming 20 ms RTP packet.

You're assuming that asterisk will perform an fsync() after each write.
If asterisk writes without an fsync after each write, then the OS will
schedule writes intelligently based on RAM/disk IO available rather than
scheduling each one as a separate write.

Looking at the code for ast_writestream() there doesn't appear to be an
fsync() type call after each write, but someone more familiar with the
internals of Asterisk would be better able to verify that.


If you are running on Linux, don't forget that Linux's default behaviour is to
cache all disk writes until the machine is rebooted or the RAM is needed for
something else, and service read operations from the cache.  In fact, it's
entirely possible for a temporary file to be written, read and deleted without
ever going anywhere near a molecule of oxide.

Solaris has the opposite default caching strategy -- it assumes the worst
about filesystem integrity, and write operations block until decaching and
verifying have finished.


-- AJS Answers come *after* questions.






*Thanks  Regards,*
Amit Patkar


On 1/24/2014 8:46 PM, Amit wrote:

Hi

What are the disk IOPS required for Asterisk call recording?
I am trying to find out number of disks required in RAID array to 
record 500 calls.
Is there any formula to calculate IOPS required by Asterisk call 
recording? This will help me to find IOPS for different scale.


If I assume that Asterisk will write data on disk every second for 
each call, I will need disk array to support minimum of 500 IOPS. 
Where as if Asterisk push data every 2 seconds, I can deal with array 
supporting 250 IOPS.
But if I assume that Asterisk will write data on disk for every RTP 
packet received, as and when received, I will need disk IO system with 
approx 25000 IOPS assuming 20 ms RTP packet.


Please assist me on this requirement.

*Thanks  Regards,*
Amit Patkar

Re: [asterisk-users] IOPS required by Asterisk for Call Recording

2014-01-27 Thread Chris Bagnall

On 25/1/14 5:26 am, Amit wrote:

How do I derive the requirement? I need to size IO system to record
multiple calls concurrently.


I suspect this might be your problem:

250GB SATA disk (No RAID)



Is there any way to tune / optimize / configure for better write
performance?


Perhaps consider recording to a ramdisk first, then periodically write 
out completed files to HDD at your leisure (e.g. during slack periods)?


Or, given the relatively low cost of 250GB SSDs these days, swap out the 
spinning disc for an SSD.


Kind regards,

Chris
--
This email is made from 100% recycled electrons

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] IOPS required by Asterisk for Call Recording

2014-01-27 Thread Mike
On 14-01-25 01:26 AM, Amit wrote:
 250GB SATA disk (No RAID)
If you care enough to record the calls, you should care enough to get
some fast and redundant storage. SSDs would be best,  15K SAS drives
second choice. Even a good RAID10 of SATA drives would help a lot.

A RAID card with battery backed cache would be helpful as well.

-- 
Looking for (employment|contract) work in the
Internet industry, preferably working remotely. 
Building / Supporting the net since 2400 baud was
the hot thing. Ask for a resume! ispbuil...@gmail.com


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] IOPS required by Asterisk for Call Recording

2014-01-27 Thread Patrick Laimbock

On 25-01-14 06:26, Amit wrote:

Thanks for response.
How do I derive the requirement? I need to size IO system to record multiple 
calls concurrently.


I'm not aware of 400+ calls being recorded succesfully on an Asterisk 
box. If there is it probably has tons of RAM, enterprise grade SSDs or 
15K RPM FC/SAS drives in a battery backed RAID setup or a fast SAN 
saving the calls in native format (via a tmpfs) with the transcoding 
probably done on another box.



I ran test with following configuration
Quad Core Xeon with 4GB RAM


Add more RAM and much much more if you are going to use tmpfs.


250GB SATA disk (No RAID)


Well you get the performance you pay for. CentOS comes with various 
utilities that allow you to analyze that.



Linux (CentOS 5.9)


Imo CentOS 6.5 (x86_64) has better performance.


Asterisk 1.8.20


In 9 months Asterisk 1.8 will only get security fixes. I would use 
Asterisk 11. It will get regular bug fixes for a much longer time.



I failed to record more than 80 calls.


Hardly surprising.


If I run test with simple IVR, I achieved 400+ calls with same server.


A simple IVR is not the same as call recording. The comparison makes as 
much sense as saying that copying to /dev/null is faster than to a disk.



So write seem to be an issue.
Is there any way to tune / optimize / configure for better write performance?

I am not sure if I need to post this query on developers list? Please guide...


No, this is a user question and does not belong on the developer list.

Since you seem to work for a call center business perhaps investigate a 
commercial solution like Orecx (I have no affiliation):


http://www.orecx.com/OrecX-for-Asterisk.php

HTH,
Patrick

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] IOPS required by Asterisk for Call Recording

2014-01-27 Thread Daniel Taylor

On 01/24/2014 11:26 PM, Amit wrote:

Thanks for response.
How do I derive the requirement? I need to size IO system to record multiple 
calls concurrently.
I ran test with following configuration
Quad Core Xeon with 4GB RAM
250GB SATA disk (No RAID)
Linux (CentOS 5.9)
Asterisk 1.8.20
I'd suggest testing your system while monitoring with top and iotop 
(which should be a yum install away).


That should show you your bottlenecks.

It looks to me like Asterisk doesn't do compression until the call is 
ended, so recording to a compressed format would actually increase IO 
load (write, read and compress, write compressed data).


--
Daniel Taylor

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] IOPS required by Asterisk for Call Recording

2014-01-27 Thread Ron Wheeler
Can you get a reading of the total number of I/Os during your test? Peak 
IOPS?
That might tell you very quickly about the storage pattern that Asterisk 
uses.


Can you configure a RAM drive to see if disk is really the bottleneck. 
May need to add some more RAM memory to your configuration.


What is your network capacity? Usually one can write faster than the 
network can deliver - just to make sure that you are chasing the right 
bottleneck.


What happens at 80 calls to tell you that you have run out of IOPS?

Sorry for more questions than answers.

Ron



On 25/01/2014 12:26 AM, Amit wrote:

Thanks for response.
How do I derive the requirement? I need to size IO system to record multiple 
calls concurrently.
I ran test with following configuration
Quad Core Xeon with 4GB RAM
250GB SATA disk (No RAID)
Linux (CentOS 5.9)
Asterisk 1.8.20

I failed to record more than 80 calls.

If I run test with simple IVR, I achieved 400+ calls with same server.
So write seem to be an issue.
Is there any way to tune / optimize / configure for better write performance?

I am not sure if I need to post this query on developers list? Please guide...

Regards
Amit Patkar

Message: 1
Date: Fri, 24 Jan 2014 11:46:39 -0400
From: Mikeispbuil...@gmail.com
To: Asterisk Users Mailing List - Non-Commercial Discussion
asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] IOPS required by Asterisk for Call
Recording
Message-ID:52e28adf.8020...@gmail.com
Content-Type: text/plain; charset=iso-8859-1

On 14-01-24 11:16 AM, Amit wrote:

If I assume that Asterisk will write data on disk every second for
each call, I will need disk array to support minimum of 500 IOPS.
Where as if Asterisk push data every 2 seconds, I can deal with array
supporting 250 IOPS.
But if I assume that Asterisk will write data on disk for every RTP
packet received, as and when received, I will need disk IO system with
approx 25000 IOPS assuming 20 ms RTP packet.

You're assuming that asterisk will perform an fsync() after each write.
If asterisk writes without an fsync after each write, then the OS will
schedule writes intelligently based on RAM/disk IO available rather than
scheduling each one as a separate write.

Looking at the code for ast_writestream() there doesn't appear to be an
fsync() type call after each write, but someone more familiar with the
internals of Asterisk would be better able to verify that.


--
Ron Wheeler
President
Artifact Software Inc
email:rwhee...@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] IOPS required by Asterisk for Call Recording

2014-01-27 Thread Matthew Jordan
On Mon, Jan 27, 2014 at 1:02 PM, Ron Wheeler
rwhee...@artifact-software.com wrote:
 Can you get a reading of the total number of I/Os during your test? Peak
 IOPS?
 That might tell you very quickly about the storage pattern that Asterisk
 uses.

 Can you configure a RAM drive to see if disk is really the bottleneck. May
 need to add some more RAM memory to your configuration.

 What is your network capacity? Usually one can write faster than the network
 can deliver - just to make sure that you are chasing the right bottleneck.

 What happens at 80 calls to tell you that you have run out of IOPS?

Dovetailing on this question, I'll add one as well:

Are you recording using MixMonitor, or Monitor?

Depending on your answer to the what happens at 80 calls, you may
get better results with MixMonitor over Monitor. MixMonitor offloads
the recording of the media to a separate thread; Monitor attempts to
record the audio on the thread servicing the channel(s).

Matt

-- 
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com  http://asterisk.org

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] IOPS required by Asterisk for Call Recording

2014-01-27 Thread Tiago Geada
Hi,

MixMonitor takes a parameter of a system command to run when the recording
finishes. Like Chris said, you can write to ramdisk, and run a script that
will move the file into final position only when the call has done recording

Here we use:
Set(recordFile=${UNIQUEID}_${NUMBER}.gsm);

Set(recordPath=/var/log/asterisk/recordings/${CALLERID(dnid)}/${STRFTIME(${EPOCH},GMT+0,%F)});

MixMonitor(/ramdrive/${recordFile},,/usr/local/bin/mixmon ${recordFile}
${recordPath});
SIPAddHeader(X-REC-FILE:
${recordPath}/${recordFile});

and /usr/local/bin/mixmon will move the file to $recordPath and whatever
else needs done on that file...



On 27 January 2014 21:55, Matthew Jordan mjor...@digium.com wrote:

 On Mon, Jan 27, 2014 at 1:02 PM, Ron Wheeler
 rwhee...@artifact-software.com wrote:
  Can you get a reading of the total number of I/Os during your test? Peak
  IOPS?
  That might tell you very quickly about the storage pattern that Asterisk
  uses.
 
  Can you configure a RAM drive to see if disk is really the bottleneck.
 May
  need to add some more RAM memory to your configuration.
 
  What is your network capacity? Usually one can write faster than the
 network
  can deliver - just to make sure that you are chasing the right
 bottleneck.
 
  What happens at 80 calls to tell you that you have run out of IOPS?

 Dovetailing on this question, I'll add one as well:

 Are you recording using MixMonitor, or Monitor?

 Depending on your answer to the what happens at 80 calls, you may
 get better results with MixMonitor over Monitor. MixMonitor offloads
 the recording of the media to a separate thread; Monitor attempts to
 record the audio on the thread servicing the channel(s).

 Matt

 --
 Matthew Jordan
 Digium, Inc. | Engineering Manager
 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
 Check us out at: http://digium.com  http://asterisk.org

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] IOPS required by Asterisk for Call Recording

2014-01-24 Thread Mike
On 14-01-24 11:16 AM, Amit wrote:

 If I assume that Asterisk will write data on disk every second for
 each call, I will need disk array to support minimum of 500 IOPS.
 Where as if Asterisk push data every 2 seconds, I can deal with array
 supporting 250 IOPS.
 But if I assume that Asterisk will write data on disk for every RTP
 packet received, as and when received, I will need disk IO system with
 approx 25000 IOPS assuming 20 ms RTP packet.
You're assuming that asterisk will perform an fsync() after each write.
If asterisk writes without an fsync after each write, then the OS will
schedule writes intelligently based on RAM/disk IO available rather than
scheduling each one as a separate write.

Looking at the code for ast_writestream() there doesn't appear to be an
fsync() type call after each write, but someone more familiar with the
internals of Asterisk would be better able to verify that.

-- 
Looking for (employment|contract) work in the
Internet industry, preferably working remotely. 
Building / Supporting the net since 2400 baud was
the hot thing. Ask for a resume! ispbuil...@gmail.com

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] IOPS required by Asterisk for Call Recording

2014-01-24 Thread A J Stiles
On Friday 24 January 2014, Mike wrote:
 On 14-01-24 11:16 AM, Amit wrote:
  If I assume that Asterisk will write data on disk every second for
  each call, I will need disk array to support minimum of 500 IOPS.
  Where as if Asterisk push data every 2 seconds, I can deal with array
  supporting 250 IOPS.
  But if I assume that Asterisk will write data on disk for every RTP
  packet received, as and when received, I will need disk IO system with
  approx 25000 IOPS assuming 20 ms RTP packet.
 
 You're assuming that asterisk will perform an fsync() after each write.
 If asterisk writes without an fsync after each write, then the OS will
 schedule writes intelligently based on RAM/disk IO available rather than
 scheduling each one as a separate write.
 
 Looking at the code for ast_writestream() there doesn't appear to be an
 fsync() type call after each write, but someone more familiar with the
 internals of Asterisk would be better able to verify that.

If you are running on Linux, don't forget that Linux's default behaviour is to 
cache all disk writes until the machine is rebooted or the RAM is needed for 
something else, and service read operations from the cache.  In fact, it's 
entirely possible for a temporary file to be written, read and deleted without 
ever going anywhere near a molecule of oxide.

Solaris has the opposite default caching strategy -- it assumes the worst 
about filesystem integrity, and write operations block until decaching and 
verifying have finished.


-- 
AJS

Answers come *after* questions.

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] IOPS required by Asterisk for Call Recording

2014-01-24 Thread Amit

Thanks for response.
How do I derive the requirement? I need to size IO system to record multiple 
calls concurrently.
I ran test with following configuration
Quad Core Xeon with 4GB RAM
250GB SATA disk (No RAID)
Linux (CentOS 5.9)
Asterisk 1.8.20

I failed to record more than 80 calls.

If I run test with simple IVR, I achieved 400+ calls with same server.
So write seem to be an issue.
Is there any way to tune / optimize / configure for better write performance?

I am not sure if I need to post this query on developers list? Please guide...

Regards
Amit Patkar


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users