Re: [asterisk-users] keep asterisk in RAM

2009-11-24 Thread Alex Balashov
Disable swap space.

swapoff -a

Jerry Geis wrote:

 Is there a way to keep asterisk in RAM
 and tell linux not to swap it out (ever).
 
 There are times when delays are noticed and I presume
 its due to linux swapping out the program. As if I call right back in
 then everything responds right away. Wait awhile and the same thing
 might occur.
 
 How can I keep asterisk always in RAM?
 
 I use CentOS 5.
 
 Thanks,
 
 jerry
 
 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 
 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users


-- 
Alex Balashov - Principal
Evariste Systems
Web : http://www.evaristesys.com/
Tel : (+1) (678) 954-0670
Direct  : (+1) (678) 954-0671

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] keep asterisk in RAM

2009-11-24 Thread Jeff LaCoursiere

Next question will be How can I keep my server from crashing? :)

(add more RAM... which may have been a good answer for question 1...)

j

On Tue, 24 Nov 2009, Alex Balashov wrote:

 Disable swap space.

 swapoff -a

 Jerry Geis wrote:

 Is there a way to keep asterisk in RAM
 and tell linux not to swap it out (ever).

 There are times when delays are noticed and I presume
 its due to linux swapping out the program. As if I call right back in
 then everything responds right away. Wait awhile and the same thing
 might occur.

 How can I keep asterisk always in RAM?

 I use CentOS 5.

 Thanks,

 jerry

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


 -- 
 Alex Balashov - Principal
 Evariste Systems
 Web : http://www.evaristesys.com/
 Tel : (+1) (678) 954-0670
 Direct  : (+1) (678) 954-0671

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 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 --

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


Re: [asterisk-users] keep asterisk in RAM

2009-11-24 Thread Tzafrir Cohen
On Tue, Nov 24, 2009 at 08:21:43AM -0500, Jerry Geis wrote:
 Is there a way to keep asterisk in RAM
 and tell linux not to swap it out (ever).
 
 There are times when delays are noticed and I presume
 its due to linux swapping out the program. As if I call right back in
 then everything responds right away. Wait awhile and the same thing
 might occur.
 
 How can I keep asterisk always in RAM?

Theoretically - yes. Practically - some other component of the system
will swap out and cause basically the same performance issues.

What else takes much memory on that system?

-- 
   Tzafrir Cohen
icq#16849755  jabber:tzafrir.co...@xorcom.com
+972-50-7952406   mailto:tzafrir.co...@xorcom.com
http://www.xorcom.com  iax:gu...@local.xorcom.com/tzafrir

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] keep asterisk in RAM

2009-11-24 Thread Alex Balashov
I was proceeding from the give them enough rope to hang themselves 
theory of technical support, which calls for doing just that when users 
insist on framing their question in terms of a solution they have 
already made up their mind on without examining whether they are asking 
the right question to begin with, or considering their problem in a 
larger context.

Jeff LaCoursiere wrote:

 Next question will be How can I keep my server from crashing? :)
 
 (add more RAM... which may have been a good answer for question 1...)
 
 j
 
 On Tue, 24 Nov 2009, Alex Balashov wrote:
 
 Disable swap space.

 swapoff -a

 Jerry Geis wrote:

 Is there a way to keep asterisk in RAM
 and tell linux not to swap it out (ever).

 There are times when delays are noticed and I presume
 its due to linux swapping out the program. As if I call right back in
 then everything responds right away. Wait awhile and the same thing
 might occur.

 How can I keep asterisk always in RAM?

 I use CentOS 5.

 Thanks,

 jerry

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

 -- 
 Alex Balashov - Principal
 Evariste Systems
 Web : http://www.evaristesys.com/
 Tel : (+1) (678) 954-0670
 Direct  : (+1) (678) 954-0671

 ___
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --

 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 --
 
 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users


