Time for Docker Daemon to start varies!

Hi ,
I have tried killing the docker daemon using the command “kill -9 $(pidof dockerd)”
and stared it using the command “service docker restart” . It takes about 2 mins to start the docker daemon
But docker ps --all takes less than a second to start it up

where as when i kill the docker daemon using the command “systemctl stop docker” it takes less than a min to start the docker

Why do we see so much of time difference in both the cases ??

Why does it take over 2 minutes to start my Apache HTTPD server but when I use curl http://localhost:8080/index.html it returns in milliseconds?

If you shut down the Docker Daemon (server) and try to run any docker command (client) it will tell you that Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

dockeris the client application and dockerdis the server. Two different things.

When killed docker using the commnad “kill -9 (pidof dockerd)” , while tried to any docker command (client) does not show an error.
kill -9 $(pidof dockerd) does it not kill the daemon ?

Yes, it kills the daemon, but the daemon is not equal to the client command line application. Two different things.