Server :: Apache Crashing VPS - Need To Reduce Memory Usage

Feb 11, 2010

I have a VPS running a web application served using Apache, that on average deals with 20-50 requests per second. It's usually above this point (50 requests per second) that the amount of memory that Apache uses is too high for the VPS and errors start occuring - web pages crash and VPS falls over for a minute or two before going back to normal levels.

I believe that MaxClients is the best way to reduce the amount of RAM that Apache uses and I am planning to reduce MaxClients from 256 (default value) to around 100. Each Apache process uses ~15MB and the server has 1900MB of ram in total - the server does nothing else other than run Apache and a few crons.

Current setting are:

Code:
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 3
# prefork MPM
# StartServers: number of server processes to start

[Code].....

I tried reducing MaxClients before which lead to massive slowness, so I need some other options as well.

Does my suggestion of reducing MaxClients to ~100 seems sensible? What are my options if the server experiences slowness again - optimise the application? What's the best way to reduce memory usage - move images to another web server?

View 2 Replies


ADVERTISEMENT

Ubuntu :: Reduce Memory Usage / Footprint In 10.04?

May 15, 2010

I like a lot of the last Ubuntu editions, but my computer is a little old, and Ubuntu becomes slower each edition to me.

I get a AMD Athlon 2 GHz, with just 512 MB of RAM memory...

I tried to customize my last installation of 9.10, but i just mess up with the OS. Well, I googled for informations about reducing memory usage, as well others speed-ups but all them are a bit older. Does anyone know any resource about this?

Until now I just disabled startups programs, but i really want is remove packages and everything that I don't use.

One thing thats get me up set sometimes is that I run Win XP pro under a cryptographed partition, and even yet its very fast in my PC. I even tried Windows 7, and its was faster than the Ubuntus I installed.

When I'm using the 10.04, there is a lot of memory used by cache, specially Gnome...

View 3 Replies View Related

Server :: Find Total Apache Memory Usage?

Sep 12, 2010

Top only show the memory usage for individual processes. Apache often runs hundreds of processes, each of which may use only a small amount of memory, however the total memory consumed by all apache processes can be fairly large.Is there a way to see the total memory usage for all apache processes?

View 7 Replies View Related

Server :: "free" Shows Far More Memory Usage Than Summing Up Application Usage?

Aug 6, 2010

I've come across a really strange issue with one of my RHEL servers. The "free" command shows that 7019 MB of memory are actually in use by my system, but when summing up the actual usage (or even virtual usage like the example below) it doesn't add up - the sum is far less than what is reported by "free":

Code:

[root@server1 ~]# free -m
total used free shared buffers cached
Mem: 12011 7946 4065 0 4 23
-/+ buffers/cache: 7919 4092

[code]....

View 2 Replies View Related

Server :: Mysql Being A Memory Hog And Crashing (Deb Lenny) / Resolve It?

Dec 21, 2009

I've got this issue for past week.

Mysql Crashes with 111 error although it starts back up instantly.

but i can't seem to figure out why.

-Server Is Deb. Lenny + Direct Admin.

Quad Core 2.5, 8GB Ram.

-Mysql ver 5.3

-Htop shows mysql is most of the time using 33 - 50% CPU.
(the init.d name is /etc/init.d/mysqld )

-This is from the err log of last crash. code...

View 3 Replies View Related

Ubuntu Servers :: No X Server And No VNC (old HP Office Pc) At The Moment Memory Usage Is Only 40Mb Without X Server?

Feb 2, 2010

Last weekend i've set up my first headless ubuntu home file server and torrent downloader with ubuntu 9.10.Very cool but CPU is way too fast for a home server: P4 HT 2.8Ghz, unfortunatly it has only 256Mb of ram, so no X server and no VNC (old HP office pc) At the moment memory usage is only 40Mb without X server. Besides SSH works just fine Few questions i can't seem to find answers to on google:What is a good CL network monitoring program?mething similar to htopUbuntu 9.10 has a lot, about 20-30, console-kit deamon instanses running after boot each using some memory that i can't spare.

View 2 Replies View Related

Server :: Bind Memory Usage Keeps Increasing?

Jun 14, 2011

