[Lxc-users] Cron jobs in containers..

Gordon Henderson gordon at drogon.net
Thu Jul 8 17:46:20 UTC 2010


Sort of thinking out loud, but looking for suggestions/ideas ...

So I have a host with 20 containers and each of these 'servers' runs cron 
jobs - and one of them is to do an MRTG run every 5 minutes, so every 5 
minutes, ka-chung, 20 jobs start at the same time which sort of has a bit 
of a crowbarring effect...

That's probably the worst example, but there are others - log-file 
rotations, locate, updatedb, and so on.. (probably not much impact as 
they're run "out of hours" as it were...)

And I'm sure this isn't just an issue with LXC - it must happen in other 
virtualisation systems too (KVM, Xen, etc.)

So I'm wondering about getting the host to do some of it which might 
serialise it - log-file rotations - it can probably manage, but sending a 
signal to syslog in each container? (I guess that's permissible from the 
host?)

And I guess there are some things it can't see - e.g. the /proc partition 
in each container to read network statistics and so on...

And of-course, maybe it's not that big a problem - I've not actually tried 
this with 20 containers yet... It'll still require the same over all 
number of cpu cycles whether something is run on the host over all 
containers, or run in each container, but hopefully with less CPU 
scheduling getting in the way?

Anyway - any thoughts, ideas - even if you think I'm worrying over nothing 
are welcome!

Cheers

Gordon




More information about the lxc-users mailing list