VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
maillisting at gmail.com Guest
|
Posted: Tue Feb 12, 2008 8:58 pm Post subject: [asterisk-users] restart asterisk daily |
|
|
Hi all,
I found that there will be a memory leak if asterisk running day by
day without restart. Is it good to restart asterisk service daily?
What is the better way to restart it daily like apache?
ango |
|
Back to top |
|
|
matt at venturevoip.com Guest
|
Posted: Tue Feb 12, 2008 9:17 pm Post subject: [asterisk-users] restart asterisk daily |
|
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Rilawich Ango wrote:
Quote: | Hi all,
I found that there will be a memory leak if asterisk running day by
day without restart. Is it good to restart asterisk service daily?
What is the better way to restart it daily like apache?
|
What makes you think there is a memory leak?
- --
Kind Regards,
Matt Riddell
Director
_______________________________________________
http://www.venturevoip.com (Great new VoIP end to end solution)
http://www.venturevoip.com/news.php (Daily Asterisk News - html)
http://www.venturevoip.com/newrssfeed.php (Daily Asterisk News - rss)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHslNQDQNt8rg0Kp4RAh5TAJ4kchdwiQwLA17fvmHa+W2mBlpRgACghVR2
1UPovp9lK+YedT1OX75b1Mc=
=/VlE
-----END PGP SIGNATURE----- |
|
Back to top |
|
|
timebandit001 at gmail... Guest
|
Posted: Tue Feb 12, 2008 10:01 pm Post subject: [asterisk-users] restart asterisk daily |
|
|
Quote: | I found that there will be a memory leak if asterisk running day by
day without restart. Is it good to restart asterisk service daily?
What is the better way to restart it daily like apache?
| Probably depends on the version of Asterisk, but I don't restart daily |
|
Back to top |
|
|
abalashov at evaristes... Guest
|
Posted: Wed Feb 13, 2008 12:10 am Post subject: [asterisk-users] restart asterisk daily |
|
|
Matt Riddell wrote:
Quote: | -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Rilawich Ango wrote:
Quote: | Hi all,
I found that there will be a memory leak if asterisk running day by
day without restart. Is it good to restart asterisk service daily?
What is the better way to restart it daily like apache?
|
What makes you think there is a memory leak?
|
I don't know about a memory leak, but I've found too that Asterisk
benefits from a daily restart in all installations of any kind of
serious scale that I've managed. This tends to improve application
performance, mainly. Found this to be true of 1.2 and 1.4.
Of course, I could be completely wrong -- I have no real way of knowing
whether the solution corresponds genuinely underlying problem.
--
Alex Balashov
Evariste Systems
Web : http://www.evaristesys.com/
Tel : (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (706) 338-8599 |
|
Back to top |
|
|
atis at iq-labs.net Guest
|
Posted: Wed Feb 13, 2008 2:26 am Post subject: [asterisk-users] restart asterisk daily |
|
|
On 2/13/08, Rilawich Ango <maillisting at gmail.com> wrote:
Quote: | Hi all,
I found that there will be a memory leak if asterisk running day by
day without restart. Is it good to restart asterisk service daily?
What is the better way to restart it daily like apache?
ango
|
I have cron script that restarts daily by /etc/init.d/asterisk restart
- that way asterisk is completely stopped and then started again. Long
ago, for 1.2 this was helping to reduce crashes on working time.
Anyway - i prefer to restart if i have some inactivity time anyway,
rather than have a small chance that it will crash while lot's of
calls are going trough. So, if you have timeframe when you know for
sure that there won't be any calls, you can restart by initscript.
Otherwise, if you have low call volume in night-time, you may modify
safe_asterisk script to start asterisk anyway (even if it returns ok
exit stats that means shutdown), and then stop asterisk by "stop when
convenient")
Regards,
Atis
--
Atis Lezdins
VoIP Developer,
IQ Labs Inc.
atis at iq-labs.net
Skype: atis.lezdins
Cell Phone: +371 28806004
Work phone: +1 800 7502835 |
|
Back to top |
|
|
maillisting at gmail.com Guest
|
Posted: Wed Feb 13, 2008 2:48 am Post subject: [asterisk-users] restart asterisk daily |
|
|
Actually, I donno it is a memory leak or not. I have a server only
running asterisk. As time goes by, the free memory shown in the top
is decreased. After I restart the asterisk, the free memory comes
again. That's why I wonder if regular restart asterisk is necessary.
Use a crontab to restart asterisk is a way to do it but you have to
maintain a crontab. Is it possible to use logrotate instead? Or
other better way?
On Feb 13, 2008 3:26 PM, Atis Lezdins <atis at iq-labs.net> wrote:
Quote: |
On 2/13/08, Rilawich Ango <maillisting at gmail.com> wrote:
Quote: | Hi all,
I found that there will be a memory leak if asterisk running day by
day without restart. Is it good to restart asterisk service daily?
What is the better way to restart it daily like apache?
ango
|
I have cron script that restarts daily by /etc/init.d/asterisk restart
- that way asterisk is completely stopped and then started again. Long
ago, for 1.2 this was helping to reduce crashes on working time.
Anyway - i prefer to restart if i have some inactivity time anyway,
rather than have a small chance that it will crash while lot's of
calls are going trough. So, if you have timeframe when you know for
sure that there won't be any calls, you can restart by initscript.
Otherwise, if you have low call volume in night-time, you may modify
safe_asterisk script to start asterisk anyway (even if it returns ok
exit stats that means shutdown), and then stop asterisk by "stop when
convenient")
Regards,
Atis
--
Atis Lezdins
VoIP Developer,
IQ Labs Inc.
atis at iq-labs.net
Skype: atis.lezdins
Cell Phone: +371 28806004
Work phone: +1 800 7502835
_______________________________________________
-- 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
|
|
|
Back to top |
|
|
spamsucks2005 at gmail... Guest
|
Posted: Wed Feb 13, 2008 3:17 am Post subject: [asterisk-users] restart asterisk daily |
|
|
On Feb 13, 2008 8:48 AM, Rilawich Ango <maillisting at gmail.com> wrote:
Quote: | Actually, I donno it is a memory leak or not. I have a server only
running asterisk. As time goes by, the free memory shown in the top
is decreased. After I restart the asterisk, the free memory comes
|
I observed the same behavior. Someone told me that that's a normal
feature of linux, it manages memory that way. If that's true, than it
isn't normal to see the same (large) amount of free memory over time
on a box running asterisk only. However, I rarely restart and it
hasn't caused problems. Here's mine right now:
09:14:39 up 73 days, 18:47, 2 users, load average: 0.00, 0.00, 0.00
67 processes: 65 sleeping, 2 running, 0 zombie, 0 stopped
CPU states: 0.1% user 3.9% system 0.0% nice 0.0% iowait 95.8% idle
Mem: 515460k av, 509416k used, 6044k free, 0k shrd, 80052k buff
152896k active, 191472k inactive
Swap: 477248k av, 0k used, 477248k free 242404k cached
'course, these days, half a meg isn't much |
|
Back to top |
|
|
tzafrir.cohen at xorco... Guest
|
Posted: Wed Feb 13, 2008 3:29 am Post subject: [asterisk-users] restart asterisk daily |
|
|
On Wed, Feb 13, 2008 at 03:48:14PM +0800, Rilawich Ango wrote:
Quote: | Actually, I donno it is a memory leak or not. I have a server only
running asterisk. As time goes by, the free memory shown in the top
is decreased. After I restart the asterisk, the free memory comes
again. That's why I wonder if regular restart asterisk is necessary.
Use a crontab to restart asterisk is a way to do it but you have to
maintain a crontab. Is it possible to use logrotate instead? Or
other better way?
|
tzafrir at frenkel:~$ free -m
total used free shared buffers cached
Mem: 485 477 7 0 0 100
-/+ buffers/cache: 376 108
Swap: 1419 270 1149
tzafrir at frenkel:~$ top -b | head -n 5
top - 10:18:32 up 19 days, 14:38, 24 users, load average: 0.08, 0.33, 0.21
Tasks: 166 total, 1 running, 163 sleeping, 2 stopped, 0 zombie
Cpu(s): 1.1%us, 0.1%sy, 0.0%ni, 98.2%id, 0.5%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 496648k total, 489044k used, 7604k free, 32k buffers
Swap: 1453840k total, 276740k used, 1177100k free, 103380k cached
tzafrir at frenkel:~$ ps aux | grep asterisk
asterisk 9559 0.0 2.5 474896 12892 ? Ssl Feb12 0:00 /usr/sbin/asterisk -p -U asterisk
Gee, I only have 7 MB free! I must reboot to free some memory! And that
Asterisk is using so much memory!
In fact:
1. The system has some 100MB of free memory. almost all of it is used
for caching and such.
2. Asterisk overcommits memory: it generally asks the kernel huge
ammounts of memory, but doesn't really try to use them. At least with
Linux such overcommits are not claimed at all.
--
Tzafrir Cohen
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir |
|
Back to top |
|
|
spamsucks2005 at gmail... Guest
|
Posted: Wed Feb 13, 2008 8:31 am Post subject: [asterisk-users] restart asterisk daily |
|
|
On Feb 13, 2008 9:29 AM, Tzafrir Cohen <tzafrir.cohen at xorcom.com> wrote:
Quote: | Gee, I only have 7 MB free! I must reboot to free some memory! And that
Asterisk is using so much memory!
|
Do I detect a tiny bit of sarcasm here? Someone from Digium (or
elsewhere) might be able to jump in and explain the asterisk memory
strategy and why it doesn't have any detrimental effects on anything
else running on the same system. |
|
Back to top |
|
|
tzafrir.cohen at xorco... Guest
|
Posted: Wed Feb 13, 2008 8:45 am Post subject: [asterisk-users] restart asterisk daily |
|
|
On Wed, Feb 13, 2008 at 02:31:11PM +0100, randulo wrote:
Quote: | On Feb 13, 2008 9:29 AM, Tzafrir Cohen <tzafrir.cohen at xorcom.com> wrote:
Quote: | Gee, I only have 7 MB free! I must reboot to free some memory! And that
Asterisk is using so much memory!
|
Do I detect a tiny bit of sarcasm here? Someone from Digium (or
elsewhere) might be able to jump in and explain the asterisk memory
strategy and why it doesn't have any detrimental effects on anything
else running on the same system.
|
Sarcastic indeed. Indeed all those assertions were false.
Off-Topic:
The big memory consumer I have on my system is $GECKO_BROWSER. I
currently have iceape (seamonkey), after just one day of operation:
tzafrir 8186 1.1 53.1 763016 264008 ? Ssl Feb12 19:23 /usr/lib/iceape/iceape-bin
Iceweasel (firefox), epiphany and kazehakase don't seem to be much
different.
So I have no issues with the little copy of Asterisk on my desktop
system...
--
Tzafrir Cohen
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir |
|
Back to top |
|
|
Patrick.Haan at ams-en... Guest
|
Posted: Wed Feb 13, 2008 9:02 am Post subject: [asterisk-users] restart asterisk daily |
|
|
which distribution do you use?
Maybe a Fedora 7????
greez
patrick
-----Urspr?ngliche Nachricht-----
Von: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] Im Auftrag von Tzafrir Cohen
Gesendet: Mittwoch, 13. Februar 2008 14:46
An: asterisk-users at lists.digium.com
Betreff: Re: [asterisk-users] restart asterisk daily [senderbase]
On Wed, Feb 13, 2008 at 02:31:11PM +0100, randulo wrote:
Quote: | On Feb 13, 2008 9:29 AM, Tzafrir Cohen <tzafrir.cohen at xorcom.com>
wrote:
Quote: | Gee, I only have 7 MB free! I must reboot to free some memory! And
that Asterisk is using so much memory!
|
Do I detect a tiny bit of sarcasm here? Someone from Digium (or
elsewhere) might be able to jump in and explain the asterisk memory
strategy and why it doesn't have any detrimental effects on anything
else running on the same system.
|
Sarcastic indeed. Indeed all those assertions were false.
Off-Topic:
The big memory consumer I have on my system is $GECKO_BROWSER. I currently have iceape (seamonkey), after just one day of operation:
tzafrir 8186 1.1 53.1 763016 264008 ? Ssl Feb12 19:23 /usr/lib/iceape/iceape-bin
Iceweasel (firefox), epiphany and kazehakase don't seem to be much different.
So I have no issues with the little copy of Asterisk on my desktop system...
--
Tzafrir Cohen
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at 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 |
|
Back to top |
|
|
tzafrir.cohen at xorco... Guest
|
Posted: Wed Feb 13, 2008 9:21 am Post subject: [asterisk-users] restart asterisk daily |
|
|
On Wed, Feb 13, 2008 at 03:02:23PM +0100, Haan Patrick wrote:
Quote: | which distribution do you use?
Maybe a Fedora 7????
|
Debian Testing here.
--
Tzafrir Cohen
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir |
|
Back to top |
|
|
atis at iq-labs.net Guest
|
Posted: Wed Feb 13, 2008 9:51 am Post subject: [asterisk-users] restart asterisk daily |
|
|
On 2/13/08, Tzafrir Cohen <tzafrir.cohen at xorcom.com> wrote:
Quote: | On Wed, Feb 13, 2008 at 03:48:14PM +0800, Rilawich Ango wrote:
Quote: | Actually, I donno it is a memory leak or not. I have a server only
running asterisk. As time goes by, the free memory shown in the top
is decreased. After I restart the asterisk, the free memory comes
again. That's why I wonder if regular restart asterisk is necessary.
Use a crontab to restart asterisk is a way to do it but you have to
maintain a crontab. Is it possible to use logrotate instead? Or
other better way?
|
tzafrir at frenkel:~$ free -m
total used free shared buffers cached
Mem: 485 477 7 0 0 100
-/+ buffers/cache: 376 108
Swap: 1419 270 1149
tzafrir at frenkel:~$ top -b | head -n 5
top - 10:18:32 up 19 days, 14:38, 24 users, load average: 0.08, 0.33, 0.21
Tasks: 166 total, 1 running, 163 sleeping, 2 stopped, 0 zombie
Cpu(s): 1.1%us, 0.1%sy, 0.0%ni, 98.2%id, 0.5%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 496648k total, 489044k used, 7604k free, 32k buffers
Swap: 1453840k total, 276740k used, 1177100k free, 103380k cached
tzafrir at frenkel:~$ ps aux | grep asterisk
asterisk 9559 0.0 2.5 474896 12892 ? Ssl Feb12 0:00 /usr/sbin/asterisk -p -U asterisk
Gee, I only have 7 MB free! I must reboot to free some memory! And that
Asterisk is using so much memory!
|
Guys, don't start panic here. This is perfectly normal memory status
for Linux. Linux automatically uses most free memory for disk cache,
leaving only few megabytes, and frees disk cache as soon as any
application requests. This has nothing to do with Asterisk.
Regards,
Atis
Quote: |
In fact:
1. The system has some 100MB of free memory. almost all of it is used
for caching and such.
2. Asterisk overcommits memory: it generally asks the kernel huge
ammounts of memory, but doesn't really try to use them. At least with
Linux such overcommits are not claimed at all.
--
Tzafrir Cohen
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at 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
| --
Atis Lezdins
VoIP Developer,
IQ Labs Inc.
atis at iq-labs.net
Skype: atis.lezdins
Cell Phone: +371 28806004
Work phone: +1 800 7502835 |
|
Back to top |
|
|
asteriskbr99 at gmail.com Guest
|
Posted: Wed Feb 13, 2008 10:18 am Post subject: [asterisk-users] restart asterisk daily |
|
|
So that?s why I?ve always get a red bar on home screen of the Trixbox?
Phisical memory is always at top most use, near 100% (green bar turns red on
high level of memory use), and below it there is Kernel / Application,
Buffers, Cached memory uses.
tks,
On Feb 13, 2008 12:51 PM, Atis Lezdins <atis at iq-labs.net> wrote:
Quote: | On 2/13/08, Tzafrir Cohen <tzafrir.cohen at xorcom.com> wrote:
Quote: | On Wed, Feb 13, 2008 at 03:48:14PM +0800, Rilawich Ango wrote:
Quote: | Actually, I donno it is a memory leak or not. I have a server only
running asterisk. As time goes by, the free memory shown in the top
is decreased. After I restart the asterisk, the free memory comes
again. That's why I wonder if regular restart asterisk is necessary.
Use a crontab to restart asterisk is a way to do it but you have to
maintain a crontab. Is it possible to use logrotate instead? Or
other better way?
|
tzafrir at frenkel:~$ free -m
total used free shared buffers
| cached
Quote: | Mem: 485 477 7 0 0
| 100
Quote: | -/+ buffers/cache: 376 108
Swap: 1419 270 1149
tzafrir at frenkel:~$ top -b | head -n 5
top - 10:18:32 up 19 days, 14:38, 24 users, load average: 0.08, 0.33,
| 0.21
Quote: | Tasks: 166 total, 1 running, 163 sleeping, 2 stopped, 0 zombie
Cpu(s): 1.1%us, 0.1%sy, 0.0%ni, 98.2%id, 0.5%wa, 0.0%hi, 0.0%si,
| 0.0%st
Quote: | Mem: 496648k total, 489044k used, 7604k free, 32k buffers
Swap: 1453840k total, 276740k used, 1177100k free, 103380k cached
tzafrir at frenkel:~$ ps aux | grep asterisk
asterisk 9559 0.0 2.5 474896 12892 ? Ssl Feb12 0:00
| /usr/sbin/asterisk -p -U asterisk
Quote: |
Gee, I only have 7 MB free! I must reboot to free some memory! And that
Asterisk is using so much memory!
|
Guys, don't start panic here. This is perfectly normal memory status
for Linux. Linux automatically uses most free memory for disk cache,
leaving only few megabytes, and frees disk cache as soon as any
application requests. This has nothing to do with Asterisk.
Regards,
Atis
Quote: |
In fact:
1. The system has some 100MB of free memory. almost all of it is used
for caching and such.
2. Asterisk overcommits memory: it generally asks the kernel huge
ammounts of memory, but doesn't really try to use them. At least with
Linux such overcommits are not claimed at all.
--
Tzafrir Cohen
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at 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
|
--
Atis Lezdins
VoIP Developer,
IQ Labs Inc.
atis at iq-labs.net
Skype: atis.lezdins
Cell Phone: +371 28806004
Work phone: +1 800 7502835
_______________________________________________
-- 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
| -------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080213/3415af72/attachment.htm |
|
Back to top |
|
|
dbailey at digium.com Guest
|
Posted: Thu Feb 14, 2008 6:23 pm Post subject: [asterisk-users] restart asterisk daily |
|
|
If you want to flush your disk cache to see how much memory is being eaten cache pages, try this:
echo 3 >/proc/sys/vm/drop_caches
----- "ast erisk" <asteriskbr99 at gmail.com> wrote:
|
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|