Re: [systemd-devel] /etc/initscript equivalent for systemd?

2011-05-05 Thread c...@endlessnow.com
I think the right place is probably cgroups... I am surprised ulimits and 
cgroups hasn't come up before or maybe I am just not finding it.  
Sent from my HTC smartphone on the Now Network from Sprint!

- Reply message -
From: "Lennart Poettering" 
Date: Thu, May 5, 2011 4:31 am
Subject: [systemd-devel] /etc/initscript equivalent for systemd?
To: 
Cc: 


On Tue, 03.05.11 11:05, [email protected] ([email protected]) wrote:

> In sysvinit, at least on SLES and RHEL, you could use /etc/initscript as a
> mechansim to get "shell" control things like ulimits to take hold system
> wide, since /etc/initscript was invoked as a wrapper around all init
> scripts.
> 
> So.. where do we set system wide ulimits at in systemd?  Sounds like it
> has gotten more complicated (??).
> 
> Forgive me if this is a FAQ-like question... I didn't seen anything using
> Google to search the archives.

You can set the cpu affinity and cgroups default in system.conf (see
systemd.conf(5)). We can add more options like this if needed.

But quite frankly -- like Kay -- I'd like to hear the uses cases before
we do anything more in that direction.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
___
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] readahead: read /usr files last for rotational media, skip /var

2011-09-30 Thread c...@endlessnow.com
The idea that separate / from /usr is archaic or wrong is incorrect. Just 
saying... Think about it for a bit... Because if you still believe that to be 
true...then it is /usr that must go away.  Sure, we are like lemmings and we 
follow whoever we think should lead...I'm just saying we need to be careful 
with making broad statements just because it's some kind of new tradition.  
Isn't one of the ideas of systemd is that sysv init wasn't good enough?  Just 
seems strange to hold onto bad premise because of the need to support bad 
assumptions... Especially when advocating change to accomodate systemd.  Just 
an observation It makes one seem hypocritical.

- Reply message -
From: "Kay Sievers" 
To: "Paolo Bonzini" 
Cc: 
Subject: [systemd-devel] [PATCH] readahead: read /usr files last for rotational 
media, skip /var
Date: Fri, Sep 30, 2011 6:32 am


On Fri, Sep 30, 2011 at 13:18, Paolo Bonzini  wrote:
> On 09/30/2011 01:05 PM, Tom Gundersen wrote:
>>
>> I think a better heuristic is needed if we want to plan for
>> the future. If I understand correctly, there seems to be a shift
>> towards moving stuff from /lib, /bin and /sbin to /usr/lib, /usr/bin
>> and /usr/sbin, respectively (and requiring /usr to be mounted when
>> systemd starts). That means that at some point in the future we will
>> be back to square one.

Yes, that's right:
  http://www.freedesktop.org/wiki/Software/systemd/separate-usr-is-broken
  https://fedoraproject.org/wiki/Features/UsrMove

> Requiring /usr to be mounted when systemd starts would sound like a very
> strange thing to me.

There is nothing in systemd requiring that, but in fact, booting with
an empty /usr is not supported and goes wrong all over the place. And
that will not be fixed, or worked around. The split between / and /usr
is a weird UNIX heritage that makes no sense on Linux today, and the
plan is to move all stuff back to /usr, where it belongs, over time.

> And I'm not even that much of a Unix maven.  If there
> is any place where a barrier can be placed, that is /usr.

I don't mind having some rules to prioritize things like kernel
modules or some config files, but keying of the /usr directory makes
not much sense to have in the upstream code.

> So much that I've
> been thinking about adding "virtual" mount units that become active as soon
> as any directory above it is mounted.  This way, units that require /usr
> could be made to depend on usr.mount.

No, this will all not work for any non-trivial (like a web server or
something very simple) setup. The tools from /usr are needed to boot
up for any modern system.

> In fact, I think it is very wrong to make binfmt load from
> /usr/lib/binfmt.d.  Personally, I would have made it /lib/systemd/binfmt.d
> (likewise for tmpfiles).

There should be no early boot tools that need binfmt.

> If you really want to use /usr, there should be two instances of
> binfmt/tmpfiles/etc. one that is activated very early (loading from /etc and
> /lib) and one that is activated after remote-fs.target (in the lack of
> usr.mount---yes, remote!) that loads from /usr/lib and /usr/local/lib.

It's not needed, the stuff in the rootfs will go away over time and
the top-level dirs there will be replaced with compat symlinks.

> As I said, the heuristic is not perfect.  However, it is a huge improvement
> and right now the only /usr files that my system needs early are
> binfmt/tmpfiles configuration, plus some coreutils that perhaps should be
> moved to bin (id, tr, getopt).

Nope, all should be in /usr, nothing in the rootfs. The split makes
almost zero sense these days, creates a ton of problems and provides
no real benefit.

>> Also, I'm not sure if I understand your suggestion that /var should be
>> ignored. In particular I think /var/tmp would be useful to readahead
>> (albeit probably as one of the last things to do).
>
> You could add that as a third group, after / and /usr.  The patch makes that
> kind of extensibility very easy.

Rules which files to prioritize *might* make sense, sorting by
top-level dir doesn't really.

>> Lots of
>> pregenerated stuff that rarely changes is stored there that we want to
>> load as quickly as possible at boot (e.g. kde's caches).
>
> Yes, /var/tmp is part of why I omitted that part of the patch (despite
> leaving it by mistake in the subject).  However, because I use GNOME :) my
> /.readahead doesn't have anything from /var/tmp; only from /var/log.
>  Perhaps /var/log should be ignored instead.

Kay
___
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel
___
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] readahead: read /usr files last for rotational media, skip /var

2011-10-10 Thread c...@endlessnow.com
You are thinking of a scenario that you believe is the most important... 
Nothing wrong, just saying your making some general assumptions.

- Reply message -
From: "Lennart Poettering" 
To: "[email protected]" 
Cc: 
Subject: [systemd-devel]  [PATCH] readahead: read /usr files last for 
rotational media, skip /var
Date: Mon, Oct 10, 2011 7:14 pm


On Fri, 30.09.11 20:56, [email protected] ([email protected]) wrote:

> The idea that separate / from /usr is archaic or wrong is
> incorrect. Just saying... Think about it for a bit... Because if you
> still believe that to be true...then it is /usr that must go away.

The thing one cannot underline enough is that right now you cannot
operate on the static, vendor-shipped, read-only data in a single
command. But you need exactly that for handling OS snapshots, and for
doing proper state-less systems. Why? because taking individual
snapshots of /bin, /sbin, /lib/, /lib64, /usr is not atomic, but taking
one of /usr alone is.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
___
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel