Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Oct 2023 17:07:13 +0200
From:      Guido Falsi <mad@madpilot.net>
To:        freebsd-stable@freebsd.org
Subject:   Re: periodic daily takes a very long time to run (14-stable)
Message-ID:  <b517b419-3583-4062-b6d8-aecc022e4081@madpilot.net>
In-Reply-To: <ZTvMODY-mcBImHZP@int21h>
References:  <ZTuNvVMW_XG3mZKU@int21h> <1122335317.4913.1698407124469@localhost> <ZTuyXPjddEPqh-bi@int21h> <794932758.6659.1698413675475@localhost> <ZTvMODY-mcBImHZP@int21h>

next in thread | previous in thread | raw e-mail | index | archive | help
On 27/10/23 16:42, void wrote:
> On Fri, Oct 27, 2023 at 03:34:35PM +0200, Ronald Klop wrote:
>> So if my observation is right it might be interesting to find out what 
>> is writing. 
> 
> would ktrace and/or truss be useful? something else? The truss -p output 
> of the
> find PID produces massive amounts of output, all like this:
> 
> fstatat(AT_FDCWD,"5e70d5f895ccc92af6a7d5226f818b-81464.o",{ 
> mode=-rw-r--r-- ,inode=367004,size=10312,blksize=10752 
> },AT_SYMLINK_NOFOLLOW) = 0 (0x0)
> 
> with the filename changing each time
> 
> (later...)
> 
> that file is in ccache!!!
> 
> locate 5e70d5f895ccc92af6a7d5226f818b-81464.o
> /var/cache/ccache/f/5/5e70d5f895ccc92af6a7d5226f818b-81464.o
> 
> maybe if I can exclude that dir (and /usr/obj) it'll lessen the periodic 
> runtime.
> But i don't know yet whats calling find(1) when periodic daily runs. If 
> I can, I might be able to tell it not to walk certain heirarchies.


I stumbled on a similar problem. Periodic trying to scan huge ccache 
directories.

The script doing that was locate database indexing in weekly. Not sure 
if you're having the same issue, but this could give you ideas.

My fix was:

weekly_locate_enable="YES"
PRUNEPATHS="/tmp, /usr/tmp, /var/tmp, /var/db/portsnap, 
/var/db/freebsd-update, /dumpster/ccache, /poudriere"

There is no advantage in locate indexing ccache, and I don't want it to 
cache poudriere either.

(mhmm, that portsnap directory looks like a leftover from the past...)


Also, unluckily poudriere in modern times does a lot of disk IO (old 
plain ports building too BTW) and it is really best, especially for SSD 
media, to have enough ram to run the full build there. Will really save 
on SSD writes.


-- 
Guido Falsi <mad@madpilot.net>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b517b419-3583-4062-b6d8-aecc022e4081>