Ubuntu: Is there any performance impact if I auto-start the Apache 2 web server at the time of boot and I keep it running?



Question:

I am new to Ubuntu 14.04. I installed lamp-server^ and after that Apache 2 auto-starts at the time of boot.

In Windows, I used WAMP server. It didn't auto start at the time of boot.


Solution:1

If it's idling it's probably irrelevant, even tough as any process Apache will consume some resources in order to keep running; an idling Apache should never be a big deal, however you can check this for yourself by running top -p $(pgrep -o apache).

Here's the output of the command on a Debian Jessie machine running Apache (it showcases the average load of the last 30 seconds):

Tasks:   1 total,   0 running,   1 sleeping,   0 stopped,   0 zombie  %Cpu(s):  0.2 us,  0.2 sy,  0.0 ni, 99.5 id,  0.1 wa,  0.0 hi,  0.0 si,  0.0 st  KiB Mem:   3942096 total,  3515488 used,   426608 free,   271400 buffers  KiB Swap:        0 total,        0 used,        0 free.  2018532 cached Mem      PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND       3228 root      20   0   73488   4416   3216 S   0.0  0.1   0:00.01 apache2   

In this case the CPU usage is almost null, and the memory usage is about the 0.1% of the total memory, hence ~4MB.

However as pointed out by prakharsingh95, leaving a server running with no purpose, aside from the intrinsic unusefulness, is a potential security flaw and (if that's a concern) also owns the port on which the server is listening.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »