appliance

Memory usage climbs until the computer crashes

Lasersoft
Posts: 6
Member Since:
2006-07-30

I am running asterisk 1.2.22 through a trixbox install. When I open the admin screen it shows me a 28% memory usage. This is on an HP Pentium D 3.0 server with 512MB RAM. This memory usage slowly climbs through about a week until it redlines at 90% in about 6 days. If I don't reset the machine before it reaches 100% it crashes.

What is running that shouldn't be?

Thanks



TDF
Posts: 197
Member Since:
2006-12-19
Are you sure this is the

Are you sure this is the cause of it ?

I'm a Linux noob, but my undestanding of it was that Linux unlike windows makes use of all available memory, mine is curently sat at 99% with no calls going on, it never crashes.



Yondaime
Posts: 24
Member Since:
2007-05-31
Linux using up 100% of

Linux using up 100% of physical memory is normal. Crashing when it reaches that figure isn't. What's your hardware environment and setup?

--

Erol M. Fornoles



Lasersoft
Posts: 6
Member Since:
2006-07-30
Linux 100% memory

Thanks for your answers. The hardware is an HP ML110 Server. Pentium D 3.0 with 512MB of Ram and 380GB of HD.

What causes the memory usage to climb. When the computer is reset the memory usage is at 28%. With no calls and no access going on the memory usage continues to go up. After resetting last night, this morning the usage has gone from 28% to 58%. Why would the Admin page of Trixbox redline the memory usage at 90% if this factor wasn't important?

This time I will let it run until crashing and see how long it takes.

Thanks

James



GSnover
Posts: 1338
Member Since:
2006-11-19
Had a similar thing happening on a Dell SC440

Wouldn't crash the box - it would just stop answering incoming calls - did a yum update -y on it a couple of days ago, and the problem hasn't come back - perhaps a whack package got into the mix. Have you updated it?

Greg

P.S. - What telephony card are you using - this box has a 8-Port Rhino W/HWEC



Lasersoft
Posts: 6
Member Since:
2006-07-30
This box is pure IP. No

This box is pure IP. No cards and nothing else running on the box. I only use it for outbound IP calls and for calling extensions. I have various extensions in different parts of the US and Brasil. All incoming calls are IP. There are very few of these.

James



ja133
Posts: 1860
Member Since:
2006-11-26
my box has the memory up to

my box has the memory up to 100% now for the past few weeks
is this bad? should i restart it? i am concerned that this will shorten the life of the RAM in my system. do i need to worry?
i dont want to keep on restarting my computer when it reaches in the 90s

--


New & Improved Site: trixbox Maintenance Guides



TDF
Posts: 197
Member Since:
2006-12-19
Its just what Linux does,

Its just what Linux does, heres a brief explanation I got from 5 seconds on Google.

Your computer is using all of your memory to optimize the performance of Linux. It caches or stores pieces of applications on your memory so that when you need them, it will not have to hunt around the hard drive to find the application. Now IF you bring up a program, and your memory is "full" Linux automatically kicks some of the cache out to make room.



ja133
Posts: 1860
Member Since:
2006-11-26
makes A LOT of sense to

makes A LOT of sense to me
thanks

--


New & Improved Site: trixbox Maintenance Guides



colin911
Posts: 37
Member Since:
2007-06-26
Same thing

I have the same thing with Trixbox 2.2.3 and a computer with similar specs. The "physical memory" bar on the status page starts off at what seems like a reasonabel range (30%) and ends up redlining at 90%, then stops answering or making calls. What is causing this usage to grow?



mustardman
Posts: 1158
Member Since:
2006-06-18
In keeping with the hundreds

In keeping with the hundreds of other threads on this subject, Available Memory = Free Memory + Cached Memory.

Linux caches most recent accesses to memory, as unique data is accessed/saved it is cached therefore free memory will gradually reduce till it ALL becomes cached memory. The idea being the most recent accessed data is the most frequently used so it reduces hard drive activity and speeds up the system.

This is a common technique. M$ Exchange Server does something similar.

If it is cached memory that is using all your free memory your computer won't crash because of it. If it is something else using available memory that is a different story.



Texas1
Posts: 49
Member Since:
2006-06-11
I think there may be a

I think there may be a memory leak. I wasn't aware of a problem until people called my cell to tell me my landline stopped answering. When i checked, the memory usage was 100%. After a reboot all was normal again.

Is there a memory leak with the 2.2 version? I ran Tom King's updates - I don't know if that was a factor.