-- 
Alex Balashov - Principal
Evariste Systems
Web : http://www.evaristesys.com/
Tel : (+1) (678) 954-0670
Direct  : (+1) (678) 954-0671

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] keep asterisk in RAM

2009-11-24 Thread jefferson alexandre
On Tue, Nov 24, 2009 at 11:21 AM, Jerry Geis ge...@pagestation.com wrote:

 Is there a way to keep asterisk in RAM
 and tell linux not to swap it out (ever).

 There are times when delays are noticed and I presume
 its due to linux swapping out the program. As if I call right back in
 then everything responds right away. Wait awhile and the same thing
 might occur.

 How can I keep asterisk always in RAM?


How  much RAM your system have?
Concurrent calls?
Write or encode calls on disk?

You have other softwares (like databases) running on same machine?

Maybe, you shoul run the vmstat, ps, top and other tools to detect the
bootleneck on your system, and read about  kernel swappiness:

http://kerneltrap.org/node/3000
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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

Re: [asterisk-users] keep asterisk in RAM

2009-11-24 Thread Randy R
On Tue, Nov 24, 2009 at 2:36 PM, jefferson alexandre
jefferson.alexan...@gmail.com wrote:
 On Tue, Nov 24, 2009 at 11:21 AM, Jerry Geis ge...@pagestation.com wrote:

 Is there a way to keep asterisk in RAM
 and tell linux not to swap it out (ever).

On a closely related note, has anyone built a normal (not embedded)
system on SSD? It might help if it works well with linux.
It seems to make a huge difference with OS like OS X.

/r

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] keep asterisk in RAM

2009-11-24 Thread Richard Kenner
 On a closely related note, has anyone built a normal (not embedded)
 system on SSD?

I've been running Asterisk on a 20GB SSD drive for a while now.

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] keep asterisk in RAM

2009-11-24 Thread David Gibbons
I recently implemented a vmware host using SSDs for the VM storage.

I wish you could see the grin on my face right now. It's so fast.

Remember thought that all SSDs are NOT created equal... Be careful what you buy.

snip
 On a closely related note, has anyone built a normal (not embedded)
 system on SSD?

I've been running Asterisk on a 20GB SSD drive for a while now.
/snip

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] keep asterisk in RAM

2009-11-24 Thread Randy R
On Tue, Nov 24, 2009 at 3:42 PM, Richard Kenner ken...@gnat.com wrote:
 On a closely related note, has anyone built a normal (not embedded)
 system on SSD?

 I've been running Asterisk on a 20GB SSD drive for a while now.

And? Noticed any significant performance advantage?

/r

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] keep asterisk in RAM

2009-11-24 Thread Tilghman Lesher
On Tuesday 24 November 2009 07:21:43 Jerry Geis wrote:
 Is there a way to keep asterisk in RAM
 and tell linux not to swap it out (ever).

 There are times when delays are noticed and I presume
 its due to linux swapping out the program. As if I call right back in
 then everything responds right away. Wait awhile and the same thing
 might occur.

 How can I keep asterisk always in RAM?

http://asterisk.drunkcoder.com/patches/20091124__dontswap.diff.txt

And run with -S flag.

-- 
Tilghman Lesher
Digium, Inc. | Senior Software Developer
twitter: Corydon76 | IRC: Corydon76-dig (Freenode)
Check us out at: www.digium.com  www.asterisk.org

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] keep asterisk in RAM

2009-11-24 Thread Jeff LaCoursiere

On Tue, 24 Nov 2009, Richard Kenner wrote:

 On a closely related note, has anyone built a normal (not embedded)
 system on SSD?

 I've been running Asterisk on a 20GB SSD drive for a while now.


What mft/model?

I was recently quoted a 4GB Compact Flash drive as part of a small system 
we plan to run asterisk on.  Loosely tieing this to the recent thread on 
swap configuration, assuming a small number of SIP phones and no PSTN 
hardware, we were planning on 1GB of RAM to avoid swapping to this CF 
device.