I'm running a recursive DNS server on Ubuntu Server 10.04 64bits and Bind 9.7.0-p1 and having issues with memory usage. The named process memory usage keeps increasing from about 500Mb to 4Gig inside of a couple of weeks. If I don't restart Bind in the mean time the swap fills and performance gets very bad.

View 6 Replies View Related

Server :: Monitor Memory Usage For Process

Jan 24, 2011

I use linux and Unix and I want to monitor the memory usage for process. To prevent memory leakage and out of memory of the system. Any command or sytnax , have more better and presentable data than below command about memory usage of one process ?

View 3 Replies View Related

Server :: Reduce RAID5 Partition Sizes / Reduce The Size Of Md1 And Grow Md0?

Feb 14, 2010

I have a rack of four 1TB drives all partitioned identically with three primary partitions. On each drive

- the first partition is only 64MB;
- the second is a large 900GB partition and
- the last holds all the remaining space

mdadm has been used to set up
/dev/md0 - RAID1, comprised of /dev/sda1 and /dev/sdb1
/dev/md1 - RAID5, comprised of /dev/sda2, /dev/sdb2, /dev/sdc2, /dev/sdd2
/dev/md2 - RAID5, comprised of /dev/sda3, /dev/sdb3, /dev/sdc3, /dev/sdd3

OK, so it was a silly mistake to make - but I am now need to increase the size of /dev/md0. My thinking is to reduce the size of md1 so that I can grow md0.

On md1 I have two logical volumes. I've successfully reduced the size of the volume so that I can reduce the size of md1. Now I'm at the nervous stage; I can find little written on the topic of shrinking RAID5 arrays - and even if I do this I'm unsure if I can move partitions around to regain the space I so desire.

View 1 Replies View Related

General :: Status Of Memory Usage And Disk Usage Using Sigar In Windows And Ubuntu

Mar 15, 2010

I was trying to get the status of memory usage and disk usage using sigar in windows and ubuntu. done this in windows by just copying the sigar library into jdk library. But i was unable to do so in ubuntu. I've copied the library to java-6-sun library but still can't run the program.

View 14 Replies View Related

Server :: 100 Percent Swap Usage With Loads Of Free Memory

Dec 10, 2010

