I would actually recommend using CGI over fast CGI, because spawning processes on Linux systems is about as efficient as spawning a thread (in fact, for the linux kernel a thread and a process are basically the same thing). Also FPC applications are pretty lightweight, as they usually do not rely on many external dependencies (a pure fpc application does not even bind to LibC).
1) The difference between CGI and FCGI is not just between spawning a process or a thread. CGI must be loaded from HDD (or SSD) at every request, while FCGI remains in memory. Won't this cause rather large difference?Your OS will cache frequently used files, meaning this should not be an issue. That said, spawning a process under Windows is quite slow (because each process gets a window assigned, which takes much more effort than under linux), so using threads for a windows host is actually much faster than starting a process (which is not the case on Linux)
2) My webserver needs connection to Firebird database. DB connection takes long compared with other operations. So I'd like to keep DB connected even during idle time. This can be done only with FCGI.Database connections are (usually) not thread safe, so either you need to create access control through critical sections, which introduce a great overhead and might force serialize your theads, removing basically any advantage of threading, or you need to establish one connection per thread anyway.
Unlike Apache or Lighttpd, NGINX does not automatically spawn FCGI processes. You must start them separately. In fact, FCGI is a lot like proxying. There’s a few ways to start FCGI programs, but luckily PHP5 will auto-spawn as many as you set in the PHP_FCGI_CHILDREN environment variable.