Re: Jailed periodic daily scripts smashing CPU

2017-02-17 Thread Dustin Wenz
If I needed to go down the road of spreading out the daily maintenance over a 
longer period of time, I'd probably use your solution of building in a delay 
based on the jail id, or possibly Guy Tabrar's extreme jitter example.

The pkg-backup job appears somewhat flawed, in my view. The xz compressor is 
totally CPU bound for a moderate number of jails . Sure, running it at low 
priority isn't as cache friendly, but it's certainly better then the host 
becoming unresponsive. The other issue is that in most cases the package 
archive doesn't change, and so running a daily backup without checking for 
changes is wasteful. In my case, ZFS handles all the rolling backups that I 
could ever need, so using pkg-backup for that purpose is redundant.

- .Dustin

> On Feb 16, 2017, at 5:44 PM, Walter Cramer  wrote:
> 
> Adding something like:
> 
> 'sleep $(( $(sysctl -n security.jail.param.jid) * 15 )) && '
> 
> in front of more resource-intensive commands in /etc/crontab can reliably 
> spread out the load from a larger number of jails.
> 
> (But if you start and stop jails frequently enough to spread out the current 
> list of jail id numbers, this method degrades.)
> 
> Low priority for 'periodic daily' jobs might not help much, due to disk 
> saturation, CPU cache thrashing, etc.
> -Walter
> 
> On Thu, 16 Feb 2017, Dustin Wenz wrote:
> 
>> The biggest offender that I see is 
>> /usr/local/etc/periodic/daily/411.pkg-backup
>> 
>> During the high CPU event, my process list contains hundreds of these:
>> 
>>  83811  -  RJ 0:03.42 xz -c
>>  83816  -  S  0:00.02 /usr/local/sbin/pkg shell .dump
>>  83818  -  SJ 0:00.02 /usr/local/sbin/pkg shell .dump
>>  83820  -  SJ 0:00.03 /usr/local/sbin/pkg shell .dump
>>  83824  -  RJ 0:03.41 xz -c
>>  83831  -  RJ 0:03.58 xz -c
>> 
>> I could probably get away with disabling that in my case.
>> 
>> However, instead of jitter, I think I'd prefer if the periodic jobs ran at a 
>> lower priority than my user processes. Either through nice, or idprio. I 
>> want them to get done as fast as possible, but I don't want them to affect 
>> my application.
>> 
>>  - .Dustin
>> 
>> 
>>> On Feb 16, 2017, at 4:20 PM, Alan Somers  wrote:
>>> 
>>> Is the problem caused by newsyslog or by the periodic scripts?
>>> Newsyslog normally runs from cron directly, not through periodic.  In
>>> any case, here are a few suggestions:
>>> 1) Turn on cron jitter, as you suggested.  Even if 60s isn't enough,
>>> it can't hurt.
>>> 2) Try gz compression instead of xz compression to see if it's faster
>>> 3) Manually edit the jails' /etc/crontab files to hardcode some
>>> variability into their newsyslog and/or periodic run times
>>> 4) If the problem is actually being caused by periodic instead of
>>> newsyslog, tell me which script it is and how much jitter you want.  I
>>> am coincidentally changing how periodic manages jitter right now.
>>> 
>>> -Alan
>>> 
>>> On Thu, Feb 16, 2017 at 2:47 PM, Dustin Wenz  wrote:
 I have a number of servers with roughly 60 jails running on each of them. 
 On these hosts, I've had to disable the periodic security scans due to 
 overly high disk load when they run (which is redundant in jails anyway). 
 However, I still have an issue at 3:01am where the CPU is consumed by 
 dozens of 'xz -c' processes. This is apparently daily log rolling, which I 
 can't exactly disable.
 
 The effect is that our processing applications experience a major slowdown 
 for about 15 seconds every morning, which is just enough that it's 
 starting to get people's attention.
 
 What is the best way to mitigate this? I'm aware of the cron jitter 
 feature, but I'm not sure of the 60-second jitter maximum would be enough 
 (especially if I wanted to start utilizing more jails).
 
   - .Dustin
 ___
 freebsd-stable@freebsd.org mailing list
 https://lists.freebsd.org/mailman/listinfo/freebsd-stable
 To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
>> 
>> ___
>> freebsd-stable@freebsd.org mailing list
>> https://lists.freebsd.org/mailman/listinfo/freebsd-stable
>> To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
> 
> ___
> freebsd-stable@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"

___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Calling ATM NIC users: en(4), fatm(4), hatm(4), patm(4)

2017-02-17 Thread Brooks Davis
Our current ATM stack supports a small number of NICs that were
current in the late 90s[0].  None of them have been manufactured in a
long time and while you can buy hatm(4) devices on e-bay, it's
increasingly difficult to find a motherboard that will accept them.

I'd like to propose removing support for these NICs along with the
remaining ATM stack in FreeBSD 12.  This will give any existing users
a supported OS until at least September 30, 2021 per our published EOL
date for FreeBSD 11.

Would removal on this schedule cause you realistic hardship?  If so,
please let us know.

-- Brooks

[0] 1997 press release for the most advanced ATM NIC we support
http://www.prnewswire.com/news-releases/fore-systems-introduces-industrys-most-advanced-atm-adapter-for-enterprise-networking-77407267.html


signature.asc
Description: PGP signature