Nagios had alerted me that the server had a very high load average exceeding the critical level (17+), when logging onto the server I found that all 4GB of the swap was in use despite the fact that there was 15GB+ of free memory (and that's not even including memory from cache and buffers!) Because it seems all heavily used pages were being stored in swap, the I/O wait on the server became very high, and 4 kswapd daemons were taking up nearly 100% available CPU. This did coincide with an error reported by Bacula during a backup job while changing to a bad tape...

From /var/log/bacula.log:
Code:
10-Dec 02:11 bacula-sd JobId 1898: End of medium on Volume "4097" Bytes=434,170,000,000 Blocks=217,084 at 10-Dec-2010 02:11.
10-Dec 02:11 bacula-sd JobId 1898: 3307 Issuing autochanger "unload slot 4097, drive 0" command.
10-Dec 02:12 bacula-sd JobId 1898: 3301 Issuing autochanger "loaded? drive 0" command.
10-Dec 02:12 bacula-sd JobId 1898: 3302 Autochanger "loaded? drive 0", result: nothing loaded.
10-Dec 02:12 bacula-sd JobId 1898: 3304 Issuing autochanger "load slot 4096, drive 0" command.
10-Dec 02:13 bacula-sd JobId 1898: 3305 Autochanger "load slot 4096, drive 0", status is OK.
10-Dec 02:13 bacula-sd JobId 1898: Volume "4096" previously written, moving to end of data.
10-Dec 03:51 bacula-sd JobId 1898: Error: Unable to position to end of data on device "Tape-1" (/dev/IBMtape0n): ERR=dev.c:1384 read e
rror on "Tape-1" (/dev/IBMtape0n). ERR=Input/output error.

10-Dec 03:51 bacula-sd JobId 1898: Marking Volume "4096" in Error in Catalog.
10-Dec 03:51 bacula-sd JobId 1898: 3307 Issuing autochanger "unload slot 4096, drive 0" command.
10-Dec 03:58 bacula-sd JobId 1898: 3301 Issuing autochanger "loaded? drive 0" command.
10-Dec 03:58 bacula-sd JobId 1898: 3302 Autochanger "loaded? drive 0", result: nothing loaded.
10-Dec 03:58 bacula-sd JobId 1898: 3304 Issuing autochanger "load slot 4098, drive 0" command.
10-Dec 03:58 bacula-sd JobId 1898: 3305 Autochanger "load slot 4098, drive 0", status is OK.
10-Dec 03:59 bacula-sd JobId 1898: Wrote label to prelabeled Volume "4098" on device "Tape-1" (/dev/IBMtape0n)
10-Dec 03:59 bacula-sd JobId 1898: New volume "4098" mounted on device "Tape-1" (/dev/IBMtape0n) at 10-Dec-2010 03:59.
At the same time, these messages starting occuring in /var/log/messages:

Code:
Dec 10 03:51:47 07 kernel: Mem-info:
Dec 10 03:51:47 07 kernel: Node 0 DMA per-cpu:
Dec 10 03:51:47 07 kernel: cpu 0 hot: high 0, batch 1 used:0
Dec 10 03:51:47 07 kernel: cpu 0 cold: high 0, batch 1 used:0
Dec 10 03:51:47 07 kernel: cpu 1 hot: high 0, batch 1 used:0
Dec 10 03:51:47 07 kernel: cpu 1 cold: high 0, batch 1 used:0
Dec 10 03:51:47 07 kernel: cpu 2 hot: high 0, batch 1 used:0
Dec 10 03:51:47 07 kernel: cpu 2 cold: high 0, batch 1 used:0
Dec 10 03:51:47 07 kernel: cpu 3 hot: high 0, batch 1 used:0
Dec 10 03:51:47 07 kernel: cpu 3 cold: high 0, batch 1 used:0
Dec 10 03:51:47 07 kernel: cpu 4 hot: high 0, batch 1 used:0
Dec 10 03:51:47 07 kernel: cpu 4 cold: high 0, batch 1 used:0
Dec 10 03:51:47 07 kernel: cpu 5 hot: high 0, batch 1 used:0
Dec 10 03:51:47 07 kernel: cpu 5 cold: high 0, batch 1 used:0
Dec 10 03:51:47 07 kernel: cpu 6 hot: high 0, batch 1 used:0
Dec 10 03:51:47 07 kernel: cpu 6 cold: high 0, batch 1 used:0
Dec 10 03:51:47 07 kernel: cpu 7 hot: high 0, batch 1 used:0
Dec 10 03:51:47 07 kernel: cpu 7 cold: high 0, batch 1 used:0
Dec 10 03:51:47 07 kernel: Node 0 DMA32 per-cpu:
Dec 10 03:51:47 07 kernel: cpu 0 hot: high 186, batch 31 used:162
Dec 10 03:51:47 07 kernel: cpu 0 cold: high 62, batch 15 used:48
Dec 10 03:51:47 07 kernel: cpu 1 hot: high 186, batch 31 used:0
Dec 10 03:51:47 07 kernel: cpu 1 cold: high 62, batch 15 used:0
Dec 10 03:51:47 07 kernel: cpu 2 hot: high 186, batch 31 used:0
Dec 10 03:51:47 07 kernel: cpu 2 cold: high 62, batch 15 used:0
Dec 10 03:51:47 07 kernel: cpu 3 hot: high 186, batch 31 used:18
Dec 10 03:51:47 07 kernel: cpu 3 cold: high 62, batch 15 used:0
Dec 10 03:51:47 07 kernel: cpu 4 hot: high 186, batch 31 used:159
Dec 10 03:51:47 07 kernel: cpu 4 cold: high 62, batch 15 used:56
...
Dec 10 03:51:47 07 kernel: Node 3 HighMem per-cpu: empty
Dec 10 03:51:47 07 kernel: Free pages: 732052kB (0kB HighMem)
Dec 10 03:51:47 07 kernel: Active:4232128 inactive:3071288 dirty:158210 writeback:0 unstable:0 free:183320 slab:256840 mapped-file:289545 mapped-anon:3805487 pagetables:13063
Dec 10 03:51:47 07 kernel: Node 0 DMA free:10796kB min:4kB low:4kB high:4kB active:0kB inactive:0kB present:10356kB pages_scanned:0 all_unreclaimable? yes
Dec 10 03:51:47 07 kernel: lowmem_reserve[]: 0 3512 9067 9067
Dec 10 03:51:47 07 kernel: Node 0 DMA32 free:213332kB min:2500kB low:3124kB high:3748kB active:1794108kB inactive:1463220kB present:3596296kB pages_scanned:64 all_unreclaimable? no
Dec 10 03:51:47 07 kernel: lowmem_reserve[]: 0 0 5555 5555
Dec 10 03:51:47 07 kernel: Node 0 Normal free:41028kB min:3952kB low:4940kB high:5928kB active:3409444kB inactive:1471120kB present:5688320kB pages_scanned:0 all_unreclaimable? no
Dec 10 03:51:47 07 kernel: lowmem_reserve[]: 0 0 0 0
Dec 10 03:51:47 07 kernel: Node 0 HighMem free:0kB min:128kB low:128kB high:128kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no
Dec 10 03:51:47 07 kernel: lowmem_reserve[]: 0 0 0 0
Dec 10 03:51:47 07 kernel: Node 1 DMA free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no
...
Well to cut a long story short, I fixed the problem by disabling the swap partition with 'swapoff'. After about 30 mins all the swap was freed and the server went back to normal. I don't dare reactivate the swap partition and unfortunately as this is a live server which currently has no fail over, I can't reboot either

Server Spec:
4 * Dual-Core AMD Opteron(tm) Processor 8214
32GB DDR2 ECC RAM
RHEL 5.5, 2.6.18-194.11.3.el5 SMP x86_64
Running many KVM VMs (All CentOS x64) and kksmd is used.
bacula-dir Version: 5.0.0
IBM Tape Drive using lin_tape module version 1.34.0 according to modinfo

And before anybody asks
# sysctl vm.swappiness
vm.swappiness = 10

View 5 Replies View Related

Server :: Sending SNMP Traps (Info On CPU / Memory Usage)

Dec 13, 2010

We have a situation where we have to set up a server to send traps with information regarding CPU, memory usage, etc. I know snmpd can be set up to allow another process to request snmp information about the server, but can it be done the other way around (have a host send information about itself to another server through snmp)?

View 4 Replies View Related

Fedora :: F11 - How To Reduce Inode Usage

Sep 2, 2009

I am running into a scenario where inode utilization (df -i)on a partition is 100% I want know

1) Is there a better way to list the total count of all files in a partition and just display total number of files in each directory in that partition I can get approx total for the entire partition by following commands

