Forking creates a new process with the same memory usage as the parent process. Since ruby doesn't give memory back to the operating system, this can cause the calling process to bloat and consume much more memory than is necessary.
By using spawn, the new process consumes far less memory and returns it to the operating system once it has completed. This is very beneficial for long-running processes such as rails app servers.
Forking creates a new process with the same memory usage as the parent process. Since ruby doesn't give memory back to the operating system, this can cause the calling process to bloat and consume much more memory than is necessary.
By using spawn, the new process consumes far less memory and returns it to the operating system once it has completed. This is very beneficial for long-running processes such as rails app servers.