mustardman
Posts: 1158
Member Since:
2006-06-18
What does "top" say. if all

What does "top" say. if all the available memory is used up by cached memory then it is NOT a memory leak.



techieg
Posts: 276
Member Since:
2006-06-13
Unstable System

All computer systems use RAM for storing temporary volatile frequently accessed data for access and re-access so as to optimize access rate via the RAM since the HDD is the slowest part of any computer system. As the RAM is used up, the system calls for the Virtual Memory aka Pagefile (1.5 times the size of the installed RAM), resident on the HDD. And when such activities die down things return to normal i.e. RAM usage reduces and stays put until when in use again. In the case of Linux using up RAM without the system being in use, that is not a normal system behavior. So that is an abnormal system behavior...if such happens in Windows or Apple, then there is some sort of Malicious Software on such a system or the system is in use somehow perhaps via remote access, etc.

I am experiencing the same thing with TB CE 2.3.0.2 (didn't happen with 2.3.0.1 until after I applied some updates that not only caused this behavior but also knocked out bidirectional audio on all remote extensions)...it starts off at about 20% and now with no single call on it, it is at 85% RAM usage, and we are talking 1GB RAM capacity here. Last couple of weeks it got to 99% and I had to reboot it. This is very abnormal and does not make me confident to deploy such a system to clients...this is a huge problem. A lot of technology manufacturers (Cisco, 3Com, Linksys, etc) use Linux for appliances but none of them ever behaves like this. My Laptop running XP Pro has 2GB RAM, I opened Task Manager and clicked on the Performance tab and see that the RAM has been used up 2.01GB (due to millions of things running on my screen not to talk of about 50 websites going in IE and Firefox tabs, and other, SQL Server, etc) without any performance issues, so for the purpose of observation I started to close out some of the tons of applications I am running and I see the RAM usage decrease. That is how a normal, well coded system would behave...when in us it is fine to see RAM usage "gradually" climb but when not in use there is absolutely no reason it should use up RAM. Such a system is unstable. It is like saying you are not making any calls but the amount of SIP channels and Zap Lines used continue to climb...weird, even worse, your phone company/ITSP charges you for the unmade calls. Anyway, this issue definitely needs to be fixed on TB distros...Let's put it in the bug tracker guys....no room for stories or any explanation to clients at all. It either works or not and in this situation, it does not work.



mustardman
Posts: 1158
Member Since:
2006-06-18
I don't know what else to say

techieg,

I suggest you read the following links and re-evaluate your current view of what constitutes "abnormal behaviour"

RH memory caching
http://kbase.redhat.com/faq/FAQ_35_705.shtm

So to summarize, at a command prompt type:

free -m

The second number under the "free" column on the "-/+ buffers/cache:" row is the physical memory available for use.

Microsoft has apparently realized the benefits of doing this as they have added something similar to Vista.
http://www.microsoft.com/windows/products/windowsvista/features/d...



techieg
Posts: 276
Member Since:
2006-06-13
Nope

The RH post is simply reiterating my point "The cache is reclaimed, not at the time of process exit (you might start up another process soon that needs the same data), but upon demand - i.e. When you start a process that needs a lot of memory to run, the Linux kernel will reclaim memory that had been storing cached data and give it to the new process". And the weird RH philosophy about hogging all the memory if possible.

When you exit a program, memory usage is supposed to drop unless upon that exit you open another program that may use the same amount of memory you just freed up. In TB where there are no new processes or calls initiated but the system keeps eating all memory until sometimes crashing does not make sense at all. Tell me if my system is telling me 85% memory usage when not a single call is going on, what would it then climb to when I have say 10 concurrent calls?...I think that it will crash even before it gets to 10 concurrent calls. The architecture should preserve as much memory as possible until required for calls and other critical processes.



smokiebeverage
Posts: 112
Member Since:
2007-06-02
Possible Fix

We had the same problem on a TB install with 512MB we were testing, during the testing we noticed that if we did any heavy work on the TB the memory would climb and would keep doing it until the machine just stalled. Now we popped in an extra 512MB of Ram and the problem went away. Its strange, I've no explanation, but Ram is cheap and its worth the test I suppose as you can just borrow ram to test it out



TDF
Posts: 197
Member Since:
2006-12-19
techieg read it again. You

techieg read it again.

You say 'When you exit a program, memory usage is supposed to drop unless upon that exit you open another program that may use the same amount of memory you just freed up.'

Redhat say it will be retained incase it is needed again, it will only be dropped to make way for new data. So while the actual data may be dropped only to be replaced, no where does it say it will be dropped and your memory usage will go down.



techieg
Posts: 276
Member Since:
2006-06-13
Not a Working Technique

TDF, my argument is not whether RH said that or not. It is perhaps simply that it is a wrong memory-hogging technique. Obviously this philosophy/technique is causing problems if users keep complaining about systems hogging up memory without use and crashing, stalling, etc. They need to find another way. This is the sort of thing people complain about when a bad memory-hogging application is installed on Windows or Apple, they are immediately uninstalled and gotten rid of due to the problems memory-hogging causes. The Windows posting you referred to behaves nowhere close to what is happening here because they are smart enough to know what memory-hogging is. There is no need for the system to continuously purposely hog memory, if it is not in use by any application then it should immediately let it go so as for the memory usage to drop until it is needed by another application. It is also very obvious that what is currently going on is even going far beyond their philosophy/technique; if the system is not in use as I and others have experienced, no calls are being processed, can you tell me what applications continue to use up the memory until it crashes, even at 512MB, 1GB, etc (Please explain)? I know Windows and Apple don't behave this way because you can see it in Task Manager, if memory is not needed it is freed up, usage drops and performance is better...simple. I have never heard of an OS developer planning a technique to purposely hog memory. Memory-hogging crashes systems be it Windows, Apple, Linux, etc easy as ABC and/or 123. It is 4:15am as I type this response not a single call is being made or has being processed at all in the past 10 hours but memory usage has been at 85% of 1GB (last week it was RED at 99% with no calls at all), please tell me which or why applications will be making use or hogging the memory for absolutely no reason (please explain).



rvergara
Posts: 61
Member Since:
2006-08-29
I don't know how many times

I don't know how many times I have personally responded this same query.

Linux has a sophisticated algorithm for memory usage. The objective is that the most used pieces of code are resident in main memory. Having free memory to be occupied for code to be run is a lot more inefficient that having the code already there. This explains why the more you use an application in Linux the faster it runs, also explains why the memory is fully used.

This is NORMAL behavior for Linux.

Having said so, what is not normal is that while having 90% main memory used you also have fully used your disk swap space. In a dedicated server such as a TB box very seldom you would occupy more than 30-40% of your swap space. Having 90% swap space used is a sign of some sort of problem.

Hope this helps

Regards



techieg
Posts: 276
Member Since:
2006-06-13
Bad Behavior.

How many times must I as well say this is a very bad algorithm. Obviously this "sophisticated algorithm" is not "sophisticated after all. My test box has Pentium D dual core 3.0 GHZ, 1GB RAM, and SATA 250 GB HDD @ 72000RPM, one would think this is a good setup for a good amount of concurrent calls. But at 0 calls RAM is Already at 85% and at just 2 calls the RAM usage is RED at 91% due to a "sophisticated algorithm". Even after calls were over for ages the RAM usage remains RED at 91% and may even climb. This "NORMAL" linux behavior is a bad behavior causing lots of problems. I am assuming you may not understand my point simply because you may not have used any other OSes outside Linux, because if you have then you will know the benefit of freeing up unused RAM. Well, the Linux developer guys need to handle this, there should be a way to turn off that bad behavior...some sort of config, script, command, etc.



TDF
Posts: 197
Member Since:
2006-12-19
Your saying its bad

Your saying its bad behaviour because windows and macs do it differant, I think you'll find its the other way around, Linux does it right the others do it badly.

Your failing to see the way it works and the reason for it, read up on it and it will make sense.



rvergara
Posts: 61
Member Since:
2006-08-29
If you do not want to listen

If you do not want to listen do not listen.

Ok, lets do the same thing from my end.

I have a Pentium II with 500mhz, 30gb, ram memory at 91%, swap at 1%, handles 5+ concurrent calls including cross coding calls without a problem. 42 days the server is up.

Your problem is not Linux, it is something else, but you do not want to listen just to bash somebody else that tried to help. Believe me, I will not do that mistake again, just go ahead and surf by yourself.

BTW I am a windows end user.

Over for good.

Regards

Ramiro



techieg
Posts: 276
Member Since:
2006-06-13
Changes Needed

Whatever this problem is needs to be resolved. I did not think it was a Linux problem earlier because as I said it did not happen in any of my previous TB installs including 2.3.0.1 until I installed some updates on 2.3.0.1. So I thought it had to do with the updates until I got a lecture from TDF that such memory hogging behavior is normal with Linux. So my point is that because it is normal Linux behavior does not make it a good one and be it normal behavior or not, it is hurting system performance and perhaps RH, CentOS, or TB developers, etc can make a change in that area so that we don't keep getting system crashes due to evaporated RAM. Even as I write there is not a single call going on my TB but RAM usage is RED at 98% of 1GB, so what use is it if one cannot use a TB installation because Linux decides to use up the RAM? I am also quite sure that no matter what RAM size is installed it will still eat it all up.



smokiebeverage
Posts: 112
Member Since:
2007-06-02
Have you looked at Top

try firing up 'top' and pressing + m to sort by memory, is one process hogging the ram?



Joe
Posts: 78
Member Since:
2006-05-31
Memory usage climbs

I have this problem as well on only one out of 5 trixboxes. 'top' shows that almost all memory is used, but doesn't list anything that is using it all. Maybe this is a driver issue. I'm using Sangoma analog and digital cards on all of my machines. What about the rest of you having this problem? Are any of you using Sangoma cards? This driver is sensitive to the kernel or zaptel software changing because its a kernel driver and it needs a special patched version of the zaptel software.

Other than that possibility, the things that are unique about my one errant machine are:

It's the only one with only 512 MB memory

It's the only one running a non SMP kernel

It has the oldest processor (2.4 GHz Pentium 4)

It's the only one running the cgi management interface for 'nut' (Network UPS Tools)

It's the only one I've customized FOP to show multiple locations and day/night status

Anyone spot any correlations here with their errant machines?



techieg
Posts: 276
Member Since:
2006-06-13
Nothing Special On My System

Nope senor, my test box runs pure SIP for now on 2.3.0.2 with 1GB RAM and pentium D dual core @ 3GHZ. So no cards or anything you mentioned on it yet which will lead me to say it is not a card driver issue.



cvander
Posts: 270
Member Since:
2006-06-26
Must be an incompatibility...

TechieG,

I understand your frustration with your problem, but I can assure you that while "memory hogging" is normal behavior for Linux, it is not your culprit. My box right now is at 99% physical memory (512 Meg) and 1% swap space. This is with no calls. The system has been as such for the last 43 days, and I only rebooted the box then because I was monkeying around with my network services and firewall. The system has 23 extentions and 4 trunks (2 ZAP and 2 SIP). Performance has been flawless.

I know that yum has caused issues with TB before (just look at 2.2.4, it fails to compile Zaptel properly on install!!). If you can, I'd restore your system to a pre-yum updated state and stay the heck away from it on your production system.

I know this doesn't necessarily fix your problem, but perhaps shed a little light on the issue here instead of it becoming a flame-war.

Good luck,
-Chris



mailboxetc
Posts: 1
Member Since:
2007-08-28
Memory Bugs

memory, bugs are in
-'amportal',
-'admin/views/panel.php' and
-'admin/modules/framework/htdocs/admin/views/panel.php'

Pls contact me at frank@mailboxetc.ca, if you require fixing.



techieg
Posts: 276
Member Since:
2006-06-13
A Fix??

mailboxetc, are you ssying there is a way to fix this? If so, how can that be done?



wanycn
Posts: 12
Member Since:
2006-11-22
one possible reason

I usually has no this knid of problem. But I have a TB got the problem. I have a PC with same MB and 1GB memory. I do a fresh install TB 2.2.4 on a new hard disk and copy the config from the running old TB manually. Then put the new hard disk to the running TB to upgrade the system. After that, it works fine except the Memory reach 90%. after reboot, it 's good, then climb up to 90%.
The only different between 2 PCs is the running PC only have 512MB memory. I guess maybe I install TB on a 1GB PC and move to 512MB PC, system setting is for 1GB and cause the problem. If some one can find what setting is related with memory size, and we should solve the problem.



mustardman
Posts: 1158
Member Since:
2006-06-18
Great idea!

In the mean time you and techieg should contact Redhat and file a bug report. You'll probably win a prize for pointing out such a findamental flaw.



drmessano
Posts: 203
Member Since:
2006-10-10
No, mustardman, if someone

No, mustardman, if someone is going to be proactive on this, they need to go ahead and write a patch, and send it to Linus directly.

I'd recommend using a -ZOMGRAM switch to disable this awful behavior. It may be easier to use -WINMEM if you plan to reproduce the windows memory behavior.

I would also include a OHNOES SNMP alert when the RAM hits 70%



GRECOTRIXBOX
Posts: 1
Member Since:
2007-07-06
NORMAL?

How about a system w/ 4Gb of memory
86% and increasing used by the cache -
swap at 0% , recording all calls 30 users and 15 cocurrent calls ( VoIP).



mustardman
Posts: 1158
Member Since:
2006-06-18
I would call Linus Torvalis

I don't know how many times it needs to be said or how many different ways to say cache memory=free memory

I have a production system with 100% of 1Gig physical memory used. About 20% is used by Kernel+buffers+applications. The other 80% is used by cache. Running for about a year now 24/7. Last time it rebooted because of an extended power failure several months ago it went back to 20%physical memory used and 0% cache and then gradually went back to the way it is now.......because it's designed to work that way.

I notice on another system that we don't touch with debug mode disabled on the log files it doesn't fill up the cache so I guess you need to be making changes to the dialplan etc. over time for the cache to fill up.



techieg
Posts: 276
Member Since:
2006-06-13
-WINMEM

@drmessano,

Are you saying -WINMEM is a workable solution? If so, how is it used or applied?



mustardman
Posts: 1158
Member Since:
2006-06-18
You should consult the RHEL

You should consult the RHEL documentation on how to use that feature.



Lasersoft
Posts: 6
Member Since:
2006-07-30
trixbox memory usage

Techieg,

I originally asked this question and after watching this thread maybe I can explain some of what is going on.

The original problem was on a machine that had a memory problem. When Linux (trixbox) occupied all of the memory for cache the computer crashed. I repeat, the box had a bad memory card.

I do not work with Linux. I only use this because of trixbox. I work with Windows XP, Vista and Server all the time. Yes Windows machines like to have lots of UNUSED memory to work. Linux also likes to have a lot of FREE memory. The difference is that Linux will occupy this FREE memory with CACHE data. If you delete a file off the hard drive the file doesn't really go away even if the drive says that is has more space. Linux does this with memory. If you unload a program, how is the OS going to know that you are going to load another program that will use the same data in the future. It has no way of knowing this, so it just keeps all the data in FREE memory as CACHE data. This is normal. If you look at the Trixbox Admin login page it will tell you that all of the memory is occupied. True. But if you need to load a different program it will sacrifice CACHE memory for Kernal/Application memory. Fine. As the other gentleman says if the Disk Swap is high you have a problem. Now, if you open the new FreePBX page it only tells you how much memory is USED. It doesn't say a thing about swap. If it makes you feel better used this value to go by.

As to why the memory usage climbs when the box isn't receiving or making calls, the OS, Asterisk and all of the other programs are FAR from being stopped patiently waiting for you to make a call. It is registering extension and trunks, creating logs, recording everything that you do. Take a look at TOP from the command like. I had never heard of this. The output reminds me of the process manager in windows. My system has nothing less that 70 processes in memory and I haven't made a call in 2 days. All of these programs are using CACHE memory to run faster. When you need to make a call this memory is freed immediately for your use.

As for the system that crashed after 95% memory full, I took it down (it was a Sempron 2600) and rebuilt Trixbox on an HP Proliant ML110 Pentium D 3.0GHz with 512MB of memory. I had the box up for 2 months with no more problems. Had to reboot recently to upgrade everything possible having to do with Trixbox and Asterisk. Thanks guys for the great job and the slick new interface.



mustardman
Posts: 1158
Member Since:
2006-06-18
M$ added something similar

M$ added something similar to Vista. They are calling it SuperFetch. So now that M$ is doing it maybe people will have an easier time accepting it.



techieg
Posts: 276
Member Since:
2006-06-13
Memory Hog Crashed TB!

I logged into my TB today and saw that my memory usage is down to 68% from 99%. I then checked the uptime, it says 2 days 10 hours. I have not restarted this box in over a month, so this means it must have crashed and rebooted about 2 days ago due to memory hogging issues as a lot of others have experienced. And during that time there were no calls going on at all...yes, I mean zero calls. SO it restarted and climbing back up again. This is definitely not something I am confident to deploy for clients. God forbid it terminates important business calls in that process. This issue is something the TB team should look to resolve and not wait for RHEL developers since they think it is a working cache solution they invented.



mustardman
Posts: 1158
Member Since:
2006-06-18
techieg,Linus Torvalis

techieg,

That is because you aren't using the -IDNTGTIT switch. Google for it.



jeb
Posts: 175
Member Since:
2006-08-22
chill. Be chill.

chill. Be Chill.

I think we've heard it enough times how Linux handles memory. It was very informative the first few times.

But keep in mind the original poster had a problem where his system _crashed_. In his particular case when his memory happened to be close to being "used up". Repeating the same old same old will not help solve his problem.

A good number of digium fixes are related to memory leaks. I'm not saying this to bash digium, but just to make some people aware that there are indeed memory related problems. Maybe not on your system. Or your particular combination of setup, hardware, colour of penguin, etc.

I'm all for educating people (with or without clue bat) if they seem to be off track. But none of this seems to be helping our poor chap with his _crashing_ system. If you have to reboot to keep the system up and running something is wrong. And it's not just misunderstanding how memory works under Linux.

-- J



rvergara
Posts: 61
Member Since:
2006-08-29
I wanted to help but got

I wanted to help but got some bashing from the author.

Risking more bashing, I was trying to understand if the swap space was also fully occupied. If swap space is not, issue possibly points to a hardware problem (memory banks?). If swap space is also fully occupied he needs to get into top (at the cli) and check what processes are using memory the most so developers have a good clue of what the potential culprits of the memory leak are.

Please do not bash me for trying to help.....

Regards

Ramiro



mustardman
Posts: 1158
Member Since:
2006-06-18
I just assumed the op

I just assumed the op assumed the completely normal behaviour of memory being used up by cache memory over time was a problem. It may not be crashing or crashing for some other reason.

techieg just refuses to accept the normal behaviour of cache memory filling up and insists it's a Linux bug. I have resorted to referring him to Linus Torvalis or just sending him off on wild goose chases searching for non-existant kernel configurations.



ja133
Posts: 1860
Member Since:
2006-11-26
basically some people are

basically some people are having issues with the memory running at 100% and some dont. some of my clients do, and some dont, and not eeveryone has the same server model.

i think its a hardware issue that it cant handle all this cached ram. so yes, this might be a memory leak in linux. but what i just said needs to be understood by those who are saying that it has nothing to do with the memory

--


New & Improved Site: trixbox Maintenance Guides



mustardman
Posts: 1158
Member Since:
2006-06-18
So I guess your not getting

So I guess your not getting it either then. If you run "top" and most of that 100% usage is in cache memory then you don't have a problem.

If your still not getting it then google for the -IDNTGTIT switch.



ja133
Posts: 1860
Member Since:
2006-11-26
-IDNTGTIT switch i find

-IDNTGTIT switch

i find nothing that has to do with a computer

i see this though: Did you mean: -IDONTGETIT switch

--


New & Improved Site: trixbox Maintenance Guides



mustardman
Posts: 1158
Member Since:
2006-06-18
Keep searching. It can be

Keep searching. It can be hard to find.



Lasersoft
Posts: 6
Member Since:
2006-07-30
Trying to help

Thanks for all the help. Rvegara, you didn't get bashed by the author for trying to help. You got bashed by somebody else.

Windows users like to have a "comfort zone" of a bunch of empty memory. Linux users like to have that memory filled up with lots of potentially useful information.

I have since put together other asterisk servers and all of them run from 80 to 96% memory usage. Not a problem. In the original posting the machine was crashing, but it had a bad memory element installed. Changed it out and now it doesn't crash anymore.

Thanks again.

have fun trying to find that kernel switch.



robgood
Posts: 6
Member Since:
2007-03-04
The REAL Problem

The REAL problem here is more of an interaction issue. The visual indicator, by virtue of being red, is telling people there is a problem. There is no reason for it to be red. If the Linux OS is happy with 99.9% utilization, then frankly that bar should be green from start to finish, and only just an indicator of usage. In fact, one might argue that if it's NOT using enough memory then it is not optimizing itself for best performance, so heh, maybe the color scheme should be inverted!

But all kidding aside, it should be green all the way across, not yellow or red. Someone with skills better than mine should make that patch recommendation.



mustardman
Posts: 1158
Member Since:
2006-06-18
Good point,Memory usage

Good point,

Memory usage reporting in the GUI could definitely use a bit of refinement. Would that be a Trixbox or FreePBX bug/feature report/request?



TDF
Posts: 197
Member Since:
2006-12-19
Its a Trixbox issue, if you

Its a Trixbox issue, if you look at FreePBX 2.3 that nows show your memory usage, but only shows app memory and swap and the way it looks wouldn't send anyone into a panic.

The Trixbox page has added buffers and cached sending the total into the red and looking like a problem if you don't know any better.



rvergara
Posts: 61
Member Since:
2006-08-29
Laser, Sorry for the

Laser,

Sorry for the confusion, you are correct, I was actually referring to a person that somewhat hijacked your original post.

Totally agree with the change in the GUI, actually the red bar should be in the swap space if it is above 60/70% IMO.

Regards

Ramiro



JacksonWY
Posts: 1
Member Since:
2007-05-04
Caching understood, still an issue

With an understanding of the cache config in Linux, there is still and issue of memory usage. If memory usage was climbing and TB had no problems, OK, no big deal, but; there are problems.
Our config: Dell 1950 dual DualCore 2G, 4G RAM, 70G RAID
TB 2.2.3, all SIP, no telephony cards, FreePBX 2.2.1
We currently have ~40 extensions, 12 routes (In/Out) , 1 trunk, a handfull of Misc. Destinations, and 8 parking slots. Call volume is low to moderate. We've found that after rebooting the system, memory usage will show at ~14% with very low cache usage. After three days, usage has risen to ~15% with cache and buffers occupying 10%. After about 2-3 weeks, memory usage will rise to ~85%, of which cache and buffers will be about ~25%. When we reach this point, we start to have "wacky" FreePBX issues, (extension don't function properly, BLF won't light, voicemails won't get delivered, new extension not functioning, etc). When we reboot the system, memory usage returns to ~14% and all functions return to expected behaviors.
This is classic memory leak behavior. We're testing FreePBX 2.3.1 in our test environment, but cannot simulate the load we see in production. Has anyone experienced this with FPBX 2.3.1 or plain Asterisk installations? I don't think it's asterisk itself, and top reports steady usage at .3-1% for the asterisk process...
Any other ideas or info from others with this problem would be helpful.
Matt W