ls -Rla | wc -l
find -type f | wc -l

whereas ls -Rla gives too lengthy outptut with all the files in each directory

2) How to know inode utilization for each user or system account? There is huge number of files and how to remove it

View 9 Replies View Related

Ubuntu :: Rip My DVDs - Reduce Cpu Usage ?

Jul 11, 2010

I need to rip my DVDs, an operation which is heavy on the CPU, on my laptop. This makes the temperature rise very quickly, even if the process has very high nice value, and my laptop was already shut off automatically once. Probably there is some bug, since the temperature if often hotter than optimal, but this is really too much (plus these days my room is hot too).

I don't want to ruin anything, so I'd like to put some kind of limit on the CPU usage. Say I don't want any of the two CPUs to go over 70% (a moment ago they were both at 100%, I have paused the process). Is there a way ti d0 this?

View 8 Replies View Related

General :: Ubuntu - Memory Full, Process Memory Usage Doesn't Add Up In Top?

Mar 18, 2011

I have a computer with 16GB of ram. At the moment, top shows all the RAM is taken, (NOT by cache), but the RAM used by the various processes is very far from 16GB.I have seen this problem several times, but I don't understand what is happening.My only remedy so far has been to reboot the machine.

View 1 Replies View Related

Software :: Free Database That Has Low Memory Usage And Innodb And Memory Like Engin

May 3, 2011

I am looking for free database that has low memory usage and innodb and memory like engins that has C API and support trigger and client/server support for using in embedded linux systems.

