Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Well I did had such situation actually so It is based on real data.
There were 2 GB of memory taken when i killed all apache process there were only 50 mb taken(Os processes) and it was under heavy usage of apache so it's not an assumption....
It doesn't matter if Apache is using 2GB of RAM, as long as it is being properly managed. You may have a problem, or you may not. Based on the data you've presented here, it is perfectly possible that you have a properly functioning system, and until you post data from when the problem is occurring, as opposed to just stating that there is a problem, we're not going to be able to help. If Apache is under heavy usage, it should be one of the primary users of RAM. It is also possible that the hardware you've got isn't up to the user load being put on it.
If you want to throttle Apache, then here is some basic advice on how to do it, but based on what you've posted in this thread, you may just be hitting your site's performance for no reason. But hey, your site, your choice.
It doesn't matter if Apache is using 2GB of RAM, as long as it is being properly managed. You may have a problem, or you may not. Based on the data you've presented here, it is perfectly possible that you have a properly functioning system, and until you post data from when the problem is occurring, as opposed to just stating that there is a problem, we're not going to be able to help. If Apache is under heavy usage, it should be one of the primary users of RAM. It is also possible that the hardware you've got isn't up to the user load being put on it.
If you want to throttle Apache, then here is some basic advice on how to do it, but based on what you've posted in this thread, you may just be hitting your site's performance for no reason. But hey, your site, your choice.
What is your memory usage of apache when you come into site with simple hello world ??
No I didn't had good system because while the apache was taking 2 GB I couldn't run my application which takes 1.4 GB of ram because of out of memory so I had to killall apache then start the application.
What is your memory usage of apache when you come into site with simple hello world ??
I don't have a simple site lying around, but looking at the sites I do have, it is probably on the same level as what you've posted. However, that memory gets released as soon as the page is done being sent, so what any individual connection uses is pretty irrelevant.
But this is at the heart of why I've been saying your calculation is kind of irrelevant. If you're looking at 100 users, the impact Apache has will depend upon how long those connections last as well as the amount of information being sent. Do you have 100 users simultaneously pounding on the system 24/7/365? If so, then you are probably looking at needing a dedicated Apache server because that is likely to take a lot of hardware to support. On the other hand if you have 100 users spread infrequently over time and the site doesn't require a bunch of processing, what you have should be fine.
Quote:
No I didn't had good system because while the apache was taking 2 GB I couldn't run my application which takes 1.4 GB of ram because of out of memory so I had to killall apache then start the application.
What are you running that requires 1.4GB of RAM? That seems like a huge minimum requirement for a program and I think it means that you probably need to re-evaluate what your doing with this machine.
I don't have a simple site lying around, but looking at the sites I do have, it is probably on the same level as what you've posted. However, that memory gets released as soon as the page is done being sent, so what any individual connection uses is pretty irrelevant.
But this is at the heart of why I've been saying your calculation is kind of irrelevant. If you're looking at 100 users, the impact Apache has will depend upon how long those connections last as well as the amount of information being sent. Do you have 100 users simultaneously pounding on the system 24/7/365? If so, then you are probably looking at needing a dedicated Apache server because that is likely to take a lot of hardware to support. On the other hand if you have 100 users spread infrequently over time and the site doesn't require a bunch of processing, what you have should be fine.
What are you running that requires 1.4GB of RAM? That seems like a huge minimum requirement for a program and I think it means that you probably need to re-evaluate what your doing with this machine.
I can't optimize apache to use less memory so I can handle 100 users which refreshing site all time lets say with not so huge waste of memory I mean not with 900 MB of ram...?
I can't optimize apache to use less memory so I can handle 100 users which refreshing site all time lets say with not so huge waste of memory I mean not with 900 MB of ram...?
Did you even bother to read the configuration site I linked to? That tells you what you need to know about restricting Apache resource uses. Of course, by restricting Apache RAM use, you may not be able to handle your user load. It really depends upon how much data gets pushed out how frequently. So far, you've presented zero evidence that Apache is "wasting" RAM, so until you've got some real-world usage numbers, this discussion is pointless.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.