Off loading unnecessary asterisk modules

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Off loading unnecessary asterisk modules

Postby mcargile » Tue Feb 06, 2007 2:22 pm

One of the tricks I always do with my asterisk systems, once I have pretty much finalized my dialplan is to thin out the unnecessary modules from asterisk. This helps to reduce its memory signature. I did that with my test VICIDIAL system today and thought I would share my modules.conf. Now this is a test system so I am not sure if I miss something that is vital. The asterisk version I am using is 1.2.14.

Here is my modules.conf file:
Code: Select all
[modules]
autoload=no

;PBX
;load=pbx_ael.so      ; Asterisk Extension Language Compiler
load=pbx_config.so      ; Text Extension Configuration
;load=pbx_functions.so      ; Builtin dialplan functions
;load=pbx_loopback.so      ; Loopback Switch
;load=pbx_realtime.so      ; Realtime Switch
;load=pbx_spool.so      ; Outgoing Spool Support

;Resources
load=res_adsi.so      ; ADSI Resource
load=res_agi.so         ; Asterisk Gateway Interface (AGI)
;load=res_crypto.so      ; Cryptographic Digital Signatures
load=res_features.so      ; Call Features Resource
;load=res_indications.so   ; Indications Configuration
load=res_monitor.so      ; Call Monitoring Resource
;load=res_musiconhold.so   ; Music On Hold Resource

;Applications
;load=app_adsiprog.so      ; Asterisk ADSI Programming Application
;load=app_alarmreceiver.so   ; Alarm Receiver for Asterisk
load=app_amd.so         ; Answering Machine Detection Application
;load=app_authenticate.so   ; Authentication Application
;load=app_cdr.so      ; Tell Asterisk to not maintain a CDR for
;load=app_chanisavail.so   ; Check channel availability
;load=app_chanspy.so      ; Listen to the audio of an active channel
;load=app_controlplayback.so   ; Control Playback Application
;load=app_cut.so      ; Cut out information from a string
;load=app_db.so         ; Database Access Functions
load=app_dial.so      ; Dialing Application
;load=app_dictate.so      ; Virtual Dictation Machine
;load=app_directed_pickup.so   ; Directed Call Pickup Application
;load=app_directory.so      ; Extension Directory
;load=app_disa.so      ; DISA (Direct Inward System Access) Appli
;load=app_dumpchan.so      ; Dump Info About The Calling Channel
;load=app_echo.so      ; Simple Echo Application
;load=app_enumlookup.so      ; ENUM Lookup
;load=app_eval.so      ; Reevaluates strings
;load=app_exec.so      ; Executes applications
;load=app_externalivr.so   ; External IVR Interface Application
;load=app_festival.so      ; Simple Festival Interface
;load=app_flash.so      ; Flash zap trunk application
;load=app_forkcdr.so      ; Fork The CDR into 2 separate entities.
;load=app_getcpeid.so      ; Get ADSI CPE ID
;load=app_groupcount.so      ; Group Management Routines
;load=app_hasnewvoicemail.so   ; Indicator for whether a voice mailbox ha
;load=app_ices.so      ; Encode and Stream via icecast and ices
;load=app_image.so      ; Image Transmission Application
;load=app_lookupblacklist.so   ; Look up Caller*ID name/number from black
;load=app_lookupcidname.so   ; Look up CallerID Name from local databas
load=app_macro.so      ; Extension Macros
;load=app_math.so      ; Basic Math Functions
;load=app_md5.so      ; MD5 checksum applications
load=app_meetme.so      ; MeetMe conference bridge
;load=app_milliwatt.so      ; Digital Milliwatt (mu-law) Test Applicat
;load=app_mixmonitor.so      ; Mixed Audio Monitoring Application
;load=app_mp3.so      ; Silly MP3 Application
;load=app_nbscat.so      ; Silly NBS Stream Application
;load=app_page.so      ; Page Multiple Phones
;load=app_parkandannounce.so   ; Call Parking and Announce Application
load=app_playback.so      ; Sound File Playback Application
;load=app_privacy.so      ; Require phone number to be entered, if n
;load=app_queue.so      ; True Call Queueing
;load=app_random.so      ; Random goto
;load=app_readfile.so      ; Stores output of file into a variable
;load=app_read.so      ; Read Variable Application
;load=app_realtime.so      ; Realtime Data Lookup/Rewrite
load=app_record.so      ; Trivial Record Application
load=app_sayunixtime.so      ; Say time
load=app_senddtmf.so      ; Send DTMF digits Application
;load=app_sendtext.so      ; Send Text Applications
;load=app_setcallerid.so   ; Set CallerID Application
;load=app_setcdruserfield.so   ; CDR user field apps
;load=app_setcidname.so      ; Set CallerID Name
;load=app_setcidnum.so      ; Set CallerID Number
;load=app_setrdnis.so      ; Set RDNIS Number
;load=app_settransfercapability.so; Set ISDN Transfer Capability
;load=app_sms.so      ; SMS/PSTN handler
;load=app_softhangup.so      ; Hangs up the requested channel
;load=app_stack.so      ; Stack Routines
;load=app_system.so      ; Generic System() application
;load=app_talkdetect.so      ; Playback with Talk Detection
;load=app_test.so      ; Interface Test Application
load=app_transfer.so      ; Transfer
;load=app_txtcidname.so      ; TXTCIDName
;load=app_url.so      ; Send URL Applications
;load=app_userevent.so      ; Custom User Event Application
;load=app_verbose.so      ; Send verbose output
load=app_voicemail.so      ; Comedian Mail (Voicemail System)
;load=app_waitforring.so   ; Waits until first ring after time
load=app_waitforsilence.so   ; Wait For Silence
;load=app_while.so      ; While Loops and Conditional Execution
;load=app_zapateller.so      ; Block Telemarketers with Special Informa
load=app_zapbarge.so      ; Barge in on Zap channel application
;load=app_zapras.so      ; Zap RAS Application
;load=app_zapscan.so      ; Scan Zap channels application