mustardman
Posts: 1158
Member Since:
2006-06-18
Assuming it is a true memory

Assuming it is a true memory leak, have you tried using the "top" command to see which daemon is eating up all the memory?

I'm using FPBX 2.3.1 with no problems.



cazimmy
Posts: 81
Member Since:
2007-01-28
Command to clear memory cache?

Is there a command that I can run once a day to clear the cache memory? Our problem is that TB randomly crashes - could be after a week or a month and we never know when it is going to happen. But it does seem that there is a memory spike at that time (with only one call in process). If I could run a script each day that would clear the memory cache and see how long it works by doing that at least I can continue my process of elimination.



compdoc
Posts: 87
Member Since:
2007-02-28
I just built a system with 2

I just built a system with 2 gigs of ram, and the memory usage never moves above a small amount. On another system I put together a few days ago, 512 megs is up to 90% after a day.
Maybe 512 megs isnt enough.



mustardman
Posts: 1158
Member Since:
2006-06-18
First of all and for about

First of all and for about the millionth time cazimmy, If your....um....server is crashing because of memory it is not because of cache memory filling up which is 100% by design and perfectly normal and does not cause any problems with anything unless your memory has a problem that only shows up when it get's filled up!

However, since you asked, the "script" would be 'reboot' which you can add to cron.

