I noticed that we do not have some automatic way of scrubbing a ZFS pool periodically. A quick poll on fs@ revealed, that there is interest in something like this. So I took a little bit of time to write a periodic daily script which checks if the last scrub is X days ago and scrubs a pool accordingly. The script has options to scrub all pools, or just a specific subset. It also allows to specify a time-interval between scrubs for each pool with different levels of fall-back (if no pool-specific interval is set, the default interval is used, which is set to 30 days if no other default interval is specified).
The discussion about this is happening over at fs@, so go there and have a look for the CFT (with a link to the WIP of the script) and the discussion if you are interested.
So far there are some minor details to sort out (and a little bit of documentation to write) before I can commit it… probably next week.
GD Star Rating
loading…
GD Star Rating
loading…
Brendan Gregg of Sun Oracle fame made a good explanation how to visualize latency to get a better understanding of what is going on (and as such about how to solve bottlenecks). I have seen all this already in various posts in his blog and in the Analytics package in an OpenStorage presentation, but the ACM article summarizes it very good.
Unfortunately Analytics is AFAIK not available in OpenSolaris, so we can not go out and adapt it for FreeBSD (which would probably require to port/implement some additional dtrace stuff/probes). I am sure something like this would be very interesting to all those companies which use FreeBSD in an appliance (regardless if it is a storage appliance like NetApp, or a network appliance like a Cisco/Juniper router, or anything else which has to perform good).
GD Star Rating
loading…
GD Star Rating
loading…
The discussion about direct and indirect dependencies is coming up again on the FreeBSD mailinglists. Seems I should make some blog post about it, maybe it makes this topic more findable than my postings in the mailinglists.
Some definitions:
- A direct dependency from A to B is when program/port A uses symbols from library/port B.
- An indirect dependency from A to C is when program/port A uses symbols from library/port B but no symbols from library/port C, and library/port B uses symbols from library/port C.
- An explicit dependency from A to C is when it is a direct or indirect dependency A to C, and when the compiler-time-linker added an explicit reference to C to the program/lib of A.
Ideally we have no indirect dependencies in the explicit dependencies, only direct dependencies. Unfortunately in reality we also have indirect dependencies there. This has at least two causes:
- libtool (at least 1.x) does not (or was not) come with a hint on FreeBSD, which tells that the run-time-linker is recursively resolving dependencies.
- Some pkg-config setups list indirect dependencies as explicit dependencies (IIRC it depends if Requires.private and/or Libs.private is used in the .pc file or not; if it is used, there should be no indirect dependency appear from this software, but I am not 100% sure about this).
Three years ago I wrote /usr/ports/Tools/scripts/explicit_lib_depends.sh, it looks at the files of a given port (it needs to be installed), and prints out explicit dependencies. Because of the indirect dependencies which could be listed there, this list is not a list of ports which are real dependencies from a source code point of view, but it reflects the link-time reality. If a port C shows up there, the port which is checked needs to be rebuild in case the ABI of library/port C changes.
GD Star Rating
loading…
GD Star Rating
loading…
After all the big-impact commits (Gnome/gettext/KDE/X11/…) have settled now, I took the time to update audio/lame (I identified more than 100 ports with an (implicit) dependency on lame, 45 of them needed a portrevision bump; if I forgot/overlooked some, bump the revision yourself or notify me please). That is the first update of my ports where miwi@ did not beat me in committing an update since a year (he has implicit approval to do anything he wants with my ports).
I can be happy that he is/was this fast (and that we have such a productive and efficient committer), or I can be sad that I do not have the time anymore to be faster than I am with such things… or both. Hmmm… I think I will go the happy way.
GD Star Rating
loading…
GD Star Rating
loading…
I have an old system (only the hardware, it runs –current) which reboots itself from time to time (mostly during the daily periodic(8) run, but also during a lot of compiling (portupgrade)). There is no obvious reason (no panic) why it is doing this. It could be that there is some hardware defect, or something else. It is not important enough to get a high enough priority that I try hard to analyze the problem with this machine. The annoying part is, that sometimes after a restart apache does not start. So if this happens, the solution is to login and start the webserver. If the webserver would start each time, nearly nobody would detect the reboot (root gets an EMail on each reboot via an @reboot crontab entry).
My pragmatic solution (for services started via a good rc.d script which has a working status command) is a crontab entry which checks periodically if it is running and which restarts the service if not. As an example for apache and an interval of 10 minutes:
*/10 * * * * /usr/local/etc/rc.d/apache22 status >/dev/null 2>&1 || /usr/local/etc/rc.d/apache22 restart
For the use case of this service/machine, this is enough. In case of a problem with the service, a mail with the restart output would arrive each time it runs, else only after a reboot for which the service did not restart.
GD Star Rating
loading…
GD Star Rating
loading…