;CDR
;load=cdr_csv.so      ; Comma Separated Values CDR Backend
;load=cdr_custom.so      ; Customizable Comma Separated Values CDR
load=cdr_manager.so      ; Asterisk Call Manager CDR Backend

;Channels
;load=chan_agent.so      ; Agent Proxy Channel
;load=chan_features.so      ; Feature Proxy Channel
load=chan_iax2.so      ; Inter Asterisk eXchange (Ver 2)
load=chan_local.so      ; Local Proxy Channel
;load=chan_oss.so      ; OSS Console Channel Driver
;load=chan_phone.so      ; Linux Telephony API Support
load=chan_sip.so      ; Session Initiation Protocol (SIP)
load=chan_zap.so      ; Zapata Telephony w/PRI

;load=Codecs
;load=codec_adpcm.so      ; Adaptive Differential PCM Coder/Decoder
load=codec_alaw.so      ; A-law Coder/Decoder
;load=codec_a_mu.so      ; A-law and Mulaw direct Coder/Decoder
;load=codec_g726.so      ; ITU G.726-32kbps G726 Transcoder
load=codec_gsm.so      ; GSM/PCM16 (signed linear) Codec Translat
;load=codec_ilbc.so      ; iLBC/PCM16 (signed linear) Codec Transla
;load=codec_lpc10.so      ; LPC10 2.4kbps (signed linear) Voice Code
load=codec_ulaw.so      ; Mu-law Coder/Decoder