compdoc, do the same sorts of things you are doing on System B on System A and it will start reserving memory as well. I wish Trixbox would change the GUI so we don't have to have these conversations about cache memory every few days.



cazimmy
Posts: 81
Member Since:
2007-01-28
You should calm down

mustardman- you should really lose the attitude with the people on this thread and stop talking down to everyone. I'm sure we all understand what you are saying. The point that you are clearly missing is that there is more than one of us that is having a problem where the total memory used (add it up any way you want and I can show you the graph) goes up on an ongoing basis and then causes the machine to lock up, reboot or crash. This can clearly be tied to time and memory usage. Using your logic, if all of the memory isn't being used even though the reports show that it is, then why wouldn't the machine crash all the time not just when it reaches around 100% - which only happens after several days or weeks?

Instead of giving everyone attitude, how about suggesting some viable solutions.



kspare
Posts: 548
Member Since:
2007-02-16
install webmin and check the

install webmin and check the system stats on there to see what is using all the cpu and memory.

Are you by chance running iaxmodem? I've found that the version in the repo's will cause these symptoms.



compdoc
Posts: 87
Member Since:
2007-02-28
Well, I took the system I

Well, I took the system I just built with 512 megs of ram, and increased the ram to 1 Gig, and now the Percent Capacity never goes above 53%.

