Sponsored Content
Full Discussion: Apache instance
Operating Systems Linux Red Hat Apache instance Post 302355552 by Kandra on Wednesday 23rd of September 2009 03:46:17 AM
Old 09-23-2009
This is akin to asking "how many boxes can I transport on a boat".

It all depends on a lot of factors. What kind of boxes are they? How big are they? What kind of boat are you using to transport the boxes? There's also a question of where your limitations are. For instance, if the boxes are very light, volume is obviously going to be the limiting factor. If they are excessively heavy, then weight might be the issue.

In regards to your question, the same answer applies. What kind of Apache instances are they? If they are low-RAM but CPU heavy processes, then obviously CPU will be your limiting factor. If they eat up a lot of RAM, but little CPU, then RAM is your limit. The same thing goes for I/O.

It's also a question of your architecture. For instance, Apache2 with prefork has a hard limit of ~64k processes, so you can never go beyond that, not that you're likely to reach that figure in any reasonable scenario anyway. Threaded Apache2 doesn't have the same kind of limits, but have limits of their own.

It's also a matter of how you set up Apache. I've seen systems where the limiting factor was neither CPU nor RAM, but the fact that Apache had to spend all its time spawning new processes.

The simple answer to your question is the following, how much RAM does each process consume, and how much RAM do you have available?

For instance, if each process takes 50MB RAM and you have 2GB RAM, you can run 40 processes.

Now, again, this is NOT a simple question to answer, and the only way for you to reliably find out is to take a look at YOUR setup and do some calculation work.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

finding first instance

I have a file with 3 columns. Often the first two will hold the same values and the third may differ. I only want one row for each. i.e. aaa,bbb,1 aaa,bbb,2 aaa,bbb,3 xxx,yyy,1 xxx,yyy,2 zzz,rrr,5 Should be aaa,bbb,1 xxx,yyy,1 zzz,rrr,5 I just want the first instance of... (20 Replies)
Discussion started by: peter.herlihy
20 Replies

2. Shell Programming and Scripting

Single Instance

Hi, I have a script. I want only one instance of the script to be running at any point of the time. How can I do it. what would be the exact format of the ps command for doing this. For example the name of my script is "Inst.sh" Thanx in advance (2 Replies)
Discussion started by: sendhil
2 Replies

3. Shell Programming and Scripting

replace first instance(not first instance in line)