;Formats
;load=format_au.so      ; Sun Microsystems AU format (signed linea
;load=format_g723.so      ; G.723.1 Simple Timestamp File Format
;load=format_g726.so      ; Raw G.726 (16/24/32/40kbps) data
;load=format_g729.so      ; Raw G729 data
load=format_gsm.so      ; Raw GSM data
;load=format_h263.so      ; Raw h263 data
;load=format_ilbc.so      ; Raw iLBC data
;load=format_jpeg.so      ; JPEG (Joint Picture Experts Group) Image
;load=format_pcm_alaw.so   ; Raw aLaw 8khz PCM Audio support
;load=format_pcm.so      ; Raw uLaw 8khz Audio support (PCM)
;load=format_sln.so      ; Raw Signed Linear Audio support (SLN)
;load=format_vox.so      ; Dialogic VOX (ADPCM) File Format
;load=format_wav_gsm.so      ; Microsoft WAV format (Proprietary GSM)
;load=format_wav.so      ; Microsoft WAV format (8000hz Signed Line

;Functions
;load=func_callerid.so      ; Caller ID related dialplan function
;load=func_enum.so      ; ENUM Related Functions
;load=func_uri.so      ; URI encode/decode functions

[global]
;chan_modem.so=yes


Does anyone see a modules that I might have missed and could need, or any that I have loaded that are not necessary?
Last edited by mcargile on Mon Aug 20, 2007 11:57 am, edited 1 time in total.
Michael Cargile | Director of Engineering | ViciDialGroup | http://www.vicidial.com

The official source for VICIDIAL services and support. 1-888-894-VICI (8424)
mcargile
Site Admin
 
Posts: 617
Joined: Tue Jan 16, 2007 9:38 am

Postby mflorell » Tue Feb 06, 2007 3:52 pm

Does everything work?

What kind of trunks do you use?

What kind of memory reduction do you get with this over default?

Every system is different, and some of the things you commented out are needed for functionality on some systems, like codecs for example and callerID modules.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby mcargile » Tue Feb 06, 2007 5:18 pm

As far as I can tell everything is working. The system is a test dialer that just runs the performance testing loop. This is why I asked if anyone saw something I missed.... It is using IAX to connect the "agents" and to the "phone company" which are actually the same box. As far as memory reduction see for yourself.

Before:
Code: Select all
vici1 ~ # cat /proc/meminfo
MemTotal:       515228 kB
MemFree:        389868 kB
Buffers:          5592 kB
Cached:          40456 kB
SwapCached:          0 kB
Active:          87720 kB
Inactive:        25820 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       515228 kB
LowFree:        389868 kB
SwapTotal:     2763172 kB
SwapFree:      2763172 kB
Dirty:             288 kB
Writeback:           0 kB
AnonPages:       67508 kB
Mapped:          13328 kB
Slab:             7288 kB
PageTables:        908 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
CommitLimit:   3020784 kB
Committed_AS:   291820 kB
VmallocTotal:   515796 kB
VmallocUsed:     84700 kB
VmallocChunk:   430400 kB

After:
Code: Select all
vici1 ~ # cat /proc/meminfo
MemTotal:       515228 kB
MemFree:        417560 kB
Buffers:          5252 kB
Cached:          35068 kB
SwapCached:          0 kB
Active:          65516 kB
Inactive:        21492 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       515228 kB
LowFree:        417560 kB
SwapTotal:     2763172 kB
SwapFree:      2763172 kB
Dirty:             132 kB
Writeback:           0 kB
AnonPages:       46704 kB
Mapped:          11476 kB
Slab:             6740 kB
PageTables:        696 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
CommitLimit:   3020784 kB
Committed_AS:   247280 kB
VmallocTotal:   515796 kB
VmallocUsed:     84700 kB
VmallocChunk:   430400 kB

These were both taken after a fresh reboot. There are currently no active campaigns either.

I realize that every system is different. Which is why I plan on going a bit more in depth in the process of doing this once I am sure I have all the core required moidules.
Michael Cargile | Director of Engineering | ViciDialGroup | http://www.vicidial.com

The official source for VICIDIAL services and support. 1-888-894-VICI (8424)
mcargile
Site Admin
 
Posts: 617
Joined: Tue Jan 16, 2007 9:38 am


Return to Support

Who is online

Users browsing this forum: Google [Bot] and 93 guests