I didnt change the swap size (mainly because I dont know how to increase the partition), so that's just a bit smaller than I'd like, but since its not being used now , it doesnt matter to me.

Anyway, if youre concerned about the amount of ram being used, I'd say 1 gig is the sweet spot for smaller systems. And think about 2 for a larger one...

And I agree with mustardman - if its crashing, something other than the amount of ram is going on...



mustardman
Posts: 1158
Member Since:
2006-06-18
I have small systems running

I have small systems running just fine on 256Meg. The min. most systems would come with now a days is 512Meg which is plenty for anything less than 10 extensions IMHO.

cazimmy,
As long as people continue to demonstrate their lack of understanding of how memory is used in CentOS even thought they think they do know, they should expect attitude.

If they do know how memory works they should be able to trace it down to the daemon that is hogging all the memory using one of a few very simple commands. If they cannot get that far then they obviously don't know what they are talking about.



cdoss
Posts: 2
Member Since:
2006-10-13
Let Me Understand

If you are saying they changed the kernel in Linux to manage Memory, That is ok with me.

The problem is though, If you have to reboot the computer, once a week, to get the phone system working that is a problem. How many Nortel, Avaya, Shoretell, etc systems have to be rebooted once a week. The end user is going to say "rip out the phone system out and I will buy one that works".

