4,474 reputation
1724
bio website BlackMesh.com
location
age
visits member for 4 years, 6 months
seen Dec 3 at 20:52

Director of Emerging Technology at BlackMesh Managed Hosting, longtime Linux aficionado, sometime Drupal developer (and d.o sysadmin), and occasional filesystem tinkerer.


Dec
3
answered Apex ANAME / ALIAS record in Windows Server 2012 R2 DNS Manager
Dec
3
comment How might I cancel scheduled downtime on Nagios
Fair point. Deleting a downtime, however, has a far larger effect on reports, no?
Dec
2
answered How might I cancel scheduled downtime on Nagios
Nov
21
comment Mysqld.bin and php-fpm eating up all my CPU
For what it's worth, in APC's default (apc.ttl=0), it actually clears the whole cache.
Nov
18
revised rm on a directory with millions of files
Touch up the formatting a bit.
Nov
18
awarded  Caucus
Nov
6
revised SSD system disk durability?
typo
Oct
28
answered Varnish 4 Working Config (optimized) for Wordpress (default.vcl)
Oct
28
comment rm on a directory with millions of files
It's causing all that I/O simply by being more efficient, though! The globbing is all front-loaded for your example (that is, the full list of files is generated before the first rm happens), so you have relatively efficient I/O at startup from that, followed by painful, out-of-order rms that probably don't cause much I/O, but involve scandir walking the directory repeatedly (not causing I/O because that's already been loaded into block cache; see also vfs_cache_pressure). If you'd like to slow things down, ionice is an option, but I'd probably use fractional-second sleeps.
Oct
10
comment CentOS server priority of root services and non root services
Can you please expand on "it hangs the entire server and needs a hard reboot"? Does the server stop responding to SSH? The console goes dark and cannot be woken back up? Pings get dropped? Power supply catches on fire?
Oct
10
comment rm on a directory with millions of files
You're being eaten alive by globbing. How about something more like: find /u* -maxdepth 3 -mindepth 3 -type d -path '*/app/*' -name diag -print0 | xargs -0I = find = -mindepth 4 -maxdepth 4 -type d -name 'trace' -print0 | xargs -0I = find = -mindepth 1 -maxdepth 1 -name '*.tr' ? Add -delete to the last one to actually delete things; as written, it just lists what it would delete. Note that this is optimized for circumstances where you have a lot of uninteresting things in nearby directories; if that's not the case, you can simplify the logic a great deal.
Oct
10
revised rm on a directory with millions of files
Fix formatting (I guess SE changed parsing at some point; this used to work.)
Oct
7
comment nginx + varnish, optimize caching urls for ssl and not
Thanks for spotting that. Fixed!
Oct
7
revised nginx + varnish, optimize caching urls for ssl and not
Fixing the syntax error that @boernie pointed out.
Oct
6
revised nginx + varnish, optimize caching urls for ssl and not
added 266 characters in body
Oct
6
comment nginx + varnish, optimize caching urls for ssl and not
Boernie: Ah, you mean the scheme that is INSIDE of the req.url (.../http/example.com:80/... versus .../https/example.com:443/...). Code updated.
Oct
6
revised Implement HTTPS in with pfSense, Varnish and Tomcat
added 123 characters in body
Oct
6
comment Implement HTTPS in with pfSense, Varnish and Tomcat
No; Varnish doesn't speak SSL. It must be plain HTTP when it reaches Varnish (notwithstanding the CONNECT verb, but even that is HTTP, albeit weird HTTP). The most common approach is to use something like Pound or nginx to unwrap the SSL off of the HTTP before it hits Varnish. I've added a relevant link to my answer, above.
Oct
6
comment How to disable AAAA lookups?
Lastly: for what it's worth, I'd solve this by running a DNS cache on localhost (as you reference, above). It'd be a heckuva lot easier to maintain your own, hacked DNS proxy/cache than it would be to maintain a hacked version of a core system library.
Oct
6
comment How to disable AAAA lookups?
Unfortunately, as you can see from the code, there doesn't appear to be a no_inet6 option in res_setoptions(). However, as you can see from (no-)ip6-dotint, it's an easy change to add. To test the theory that it's being set by default by your distro, I'd grab the package source files and compile it once "virgin" (to confirm that the package replicates the behavior) and then add: { STRnLEN ("no-inet6"), 1, ~RES_USE_INET6 }, to the options[] array and see if the problem goes away when you set that option in resolv.conf.