I know that CF cards have a limited number of writes before frying.  If we 
keep it from using swap am I really only concerned about voicemail and 
logs?

Cheers,

j

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] keep asterisk in RAM

2009-11-24 Thread Richard Kenner
 What mft/model?

Actually, it's 16GB, not 20GB.  It's a Transcend TS16GSSD25S-S.

 I know that CF cards have a limited number of writes before frying.
 If we keep it from using swap am I really only concerned about
 voicemail and logs?

That number is quite large, though.  I'm taking backups and figure
that it has a limited lifetime, but I have no idea if that's 2 years,
10, or 100.

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] keep asterisk in RAM

2009-11-24 Thread Michael Graves
On Tue, 24 Nov 2009 14:56:32 + (UTC), Jeff LaCoursiere wrote:


On Tue, 24 Nov 2009, Richard Kenner wrote:

 On a closely related note, has anyone built a normal (not embedded)
 system on SSD?

 I've been running Asterisk on a 20GB SSD drive for a while now.


What mft/model?

I was recently quoted a 4GB Compact Flash drive as part of a small system 
we plan to run asterisk on.  Loosely tieing this to the recent thread on 
swap configuration, assuming a small number of SIP phones and no PSTN 
hardware, we were planning on 1GB of RAM to avoid swapping to this CF 
device.

I know that CF cards have a limited number of writes before frying.  If we 
keep it from using swap am I really only concerned about voicemail and 
logs?

That will work fine if you select an Asterisk distro intended for such
applications, like Astlinux or Askozia. Both of these systems manage
disk acces is such a way that they maximize the lifespan of flash
media. Both are in fact intended to boot  run from much small flash
devices that are commonplace these days. They harken back to a time
when 1 GB was huge and expensive CF card.

There are many Astlinux systems out there that have been running on 64
MB CF cards in IDE adapters, and storing their configs  VM to either a
separate partition in the CF or a USB stick. I wrote this up back in
Jan 2006. http://www.mgraves.org/voip/?p=1092

Michael



Michael
--
Michael Graves
mgravesatmstvp.com
http://www.mgraves.org
o713-861-4005
c713-201-1262
sip:mgra...@mstvp.onsip.com
skype mjgraves
Twitter mjgraves




___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] keep asterisk in RAM

2009-11-24 Thread Richard Kenner
 And? Noticed any significant performance advantage?

I never ran it any other way, so have no comparison point.  I didn't do it
for performance reasons, but reliability.

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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


Re: [asterisk-users] keep asterisk in RAM

2009-11-24 Thread David Gibbons
snip
And? Noticed any significant performance advantage?
/snip

Massive increase in performance on mysql VMs with database sizes that exceed 
memory size (file caching). Boot times on VMs (windows and linux) under 10 
seconds.

There is no noticeable change in performance for normal operations on normal 
VMs because most of the files they're IO blocked by are already cached in 
memory.

I actually went with consumer-grade SSDs (4x OCZ 120gb models) in a raid 10. I 
know most people say 'those aren't good enough for me'. They are! And as long 
as you plan for some of them to fail over time, you're still ahead on cost and 
performance vs enterprise-grade SSDs (read: intel).

Synthetic testing with hdparm (sdb is the SSD array, sda is the spinning disk 
array) is below. This comparison is against 7200rpm disks; I don't have hdparm 
installed on a box running 15k rpm disks:

hdparm -tT --direct /dev/sdb

/dev/sdb:
 Timing O_DIRECT cached reads:   1128 MB in  2.00 seconds = 563.48 MB/sec
 Timing O_DIRECT disk reads:  1276 MB in  3.00 seconds = 425.01 MB/sec

hdparm -tT --direct /dev/sda

/dev/sda:
 Timing O_DIRECT cached reads:   138 MB in  2.03 seconds =  68.03 MB/sec
 Timing O_DIRECT disk reads:  364 MB in  3.00 seconds = 121.32 MB/sec


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

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