Re: [asterisk-users] CPU usage vs compiler flags
On Thu, Jun 04, 2009 at 02:11:45PM -0500, Miguel Molina wrote: You were right. Almost one day with the server nearly overloaded (it's a 24/7 call center) taught me the lesson: don't try to debug directly on production machines, use instead a separate testing one with a copy of the configuration if possible. Thanks to God for the spare CPU power that was available. Never thought that disabling the optimizations were going to impact the overall performance of asterisk that much. For the cases you have to, and in cases you can afford a short downtime, here's a small trick to borrow some debugging time on the production system: http://svn.digium.com/svn/asterisk/trunk/contrib/scripts/live_ast (In Asterisk as of 1.6.2, IIRC) In an Asteirsk source tree somewhere on the production system (not the one you normally use. Maybe use a copy of that one) wget http://svn.digium.com/svn/asterisk/trunk/contrib/scripts/live_ast chmod +x live_ast ./live_ast conf-file # edit live/live.conf . Unrem the following two: #LIVE_AST_CONFIGURE_PARAMS=--enable-dev-mode #LIVE_AST_FOR_SYSTEM=yes ./live_ast configure ./live_ast install ./live_ast samples Now you get a separate instance of Asterisk under ./live/ - ./live/usr/sbin/asterisk and ./live/usr/lib/modules/asterisk/ . You also get ./live/asterisk which is a wrapper script that behaves exactly like the Asetrisk binary (command-line wise, that is) so you can use it in your scripts or directly. See the magic in ./live/etc/asterisk/asterisk.conf So if you don't have important users at night (ahem) just shut down the standard Asterisk instance and switch to that instance for testing. Switching back should be likewise simple. -- 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] CPU usage vs compiler flags
Tzafrir Cohen escribió: On Mon, Jun 01, 2009 at 09:23:48AM -0500, Miguel Molina wrote: Hi all, I just upgraded a production server to asterisk 1.4.25, compiling with the following: [*] 1. DONT_OPTIMIZE [*] 2. DEBUG_CHANNEL_LOCKS [*] 3. DEBUG_THREADS [*] 4. DEBUG_FD_LEAKS [ ] 5. LOW_MEMORY [*] 6. MALLOC_DEBUG [ ] 7. RADIO_RELAX [ ] 8. STATIC_BUILD [ ] 9. IAX_OLD_FIND [*] 10. LOADABLE_MODULES Do this options make asterisk consume much more CPU? DONT_OPTIMIZE sure does, for starters. You were right. Almost one day with the server nearly overloaded (it's a 24/7 call center) taught me the lesson: don't try to debug directly on production machines, use instead a separate testing one with a copy of the configuration if possible. Thanks to God for the spare CPU power that was available. Never thought that disabling the optimizations were going to impact the overall performance of asterisk that much. By the way, everything back to normal with no special compiler flags, 1.4.25 seems very stable, with the memory leak problem gone. Thanks a lot asterisk developers! -- Ing. Miguel Molina Grupo de Tecnología Millenium Phone Center ___ -- 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
[asterisk-users] CPU usage vs compiler flags
Hi all, I just upgraded a production server to asterisk 1.4.25, compiling with the following: [*] 1. DONT_OPTIMIZE [*] 2. DEBUG_CHANNEL_LOCKS [*] 3. DEBUG_THREADS [*] 4. DEBUG_FD_LEAKS [ ] 5. LOW_MEMORY [*] 6. MALLOC_DEBUG [ ] 7. RADIO_RELAX [ ] 8. STATIC_BUILD [ ] 9. IAX_OLD_FIND [*] 10. LOADABLE_MODULES Do this options make asterisk consume much more CPU? My feeling is that asterisk is consuming an average of 30% more CPU than before. I'm doing this because the last upgrade to 1.4.23.1 was no good for me in terms of overall stability, so if this time it core dumps again or something I can have good debug information. Could you please give some advice, run it this way for a while and if it shows good stability compile again without the debug/non-optimization flags? By the way, I'm upgrading because the 1.4.22 asterisk had memory leak symptoms, and there are bugs solved for this and other issues, specially chan_local ones which we use a lot, so basically is to benefit of 6 months of bug fixes. Thanks in advance, -- Ing. Miguel Molina Grupo de Tecnología Millenium Phone Center ___ -- 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] CPU usage vs compiler flags
On Mon, Jun 01, 2009 at 09:23:48AM -0500, Miguel Molina wrote: Hi all, I just upgraded a production server to asterisk 1.4.25, compiling with the following: [*] 1. DONT_OPTIMIZE [*] 2. DEBUG_CHANNEL_LOCKS [*] 3. DEBUG_THREADS [*] 4. DEBUG_FD_LEAKS [ ] 5. LOW_MEMORY [*] 6. MALLOC_DEBUG [ ] 7. RADIO_RELAX [ ] 8. STATIC_BUILD [ ] 9. IAX_OLD_FIND [*] 10. LOADABLE_MODULES Do this options make asterisk consume much more CPU? DONT_OPTIMIZE sure does, for starters. -- 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