View 8 Replies View Related

Server :: Running Apache 2.2.3 - High Swap Usage

Oct 2, 2009

I am running Apache 2.2.3 on a CentOS release 5.3 (Final) with 100 Sites. I've notice that Apache is making my server Swap around 200 MBs.
"http://www.xxx.yyy.zzz/server-status" doesn't show me too much to, so I am looking the behavior of specific httpd process.
ProcessID "18753" is the one for "http://www.xxx.yyy.zzz/server-status" in my browser.

This command show me (In KBs) how much virtual memory is that specific process using:
# /etc/init.d/httpd start
# grep Private_Dirty /proc/18753/smaps | awk '{ print $2 }' | xargs ruby -e 'puts ARGV.inject { |i, j| i.to_i + j.to_i }'
3012
... Running this command a lot of times it gives me the same output, but suddenly...
# grep Private_Dirty /proc/18753/smaps | awk '{ print $2 }' | xargs ruby -e 'puts ARGV.inject { |i, j| i.to_i + j.to_i }'
21708

Something make that process (and all the others httpd process too) to use a lot more memory!

Part of my httpd.conf:
# Timeout 120
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 3

<IfModule prefork.c>
StartServers 5
MinSpareServers 5
MaxSpareServers 20
ServerLimit 256
MaxClients 256
MaxRequestsPerChild 100
</IfModule>

<IfModule worker.c>
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule> #

My server is running Mysql 5.1.34, vsftpd 2.0.5, BIND 9.3.4-P1 (as slave). I couldn't found anything running in the specific time that httpd processes start to use that much memory.

View 7 Replies View Related

Ubuntu :: Reduce Available Memory In 9.10

Apr 29, 2010

I want to set a limit on the available RAM in my Linux machine, it currently has 4GB of RAM, and in order to perform some experiments I need the system to recognize and use only 1GB. I don't want to limit the amount of memory to one particular process (like with ulimit), but to the whole system. The OS in Ubuntu 9.10. Somewhere a long time ago (for Fedora) I read about editing grub, so that at boot time the limit is set, it might be something along those lines, but not really sure.

View 9 Replies View Related

Server :: CentOS - Apache Using Lot Of Memory And CPU

Jul 30, 2011

I have a web server with the specs below and my apache server is being a hog using all my RAM 7gigs or 8gigs of ram. When there is a rush of traffic at once my whole server crashes and I have to reboot apache. The way my site is set up I have a tube script and I use the tube script to host videos on my forum I have 1000 videos on the tube script. I brought a bigger server and more ram because of the down time I been having . I am really trying to figure out why its crashing and using so much ram. I installed eAccelerator didn't seem to help with the apache server.

Intel Quad Core Xeon X3430 (4 x 2.40 GHz, 8MB Cache)
> 2-bay Supermicro Chassis and Motherboard
> 8 GB REG ECC DDR3 (twice your current setup)
> 250 GB Enterprise Grade SATA II
> 10 TB Bandwidth 1gig Uplink Port
> CentOS 64 Bit (Latest Stable)

TOP Command and free -m command screenshots are attached this is with only 160 people online at once

View 6 Replies View Related

Ubuntu Networking :: Reduce Memory Footprint 9.04?

Apr 13, 2010

Just wondering if anyone has been successful at reducing the memory footprint of ubu 9.04. I have googled and read a number of "suggestion" but when applied had little or no effect on memory usage. So, after a complete new install, I am here asking this question. It is not a biggie but I am always looking for ways to reduce memory usage without sacrificing functionality.

I try to help others who would like to try and or convert to linux but often their systems have minimal memory and they don't or can't purchase more memory. So, being able to install ubuntu with a smaller memory footprint would be a good thing.

A basic ubuntu 9.04 seems to use about 300 Mb and for many that is too much. Hence, my quest for a smaller memory requirement. I have tried the ubuntu minimal cd's but they don't really achieve much in the memory area and they take so much longer to install since one uses the internet.

At any rate, if someone knows what services or programs that can be safely removed in order to achieve a better memory usage Oh, I have looked at numerous other distro's but seem to always return to ubuntu.

