-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday, 2021-04-14 at 12:34 +0200, Carlos E. R. wrote:
On 14/04/2021 07.10, Andrei Borzenkov wrote:
On 14.04.2021 01:38, Carlos E. R. wrote:
As "lazytime" current implementation delays write for 24 hours (or up to), I wonder if I can "sync" just a partition.
man 1 sync
{flush}
Well... I modified the cron job to sync and time things. logger -p cron.warning -t texpire "CER: running leafnode's texpire without ionice" logger -p cron.warning -t texpire "CER: Full sync prior to running texpire" sync logger -p cron.warning -t texpire "CER: full sync done, now running texpire" test -x /usr/sbin/texpire && su - news -c "/usr/sbin/texpire" logger -p cron.warning -t texpire "CER: finished" sync /var/spool/news/ logger -p cron.warning -t texpire "CER: and synced" sync /dev/sdc9 logger -p cron.warning -t texpire "CER: and synced /dev/sdc9" sync /dev/sdc logger -p cron.warning -t texpire "CER: and synced /dev/sdc" sync logger -p cron.warning -t texpire "CER: and full synced" Now, see what the log contains: <9.4> 2021-05-23T23:45:01.892831+02:00 Telcontar texpire - - - CER: running leafnode's texpire without ionice <9.4> 2021-05-23T23:45:01.927445+02:00 Telcontar texpire - - - CER: Full sync prior to running texpire <9.4> 2021-05-23T23:47:44.861249+02:00 Telcontar texpire - - - CER: full sync done, now running texpire <7.3> 2021-05-23T23:48:39.654533+02:00 Telcontar fetchnews 25746 - - Cannot obtain lock file, aborting. <7.3> 2021-05-23T23:52:22.666498+02:00 Telcontar fetchnews 25885 - - Cannot obtain lock file, aborting. <7.3> 2021-05-23T23:56:50.578464+02:00 Telcontar fetchnews 26013 - - Cannot obtain lock file, aborting. <7.3> 2021-05-24T00:00:43.538555+02:00 Telcontar fetchnews 26229 - - Cannot obtain lock file, aborting. <7.3> 2021-05-24T00:04:50.044474+02:00 Telcontar fetchnews 26691 - - Cannot obtain lock file, aborting. <7.3> 2021-05-24T00:08:37.679295+02:00 Telcontar fetchnews 26814 - - Cannot obtain lock file, aborting. <7.3> 2021-05-24T00:12:58.919793+02:00 Telcontar fetchnews 26939 - - Cannot obtain lock file, aborting. <7.3> 2021-05-24T00:16:27.510675+02:00 Telcontar fetchnews 27123 - - Cannot obtain lock file, aborting. <7.3> 2021-05-24T00:20:46.999665+02:00 Telcontar fetchnews 27255 - - Cannot obtain lock file, aborting. <7.3> 2021-05-24T00:24:42.812881+02:00 Telcontar fetchnews 27386 - - Cannot obtain lock file, aborting. <9.4> 2021-05-24T00:27:23.661874+02:00 Telcontar texpire - - - CER: finished <9.4> 2021-05-24T00:27:23.693867+02:00 Telcontar texpire - - - CER: and synced <9.4> 2021-05-24T00:27:57.036451+02:00 Telcontar texpire - - - CER: and synced /dev/sdc9 <9.4> 2021-05-24T00:27:57.204751+02:00 Telcontar texpire - - - CER: and synced /dev/sdc <9.4> 2021-05-24T00:29:03.812514+02:00 Telcontar texpire - - - CER: and full synced The machine was idling otherwise, I was not present. The full initial sync takes almost 3 seconds. This would sync everything done during the whole day (per lazytime mount option) The job itself takes about 45 minutes. The sync of the mount takes 2 milliseconds - so I assume it does nothing. The sync of the partition takes 34 seconds. Why the difference? They should be the same thing, at least that is what I understand from the manual. Maybe not. But the full sync takes one minute more. Either texpire exercised some other partitions, which I very much doubt, or rather the sync of /dev/sdc9 doesn't sync the entire partition. I will repeat the experiment tomorrow, with a change, to see the effect of "-f" on sync: test -x /usr/sbin/texpire && su - news -c "/usr/sbin/texpire" logger -p cron.warning -t texpire "CER: finished" sync /var/spool/news/ logger -p cron.warning -t texpire "CER: and synced" sync -f /var/spool/news/ logger -p cron.warning -t texpire "CER: and synced -f" sync /dev/sdc9 [...] <9.4> 2021-05-24T23:45:01.071842+02:00 Telcontar texpire - - - CER: running leafnode's texpire without ionice <9.4> 2021-05-24T23:45:01.099237+02:00 Telcontar texpire - - - CER: Full sync prior to running texpire <9.4> 2021-05-24T23:45:07.163680+02:00 Telcontar texpire - - - CER: full sync done, now running texpire <7.3> 2021-05-24T23:48:09.182450+02:00 Telcontar fetchnews 10367 - - Cannot obtain lock file, aborting. <7.3> 2021-05-24T23:52:09.386434+02:00 Telcontar fetchnews 10552 - - Cannot obtain lock file, aborting. <7.3> 2021-05-24T23:56:09.767140+02:00 Telcontar fetchnews 10751 - - Cannot obtain lock file, aborting. <7.3> 2021-05-25T00:00:09.952507+02:00 Telcontar fetchnews 10995 - - Cannot obtain lock file, aborting. <7.3> 2021-05-25T00:04:22.073284+02:00 Telcontar fetchnews 11470 - - Cannot obtain lock file, aborting. <7.3> 2021-05-25T00:08:27.606159+02:00 Telcontar fetchnews 11628 - - Cannot obtain lock file, aborting. <7.3> 2021-05-25T00:12:40.215851+02:00 Telcontar fetchnews 11770 - - Cannot obtain lock file, aborting. <7.3> 2021-05-25T00:16:36.626945+02:00 Telcontar fetchnews 11979 - - Cannot obtain lock file, aborting. <7.3> 2021-05-25T00:20:14.068475+02:00 Telcontar fetchnews 12153 - - Cannot obtain lock file, aborting. <7.3> 2021-05-25T00:24:52.732133+02:00 Telcontar fetchnews 12305 - - Cannot obtain lock file, aborting. <7.3> 2021-05-25T00:28:49.968242+02:00 Telcontar fetchnews 12495 - - Cannot obtain lock file, aborting. <9.4> 2021-05-25T00:31:57.558573+02:00 Telcontar texpire - - - CER: finished <9.4> 2021-05-25T00:31:57.591806+02:00 Telcontar texpire - - - CER: and synced <9.4> 2021-05-25T00:34:25.794323+02:00 Telcontar texpire - - - CER: and synced -f <9.4> 2021-05-25T00:34:27.029827+02:00 Telcontar texpire - - - CER: and synced /dev/sdc9 <9.4> 2021-05-25T00:34:28.414938+02:00 Telcontar texpire - - - CER: and synced /dev/sdc <9.4> 2021-05-25T00:34:38.613719+02:00 Telcontar texpire - - - CER: and full synced Pre-job sync: 6 seconds. Job: about 45 minutes. The sync of the mount takes 332 milliseconds. The sync -f of the mount takes 2.68 minutes! This is the grunt sync job. The sync of the partition takes 2 seconds. Something was missing from the previous command? The sync of everything takes 10 seconds. Again, something was not synced. Or the computer did other busy things while texpire was running. - -- Cheers, Carlos E. R. (from openSUSE 15.2 x86_64 at Telcontar) -----BEGIN PGP SIGNATURE----- iHoEARECADoWIQQZEb51mJKK1KpcU/W1MxgcbY1H1QUCYKxQoRwccm9iaW4ubGlz dGFzQHRlbGVmb25pY2EubmV0AAoJELUzGBxtjUfViGcAnRcUC0bol6MUXjiXXykD f5YBGqsuAJ94dlBj270O2lu5VUMyKM9BCvyPDw== =fK7J -----END PGP SIGNATURE-----