aboutsummaryrefslogtreecommitdiffstats
path: root/benchmark/run
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@debian.org>2025-04-26 18:24:46 +0200
committerGuilhem Moulin <guilhem@debian.org>2025-04-26 18:24:46 +0200
commit822f251cd94468a2ab305f46078c9f3e38b68b5f (patch)
tree2ec291885cc3db4c1f15445557b0f57c223f6931 /benchmark/run
parent6efe479ce30432045a099c4624455f152fa19ba3 (diff)
parentd3bcc2e368e7399af664812cbd67df1dc827d58b (diff)
Merge tag 'v0.5.8' into debian/latest
Release version 0.5.8
Diffstat (limited to 'benchmark/run')
-rwxr-xr-xbenchmark/run39
1 files changed, 22 insertions, 17 deletions
diff --git a/benchmark/run b/benchmark/run
index 650270a..dd30bdc 100755
--- a/benchmark/run
+++ b/benchmark/run
@@ -140,15 +140,19 @@ jail /usr/sbin/dovecot -c"/dev/shm/dovecot/config"
install -onobody -gnogroup -m0600 /dev/null \
"$ROOTDIR/dev/shm/dovecot/users"
PASSWORD="$(xxd -l16 -p </dev/urandom)"
-printf "%s:%s:::::\\n" "user" "$PASSWORD" \
+printf "%s:%s::::%s:\\n" "user" "$PASSWORD" "/dev/shm/vmail/user" \
>"$ROOTDIR/dev/shm/dovecot/users"
# install user configuration for Dovecot, interimap, and offlineimap
cat >"$ROOTDIR/dev/shm/nobody/.dovecot.conf" <<-EOF
+ dovecot_config_version = 2.4.0
+ dovecot_storage_version = 2.4.0
log_path = /dev/null
- mail_home = /dev/shm/nobody
- mail_location = maildir:~/Maildir
ssl = no
+ mail_home = /dev/shm/nobody
+ mail_driver = maildir
+ mail_path = ~/Maildir
+ mailbox_list_index = yes
EOF
install -onobody -gnogroup -Dm0700 --directory \
@@ -222,18 +226,19 @@ prepare() {
done
# convert to mdbox
- jail doveadm -c"/dev/shm/dovecot/config" -omail_location="maildir:~/maildir" \
- sync "mdbox:~/mail.back"
+ jail doveadm -c"/dev/shm/dovecot/config" -omail_driver="maildir" -omail_path="~/maildir" \
+ sync --no-userdb-lookup "mdbox:~/mail.back"
jail rm -rf -- "$maildir"
# expunge 20% and purge
for m in "${!MAILBOXES[@]}"; do
n="${MAILBOXES["$m"]}"
seqs="$(shuf -n $((n/5)) -i"1-$n")"
- jail doveadm -c"/dev/shm/dovecot/config" -omail_location="mdbox:~/mail.back" \
- expunge mailbox "$m" "${seqs//$'\n'/,}"
+ jail doveadm -c"/dev/shm/dovecot/config" -omail_driver="mdbox" -omail_path="~/mail.back" \
+ expunge --no-userdb-lookup mailbox "$m" "${seqs//$'\n'/,}"
done
- jail doveadm -c"/dev/shm/dovecot/config" -omail_location="mdbox:~/mail.back" purge
+ jail doveadm -c"/dev/shm/dovecot/config" -omail_driver="mdbox" -omail_path="~/mail.back" \
+ purge --no-userdb-lookup
}
# populate a clientn from backup mailstore mdbox:~/mail.back (copied to
@@ -250,8 +255,8 @@ populate() {
# force dovecot to index and compute the state, otherwise the first
# thing to query might be disadvantaged
- jail doveadm -c"/dev/shm/dovecot/config" index "INBOX"
- jail doveadm -c"/dev/shm/dovecot/config" mailbox status "all" "*" >/dev/null
+ jail doveadm -c"/dev/shm/dovecot/config" index --no-userdb-lookup "INBOX" 2>/dev/null
+ jail doveadm -c"/dev/shm/dovecot/config" mailbox status --no-userdb-lookup "all" "*" >/dev/null
u="local"
# initial configuration
@@ -395,9 +400,9 @@ activity2() {
deliver "mailbox2" <"$ROOTDIR/tmp/msg2"
deliver "mailbox3" <"$ROOTDIR/tmp/msg3"
# intentionally modify the remote only because not all local backend speak IMAP
- jail doveadm -c"/dev/shm/dovecot/config" expunge mailbox "mailbox3" "1:2"
- jail doveadm -c"/dev/shm/dovecot/config" expunge mailbox "mailbox4" "1,3"
- jail doveadm -c"/dev/shm/dovecot/config" expunge mailbox "mailbox5" "*"
+ jail doveadm -c"/dev/shm/dovecot/config" expunge --no-userdb-lookup mailbox "mailbox3" "1:2"
+ jail doveadm -c"/dev/shm/dovecot/config" expunge --no-userdb-lookup mailbox "mailbox4" "1,3"
+ jail doveadm -c"/dev/shm/dovecot/config" expunge --no-userdb-lookup mailbox "mailbox5" "*"
}
for n in 100 1000 10000; do
@@ -489,14 +494,14 @@ while [ $(date +%s) -lt $timeout ]; do
n="$(shuf -n1 -i1-100)"
if [ $n -le 5 ]; then
# expunge a random message on the remote
- read guid uid < <(jail doveadm -c"/dev/shm/dovecot/config" search all | shuf -n1)
- jail doveadm -c"/dev/shm/dovecot/config" expunge mailbox-guid "$guid" uid "$uid"
+ read guid uid < <(jail doveadm -c"/dev/shm/dovecot/config" search --no-userdb-lookup all | shuf -n1)
+ jail doveadm -c"/dev/shm/dovecot/config" expunge --no-userdb-lookup mailbox-guid "$guid" uid "$uid"
fi
n="$(shuf -n1 -i1-100)"
if [ $n -le 10 ]; then
# mark a random message as seen
- read guid uid < <(jail doveadm -c"/dev/shm/dovecot/config" search all | shuf -n1)
- jail doveadm -c"/dev/shm/dovecot/config" flags add "\\Seen" mailbox-guid "$guid" uid "$uid"
+ read guid uid < <(jail doveadm -c"/dev/shm/dovecot/config" search --no-userdb-lookup all | shuf -n1)
+ jail doveadm -c"/dev/shm/dovecot/config" flags add --no-userdb-lookup "\\Seen" mailbox-guid "$guid" uid "$uid"
fi
sleep $step
done