View 1 Replies View Related

Programming :: Reduce Memory Cost Of Threads?

Jul 21, 2011

Fedora15 32bit. I write a test program, it creates new thread continually, the thread does nothing but sleep. I find virtual memory increases up almost 10Mb when a new thread is created. and when there's more than 200 threads, the virtual memory used by the program is 3Gb, and now cann't create new thread. but on windows, it costs little memory. What can I do to config the operation system to take less memory on threads?

View 11 Replies View Related

Red Hat / Fedora :: Get The Value Of CPU Usage - Memory Usage ?

Jan 13, 2009

I am sure that all of us know the result of top command in linux. i want to get the value that the top command return as CPU usage, memory usage. so how do i do(programming relation)?

View 3 Replies View Related

CentOS 5 Server :: Apache - Anonymous Shared Memory Failure

Jan 12, 2010

I just opened an (unmanaged) VPS account and and have been encountering nothing but problems with trying to get Apache up and running (its something I've done many times before).Basically the inital error was with LDAP not having enough space, so I disabled the related extensions and Apache still would not run. Looking at the log, it contains: (28)No space left on device: Unable to create scoreboard (anonymous shared memory failure)

View 1 Replies View Related

Fedora :: Way To Reduce Running Time / Memory Requirement Of Update Process?

Aug 14, 2010

I have an Acer Aspire netbook with 1GB RAM and 1.6 GHz dual-core 32-bit x86 chips. The KPackageKit / yum / rpm chain is running too slow for me. In addition to the time required to download any new packages or updates, it seems to require at least one full minute of processing time to install each package, update, or bug fix, no matter how small. Another full minute is consumed for each package in "cleaning up."Running yum from the command line takes nearly the same amount of time.During this time, I cannot run any other applications without severe thrashing. It seems that a full gigabyte of memory is in use with some 100M swapped out to disk.

Is there any way to reduce the running time and memory requirement of the update process?While not updating or installing software, I do not normally run out of memory (i.e. begin thrashing) until I have about a dozen browser tabs open, or the like.

View 9 Replies View Related

Security :: 100's Of "apache-init-server" - Keeps Running Out Of Memory

Sep 25, 2010

I have a VPS that has 512MB of ram. I'm using it as a mail/web server. It keeps running out of memory. I know amavis/clamav are memory hogs, but I checked my ps aux and found 100's of instances of "apache-init-server" running. I killed them all, and they keep spawning back. What could be causing this. I've never seen this on a webserver before. OS: CentOS 5.5

View 10 Replies View Related

Ubuntu :: 10.04 64-bit Using Over 1GB Memory Usage?

May 11, 2010

Is this normal? I check system monitor and the top most is xorg followed by compiz. When I first started with 10.04 few days ago it was around 300-500MB.

View 3 Replies View Related

Programming :: How To Get Usage Of CPU Memory?

Jan 11, 2009

i am wondering How to get usage of CPU, Memory in linux environment? So would you able to tell me the ways?

View 10 Replies View Related

Red Hat :: Red Hat Box Involving Memory Usage

Jun 2, 2010

I am having a few problems with a red hat box involving memory usage. I have 64Gb memory and 'top' tells me I'm using 60Gb of it, but if I add up all the '%MEM' figures I get no more than 20%. Where is the other 80% ?

We have an ORACLE instance that is using shared memory but this is ceilinged at 45Gb. That means there is about 15Gb unnaccounted for . What utilities can I use on red hat to ascertain memory usage other than 'top' ? Any better ones, more detailed, looking at shared memory etc and swap ?

View 2 Replies View Related

Fedora :: Memory Usage Isn't Adding Up

Sep 17, 2009

I'm trying to understand the performance of my machine and memory usage just isn't adding up. When I run top it will typically show 301M of 308M used but the total of everything in the RES column is no where near 300M and the total of %MEM column isn't more than 20-30%. So how do I figure out what is using all the memory? Then is there some way to control it to optimize performance?

View 3 Replies View Related

General :: TOP Command Memory Usage?

Apr 13, 2011

Under SuSE, (Mem: 31908592k total, 31421504k used,) how do i know which process or program using my memory?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved