I run a site as a service for the statewide high school swimming community. I do this for love of the sport, so I can't spend a ridiculous sum on hosting, etc. Nor do I need to - except for one day a year.  The coaches all submit their regional entries through my site, and in typical fashion all wait until the due date to do it. That was yesterday, and my site which never fell over all season ground to an unresponsive halt at least 4 times throughout the day. It was never gone for more than an hour, and it always came back. (I issued apache restarts just to be sure).  My question is: how can I tune Apache to handle a one day surge of users? It makes no sense to pay for more hardware for an entire year when I only need to caox one day of increased performance. I've tried reading about prefork.c and worker.c but I just don't understand it well enough. Here's my current config:  &lt;IfModule prefork.c&gt;  StartServers       1  MinSpareServers    1  MaxSpareServers    5  ServerLimit       10  MaxClients        10  MaxRequestsPerChild  4000  &lt;/IfModule&gt;   &lt;IfModule worker.c&gt;  StartServers       1  MaxClients        10  MinSpareThreads    1  MaxSpareThreads    4  ThreadsPerChild     25  MaxRequestsPerChild  0  &lt;/IfModule&gt;   The most users I would ever expect at once would be 400. Likely much less than that though. I only had about 70 yesterday and it didn't perform very well. Any suggestions?  UPDATE:    728 root      20   0  317m  20m 7752 S  0.0  2.7   0:49.58 httpd 19700 webuser   20   0  489m  37m 6792 S  0.0  4.9   0:00.72 httpd 19737 webuser   20   0  493m  42m 6624 S  0.0  5.5   0:00.59 httpd 19756 webuser   20   0  494m  43m 6604 S  0.0  5.7   0:00.58 httpd 19758 webuser   20   0  495m  44m 6780 S  0.0  5.8   0:00.97 httpd 19777 webuser   20   0  493m  42m 6620 S  0.0  5.5   0:01.08 httpd   Took a look at the resources, and I'm not sure what I'm looking at.  The process owned by root should be the one that runs Apache.  Are those owned by webuser spawned by Apache itself?  Why are they so big?  Server has about 3/4G RAM, if I figure 1/2 for Apache, and processes are holding 40M, how can i estimate the number of simultaneous users possible?
This is a  about capacity planning for web sites. Related:      What are some recommended tools and methods of capacity planning for web sites and web-applications? Please feel free to describe different tools and techniques for different web-servers, frameworks, etc., as well as best-practices that apply to web servers in general.
Tokenizing strings in C I have been trying to tokenize a string using SPACE as delimiter but it doesn't work. Does any one have suggestion on why it doesn't work?  Edit: tokenizing using:  strtok(string, " ");   The code is like the following  pch = strtok (str," "); while (pch != NULL) {   printf ("%s\n",pch);   pch = strtok (NULL, " "); } How to add thickness to a curve? How can I add thickness to a curve? I already tried with the extrude and depth options in the curve settings, but it doesn't work properly. How do I get object names to appear in the render? In my scene I have multiple objects (30+). In the viewport I have the handy control of selecting (in the Properties Editor) Object> Display> Name and copying to selected.  This is beautiful for diagrams etc. as wherever my view is at whatever distance these labels have been placed instantly, always face me and are always the same size.  How can you get these to display in a rendered view?  Is the ONLY option to manually create a label for each object, get them to track to your camera (Probably have to track to an empty miles behind your camera rotation otherwise they offset if your camera isn't facing exactly front on to an object) and add some sort of scaling property to change depending on how far away you are? When I try to create a reaction from chemmacros/reactions I got the following error. I dunno what I am missing. Please help. Thank you.     line 11: Undefined control sequence. \end   line 11: Missing number, treated as zero. \end   line 11: Missing number, treated as zero. \end     Minimum Working Example    \documentclass[12pt,a4paper]{article} \usepackage{chemmacros} \chemsetup{modules={reactions}} \begin{document} \begin{reaction}     A + B -&gt; C \end{reaction} \end{document} If an opponent casts  to gain control of  then sacrifices it who will draw the card? Does the existence (now proved) of gravitational waves imply the existence of Gravitons? I studied the theoretical part about the Gravitational waves in General Relativity (linearization of gravity and small perturbations of the metric and so on).  But I was wondering about: since electromagnetic radiation is composed/carried by Photons (or better:the EM force), shall gravitational waves be composed/carried by Gravitons?   In the end:do gravitational waves imply the existence of gravitons? Or it's something unrelated and off topic? Is there a continuous function such that $\int_0^{\infty} f(x)dx$ converges, yet $\lim_{x\rightarrow \infty}f(x) \ne 0$? Is there any way to index my Github account to google search. I see that many people's account show up as soon as I type their name, but mine doesn't show up even after I type my name followed by github n search. According to my text book:  The Lorentz Force F on a charged particle moving in an electromagnetic field is given by:  $$F= qE + q(v\times B)$$  then it states that "it is to be pointed out that only the electric force does work, while the no work is done by the magnetic force which is simply a deflecting force."  How can this by true won't the the magnetic force have a considerable magnitude, will it now impart kinetic energy to the charge? Any explanations will help a lot. Please keep the terminology simple, thanks. InputStream returning NullPointerException (Java) I get this message while trying to install Ubuntu 12.04 as a guest in VirutalBox 4.1.18, on an Ubuntu 10.04 host.         This kernel requires the following feature not present on the CPU: pae   Some host specs:     The host's kernel is: Linux 2.6.32-41-generic-pae GNU/Linux   lscpu (host): Architecture: i686, CPU op-mode(s): 32-bit, 64-bit   grep --color=always -i PAE /proc/cpuinfo   does show pae in its output.   The 12.04 iso used is: ubuntu-12.04.0-desktop-i386.iso      As a comparison/check, I downloaded and installed Linux Mint 13 Cinnamon to the same host on the exact same VM (I just changed the .iso image). It worked fine. Its iso is: linuxmint-13-cinnamon-dvd-32bit.iso   It seems (to me) that I have pae.. what is going on here?   Update: I had assumed that Linux Mint also required pae (being Ubuntu based), but I've just run;   grep --color=always -i PAE /proc/cpuinfo   in the Mint VM.   It showed no output.   So it seems the issue may lie with VirtualBox.   If that is the case, how can I get Virtualbox into pae mode? Prove that the dihedral group $D_4$ can not be written as a direct product of two groups What do I do when I walk into a room with a broken item and both children shrug their shoulders and say "Wasn't me"? I'm trying to get my kids to be honest and take responsibility.   I'm seeing a repeated pattern where one or both of my kids will lie to get out of trouble. They're starting to see that they can deny responsiblity.   Our current system of reward involves a marble jar, where the family will go out for a collective treat. When this stuff happens we take marbles out of the jar as a joint penalty.   This seems to be decreasing in effectiveness.   My question is: What do I do when I walk into a room with a broken item and both children shrug their shoulders and say "Wasn't me"?  Clarification: Kids are girl: 5 and boy: 4. Cultural context is Australian middle class with two university educated parents. Indian CGPA to US GPA system Two Answers, One Question Sometimes, when I answer a question on Stack Overflow, I have two different answers that are equally valid. This happens most when answering architectural questions where there are many valid ways to solve a problem.  Is it better to put each alternative into a single answer, or put each alternative in its own answer?  Posted each alternative separately will allow the voting system to float the best answer to the top, but I don't want to be accused of rep whoring by "flooding" a question with answers.  What's your opinion? One or two answers? Excel INDIRECT function and conditional formatting - highlighting a row Is it possible to install Ubuntu FROM a smartphone? So, I'm in a situation were I want to install ubuntu in my laptop (currently running windows 8) but I don't happen to have pendrives, CDs or the like available. The only "external" device I have with me is a samsung galaxy s2 with a micro SD-card in it.   Is it possible to use the phone as a pendrive to install ubuntu from it somehow? (without damaging the phone's OS and data) How can I optimise a Minecraft-esque voxel world? I found Minecraft's marvelous large worlds extremely slow to navigate, even with a quad core and meaty graphics card.  I assume Minecraft's slowness comes from:   Java, as spatial partitioning and memory management are faster in native C++. Weak world partitioning.   I could be wrong on both assumptions. However, this got me thinking about the best way to manage large voxel worlds. As it is a true 3D world, where a block can exist in any part of the world, it is basically a big 3D array [x][y][z], where each block in the world has a type (i.e BlockType.Empty = 0, BlockType.Dirt = 1, etc.)  I assume that to make this sort of world perform well, you would need to:   Use a tree of some variety (//) to split all the cubes out; it seems like an oct/kd would be the better option, as you can just partition on a per cube level not a per triangle level. Use some algorithm to work out which blocks can currently be seen, as blocks closer to the user could obfuscate the blocks behind, making it pointless to render them. Keep the block object themselves lightweight, so it is quick to add and remove them from the trees.   I guess there is no right answer to this, but I would be interested to see peoples' opinions on the subject.  How would you improve performance in a large voxel-based world? I try to prove the following formula:  $$n!=\prod_{k=1}^n \operatorname{lcm}(1,2,...,\lfloor n/k \rfloor)$$  I noticed that  $\upsilon_{p}(\operatorname{lcm}(1,2,...,\lfloor n/k \rfloor)) = s$ iff $\lfloor n/(p^{s+1}) \rfloor &lt; k \leq \lfloor n/(p^{s}) \rfloor $ I checked the other question similar to this issue yet I could not find a proper solution for the issue I am facing for including an .svg file which is converted using inkscape with pdf+latex option set to ON, and I have also included both the .pdf and .pdf_tex file in the path. Yet I get the above mentioned error.   My code:  \begin{figure}[h!]  \centering \def\svgwidth{\columnwidth} \input{Implementation/Figs/most_changed_from_default_pos_0.pdf_tex} \end{figure}   Full error description:  !pdfTeX error: pdflatex (file /compile/Implementation/Figs/most_changed_from_default_pos_0.pdf): PDF inclusion: required page does not exist &lt;5&gt;   Any help to solve this issue would be really appreciated. I also downloaded the pdf file to check whether it has 5 pages. I could verify it, there were 5 pages in the pdf file.   The file which I want to convert is   I have added the google drive link to the file which I have used for analysis herewith