Alright, I think I know what I am doing with sed(which probably means I don't). But I cant figure out how to replace just the first occurance of a string. I have tried sed, ed, and grep but can't seem to figure it out. If you have any suggestions I am open to anything! (3 Replies)
Discussion started by: IronHorse7
3 Replies

4. Shell Programming and Scripting

matching first instance of FS

Hi All, I have a property in a file as: property=value=a If I use FS="=" then I want only first = to be considered as field separator and remaining as value echo -e "property=value=a" | awk -F= '{print $2}' ie my $2 should be value=a Can anyone please help me with this. I need it in... (3 Replies)
Discussion started by: gurukottur
3 Replies

5. Shell Programming and Scripting

Sed on first instance only

Hi, I've been trying to figure this one out and found a post about this on the forum here but the solution didn't seem to work for me. Basically what I have is a file that looks something like: stuff morestuff 0 otherthing 0 etc I want to substitute for the 0 but what I want to... (9 Replies)
Discussion started by: eltinator
9 Replies

6. Shell Programming and Scripting

What does : do in this instance

Guys please see below functions to return a status depending on user input. Both seem to work the same. The second way has a : line which i can't understand or see in a ksh manual anywhere. Instead of doing the variable change if its empty on this line the first function simply does it on the... (7 Replies)
Discussion started by: lavascript
7 Replies

7. Red Hat

How to start the right instance of Apache on RedHat server

Hi, I have 2 apache instance on my machine (RedHat), and i need to start the "apache2" after any reboot but could not find the way ( searching into "httpd.conf" ), so i'am starting "apache2" manually. After a reboot, none of them starts and when i when doing : httpd -k start, i got "apache"... (14 Replies)
Discussion started by: mehdi1973
14 Replies

8. UNIX for Dummies Questions & Answers

Maximum Number of Virtual Hosts per Apache instance

Is there a directive to limit the number of virtual hosts allowed per apache instance? I am told yes but I cannot find it. (1 Reply)
Discussion started by: mojoman
1 Replies

9. Web Development

Apache module development on apache 2.2

Hi, I'm new to developing modules for Apache. I understand the basics now and can develop something simple which allows a 'GET' request to happen, but what I want to do is actually 'POST' information to my site. I know the basic POST Request works and I can see that it is post by looking at... (2 Replies)
Discussion started by: fishman2001
2 Replies

10. Red Hat

Process not running: /opt/java15/jdk/bin/java -classpath /opt/apache/apache-ant-1.7.0-mod/lib/ant-la

Have no idea on what the below error message is: Process not running: /opt/java15/jdk/bin/java -classpath /opt/apache/apache-ant-1.7.0-mod/lib/ant-launcher.jar org.apache.tools.ant.launch.Launcher -buildfile build.xml dist. Any help? (3 Replies)
Discussion started by: gull05
3 Replies
DPHYS-SWAPFILE(8)					      System Manager's Manual						 DPHYS-SWAPFILE(8)

NAME
dphys-swapfile - set up, mount/unmount, and delete an swap file SYNOPSIS
dphys-swapfile setup|swapon|swapoff|uninstall DESCRIPTION
dphys-swapfile computes the size for an optimal swap file (and resizes an existing swap file if necessary), mounts an swap file, unmounts it, and and delete it if not wanted any more. OPTIONS
There is only one parameter, an command, which can be either of these: setup Tells dphys-swapfile to compute the optimal swap file size and (re-)generate an fitting swap file. Default it 2 times RAM size. This can be called at boot time, so the file allways stays the right size for current RAM, or run by hand whenever RAM size has changed. swapon and swapoff These run the swapon and swapoff commands on the swapfile. Note that direct swapon/off from /etc/fstab is not possible, as that is (at least on Debian) done in the same script that mounts /var (which is where the swap file most likely resides). And we need to do our setup between those actions. So pass up /etc/fstab, and do our own swapon/off. uninstall Gets rid of an unwanted swap file, reclaiming the disk space. CONFIG
The config file /etc/dphys-swapfile allows the user to set up the working environment for dphys-swapfile. This config file is a sh script fragment full of assignments, which is sourced. Standard sh syntax rules apply. Assignments are: CONF_SWAPFILE Set where the swap file should be placed. Defaults to /var/swap. It is unlikely that you will need to change this, unless you have very strange partitioning, and then you will most likely be using an swap partition anyway. CONF_SWAPSIZE Force file size to this. Default is 2*RAM size. This is unlikely to be needed, unless in strange diskspace situations. Note that swap enabled and smaller than RAM causes kernal-internal VM trouble on random systems. CONF_SWAPFACTOR Set the relation between RAM and swap size. Must be an integer. Defaults to 2 which means swap size = 2 * RAM size CONF_MAXSWAP Set maximum size of the swap file in MBytes. Defaults to 2048 which was the former kernel limit for the swapfile size and is now a limit to prevent unusual big swap files on systems with a lot of RAM. FILES
/etc/dphys-swapfile user config $CONF_SWAPFILE the swap file, target of the whole action (defaults to /var/swap) EXAMPLES
dphys-swapfile is usually run at system startup and shutdown from an /etc/init.d (or /etc/rc.d) script, such as this (minimal) one: #!/bin/sh # /etc/init.d/dphys-swapfile - automatically set up an swapfile # author franklin, last modification 2004.06.04 # This script is copyright ETH Zuerich Physics Departement, # use under either modified/non-advertising BSD or GPL license case "$1" in start) /sbin/dphys-swapfile setup /sbin/dphys-swapfile swapon ;; stop) /sbin/dphys-swapfile swapoff ;; esac exit 0 If an sysadmin wants to have his swapfile in annother place, say /var/run/swap, he can use: In /etc/dphys-swapfile: CONF_SWAPFILE=/var/run/swap AUTHOR
franklin@phys.ethz.ch, http://www.phys.ethz.ch/~franklin/ D-PHYS Swapfile Tools 2006.09.15 DPHYS-SWAPFILE(8)
All times are GMT -4. The time now is 04:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy