I've made this change to one of the apps. I'll be testing with other > apps in the next days. To get it running I had to import "fcgi_fork" > from flup.server instead of simple "fcgi". > > I know this subject is way away from this group, but I'm tempted to > ask, given the quality of the info I've received here. If I setup an > app with more minspare and maxspare children than other, ¿would this > mean that the app will have more resources assigned than the other > app? > > This is a question that I'm asking since a while: how do I limit the > server resources used by every app (that is, accordingly to the "plan" > every client has paid for his app). I've already limited network > bandwidth for every app, and recently I was able to limit the > connections to the database for every app. > > So, if I assign more spare children to an app, ¿would it be that the > app is being assigned with more CPU? > > I would say no unless you have a number of CPU >= total number of possible processes from all app. That would be a really large server! minspare, maxspare are two bounds that you need to shape based on the physical resources at disposal and the need to make the app responsive. Spares stay idle but ready to answer to new requests, the more you have the better is responsiveness under variable loads. But idle processes consume memory, while running processes also consume CPU time. If you have 4 cores, you will have no more than 4 processes running in any unit of time. The O.S. kernel will try to manage all the processes requesting to run by assigning them to a CPU, by various criteria, the fact is that each time the CPU has to switch from one process to another (context switching) it has to do a lot of work. So having too many processes in the run queue compared to the number of CPUs, makes the system waste much of it's time in context switching. To assign different priorities to each application, minspare, maxspare are only a little part of a complex problem. Lighttpd can help by managing the network traffic across applications, the Linux (BSD too!) kernel has many options, to enforce limits and priorities on resource usage to a single or a group processes. The literature about this is overwhelming :-)
-- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.