aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2021-07-30 13:57:07 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2021-07-30 13:57:07 -0400
commit52e6d95da40fa5d19d7cc43d1f133dfc51240ba4 (patch)
tree05bc5325bd896a9f71cda57abe426e2e9c40e465
parentddb227b52b24d746df2e67429c4a346991f458df (diff)
downloadgrokmirror-52e6d95da40fa5d19d7cc43d1f133dfc51240ba4.tar.gz
Adjust config and mangpage for grok-pi-indexer
We've changed a few things around, so reflect this in the documentation. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r--grokmirror.conf4
-rw-r--r--man/grok-pi-indexer.129
-rw-r--r--man/grok-pi-indexer.1.rst20
3 files changed, 43 insertions, 10 deletions
diff --git a/grokmirror.conf b/grokmirror.conf
index 91e5af6..a199581 100644
--- a/grokmirror.conf
+++ b/grokmirror.conf
@@ -147,14 +147,14 @@ post_update_hook =
# to make sure that certain jobs only run when there were fresh clones
# and they have all completed cloning.
# You can define multiple hooks if you separate them by newline+whitespace.
-#post_clone_complete_hook = /usr/bin/grok-pi-indexer -c /etc/public-inbox/config init
+#post_clone_complete_hook = /usr/bin/grok-pi-indexer -c /etc/public-inbox/config -j 4 --no-fsync init
post_clone_complete_hook =
#
# A hook to execute after the work queue is completely cleared, in case
# you want to run some tasks only after all updates are completed. Does not
# receive any arguments or stdin contents.
# You can define multiple hooks if you separate them by newline+whitespace.
-#post_work_complete_hook = /usr/bin/grok-pi-indexer -c /etc/public-inbox/config extindex
+#post_work_complete_hook = /usr/bin/grok-pi-indexer -c /etc/public-inbox/config -j 4 --no-fsync extindex
post_work_complete_hook =
#
# Should we purge repositories that are not present in the remote
diff --git a/man/grok-pi-indexer.1 b/man/grok-pi-indexer.1
index 2e05dce..abe74b3 100644
--- a/man/grok-pi-indexer.1
+++ b/man/grok-pi-indexer.1
@@ -33,7 +33,12 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
.SH SYNOPSIS
.INDENT 0.0
.INDENT 3.5
-grok\-pi\-indexer [\-h] [\-v] \-c PICONFIG [\-l LOGFILE] {init,update,extindex}
+.INDENT 0.0
+.TP
+.B grok\-pi\-indexer [\-h] [\-v] \-c PICONFIG [\-l LOGFILE] [\-L INDEXLEVEL]
+[\-j JOBS] [\-\-no\-fsync]
+{init,update,extindex} ...
+.UNINDENT
.UNINDENT
.UNINDENT
.SH DESCRIPTION
@@ -67,10 +72,13 @@ include = /git/*
/tools/*
refresh = 60
purge = no
-post_clone_complete_hook = /usr/bin/grok\-pi\-indexer \-c /etc/public\-inbox/config init
+# If you have many CPUs and fast disks, you may want to raise \-j to a higher number
+# You can also set publicinbox.indexBatchSize to a higher number in PI_CONFIG if
+# you have lots of RAM, but probably not higher than 256m
+post_clone_complete_hook = /usr/bin/grok\-pi\-indexer \-c /etc/public\-inbox/config \-j 2 \-\-no\-fsync init
post_update_hook = /usr/bin/grok\-pi\-indexer \-c /etc/public\-inbox/config update
# Uncomment if you\(aqve defined any [extindex] sections
-#post_work_complete_hook = /usr/bin/grok\-pi\-indexer \-c /etc/public\-inbox/config extindex
+#post_work_complete_hook = /usr/bin/grok\-pi\-indexer \-c /etc/public\-inbox/config \-j 2 \-\-no\-fsync extindex
[fsck]
frequency = 30
@@ -99,6 +107,15 @@ Location of the public\-inbox configuration file (default: None)
.TP
.BI \-l \ LOGFILE\fR,\fB \ \-\-logfile \ LOGFILE
Log activity in this log file (default: None)
+.TP
+.BI \-L \ INDEXLEVEL\fR,\fB \ \-\-indexlevel \ INDEXLEVEL
+Indexlevel to use with public\-inbox (full, medium, basic) (default: full)
+.TP
+.BI \-j \ JOBS\fR,\fB \ \-\-jobs \ JOBS
+The \-\-jobs parameter to pass to public\-inbox (default: None)
+.TP
+.B \-\-no\-fsync
+Use \-\-no\-fsync when invoking public\-inbox (default: False)
.UNINDENT
.UNINDENT
.UNINDENT
@@ -107,7 +124,11 @@ Log activity in this log file (default: None)
.IP \(bu 2
grok\-pull(1)
.IP \(bu 2
-git(1)
+public\-inbox\-init(1)
+.IP \(bu 2
+public\-inbox\-index(1)
+.IP \(bu 2
+public\-inbox\-extindex(1)
.UNINDENT
.SH SUPPORT
.sp
diff --git a/man/grok-pi-indexer.1.rst b/man/grok-pi-indexer.1.rst
index 052f319..f52fede 100644
--- a/man/grok-pi-indexer.1.rst
+++ b/man/grok-pi-indexer.1.rst
@@ -13,7 +13,9 @@ Hook script for indexing mirrored public-inbox repos
SYNOPSIS
--------
- grok-pi-indexer [-h] [-v] -c PICONFIG [-l LOGFILE] {init,update,extindex}
+ grok-pi-indexer [-h] [-v] -c PICONFIG [-l LOGFILE] [-L INDEXLEVEL]
+ [-j JOBS] [--no-fsync]
+ {init,update,extindex} ...
DESCRIPTION
-----------
@@ -42,10 +44,13 @@ the following grokmirror configuration file to mirror lore.kernel.org::
/tools/*
refresh = 60
purge = no
- post_clone_complete_hook = /usr/bin/grok-pi-indexer -c /etc/public-inbox/config init
+ # If you have many CPUs and fast disks, you may want to raise -j to a higher number
+ # You can also set publicinbox.indexBatchSize to a higher number in PI_CONFIG if
+ # you have lots of RAM, but probably not higher than 256m
+ post_clone_complete_hook = /usr/bin/grok-pi-indexer -c /etc/public-inbox/config -j 2 --no-fsync init
post_update_hook = /usr/bin/grok-pi-indexer -c /etc/public-inbox/config update
# Uncomment if you've defined any [extindex] sections
- #post_work_complete_hook = /usr/bin/grok-pi-indexer -c /etc/public-inbox/config extindex
+ #post_work_complete_hook = /usr/bin/grok-pi-indexer -c /etc/public-inbox/config -j 2 --no-fsync extindex
[fsck]
frequency = 30
@@ -58,17 +63,24 @@ the following grokmirror configuration file to mirror lore.kernel.org::
OPTIONS
-------
+
-h, --help show this help message and exit
-v, --verbose Be verbose and tell us what you are doing (default: False)
-c PICONFIG, --pi-config PICONFIG
Location of the public-inbox configuration file (default: None)
-l LOGFILE, --logfile LOGFILE
Log activity in this log file (default: None)
+ -L INDEXLEVEL, --indexlevel INDEXLEVEL
+ Indexlevel to use with public-inbox (full, medium, basic) (default: full)
+ -j JOBS, --jobs JOBS The --jobs parameter to pass to public-inbox (default: None)
+ --no-fsync Use --no-fsync when invoking public-inbox (default: False)
SEE ALSO
--------
* grok-pull(1)
-* git(1)
+* public-inbox-init(1)
+* public-inbox-index(1)
+* public-inbox-extindex(1)
SUPPORT
-------