I have already have had this happen. I just rolled back trixbox to an older one that it did not have the same problem.

I am not trying to be sarcastic just that is what the end user is looking at it is a phone system not a computer system.



TDF
Posts: 197
Member Since:
2006-12-19
So are you saying that you

So are you saying that you did indeed have a memory problem or just that you had a problem and your memory was by coincidence doing exactly what it was supposed to do and due to a lack of understanding youve added up 1+1 and got three ?

I'm not rereading this sorry arsed thread, but from what I remember no one had any evidence of a memory problem, apart from the OP who infact had memory that had gone bad and needed replacing.



cdoss
Posts: 2
Member Since:
2006-10-13
RE So are you saying that you

I did not have a physical memory problem but when I rolled it back I did not have to reboot the system once a week, and as a matter of fact the memory usage has not raised above 35% usage.

So I am not sure what is going on.



anteos
Posts: 5
Member Since:
2007-03-01
Memory usage increasing

In my case the problem was the size of root mails in /var/spool/mail/root file. I`ve cleaned it
by typing in command line :
echo 0 > /var/spool/mail/root
It writes 0 (or something you like :) ) in file whitch contains root mail messages.
Before cleaning it was about 2GB. Now my problem solved without restarting which is critical for my company.



KodaK
Posts: 1865
Member Since:
2006-06-14
Uh, you appear to be talking

Uh, you appear to be talking about hard drive space and not RAM, which is a completely different thing.

You probably want to actually receive mail, so you might want to create an alias to have root's mail delivered to you instead of just ignoring it, it might contain valuable troubleshooting information.

--

I'm happy to try to help in these forums for free, but if you feel compelled, or if you desire one on one help, my Paypal address is: sakodak@gmail.com



anteos
Posts: 5
Member Since:
2007-03-01
Memory usage increasing

But if this harm your asterisk info page. you can simply edit the file /var/spool/mail/root
and delete the string you have written in (in previous examle 0). The asterisk info page will now work.



KodaK
Posts: 1865
Member Since:
2006-06-14
Delivering roots mail will

Delivering roots mail will cause it to not go into the spool in the first place.

--

I'm happy to try to help in these forums for free, but if you feel compelled, or if you desire one on one help, my Paypal address is: sakodak@gmail.com



anteos
Posts: 5
Member Since:
2007-03-01
I`m not talking about hard

I`m not talking about hard drive space. May be some process is trying to read root messages, bacause my systems used physical memory before deleting root messages was 5.5 GB grom 6 GB, and now it`s only 300 MB.



rovakl
Posts: 86
Member Since:
2006-06-04
Memory Climb

I have been reading all I can about this memory condition. I still have the same problem. Up to 90% and then The server stops. I have about a doz systems out there. I range from 2.2.8 up to the latest 2.6.0.7 and the betas. My platforms range from 1g to 4g memory and P4, Dual cores and Xeon dual cores, all single CPU. My main motherboards are Supermicro PDSMA+ and PDSMi+ along with some Dell SC-420 and SC-430 servers. All do the same. Under release 2.3.x the memory stays at about 30% and 2.3.x and up the memory sores to over 90%. I put together a 4 gig system with 2.6.0.7 and two extensions. One FXO card TDM-400 with no activity. It also climbs to 90 % after about 2 weeks. If I rebuild it as 2.2.8 all OK. Has anyone found out the problem. I can't have a customer system that has to be rebooted every other weekend. It does not look good.



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.