[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-list
Subject:    Re: Multiple scripts versus single multi-threaded script
From:       Jeremy Sanders <jeremy () jeremysanders ! net>
Date:       2013-10-04 8:02:42
Message-ID: l2lslb$5vs$1 () ger ! gmane ! org
[Download RAW message or body]

Roy Smith wrote:

> Threads are lighter-weight.  That means it's faster to start a new
> thread (compared to starting a new process), and a thread consumes fewer
> system resources than a process.  If you have lots of short-lived tasks
> to run, this can be significant.  If each task will run for a long time
> and do a lot of computation, the cost of startup becomes less of an
> issue because it's amortized over the longer run time.

This might be true on Windows, but I think on Linux process overheads are 
pretty similar to threads, e.g.
http://stackoverflow.com/questions/807506/threads-vs-processes-in-linux

Combined with the lack of a GIL-conflict, processes can be pretty efficient.

Jeremy


-- 
https://mail.python.org/mailman/listinfo/python-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic