Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb6904af

Browse files
committed
ci: Use a RAM disk for NetBSD and OpenBSD.
Put the RAM disk setup for all three *BSD CI tasks into a common script,replacing the old FreeBSD-specific one from commit0265e5c. This makesthem run 3 times and a bit over 2 times faster, respectively.NetBSD and FreeBSD now share the same one-liner to mount tmpfs. OpenBSDneeds a GCP-image specific recipe that knows where to steal an unuseddisk partition needed to reserve swap space for an mfs RAM disk, becauseits tmpfs is deprecated and currently broken. The configured size isenough for our current tests but could potentially need futureexpansion. Thanks to Bilal for the disklabel incantation.Reviewed-by: Nazir Bilal Yavuz <byavuz81@gmail.com>Discussion:https://postgr.es/m/CA%2BhUKGJJ-XrPhN%2BQA4ZUfYAAXcwOSDty9t0vE9Z8__AdacKnQg%40mail.gmail.com
1 parent06eae9e commitb6904af

File tree

3 files changed

+24
-29
lines changed

3 files changed

+24
-29
lines changed

‎.cirrus.tasks.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,7 @@ task:
155155
156156
ccache_cache:
157157
folder:$CCACHE_DIR
158-
# Work around performance issues due to 32KB block size
159-
repartition_script:src/tools/ci/gcp_freebsd_repartition.sh
158+
setup_ram_disk_script:src/tools/ci/gcp_ram_disk.sh
160159
create_user_script:|
161160
pw useradd postgres
162161
chown -R postgres:postgres .
@@ -276,7 +275,7 @@ task:
276275
277276
ccache_cache:
278277
folder:$CCACHE_DIR
279-
278+
setup_ram_disk_script:src/tools/ci/gcp_ram_disk.sh
280279
create_user_script:|
281280
useradd postgres
282281
chown -R postgres:users /home/postgres

‎src/tools/ci/gcp_freebsd_repartition.sh

Lines changed: 0 additions & 26 deletions
This file was deleted.

‎src/tools/ci/gcp_ram_disk.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/sh
2+
# Move working directory into a RAM disk for better performance.
3+
4+
set -e
5+
set -x
6+
7+
mv$CIRRUS_WORKING_DIR$CIRRUS_WORKING_DIR.orig
8+
mkdir$CIRRUS_WORKING_DIR
9+
10+
case"`uname`"in
11+
FreeBSD|NetBSD)
12+
mount -t tmpfs tmpfs$CIRRUS_WORKING_DIR
13+
;;
14+
OpenBSD)
15+
umount /dev/sd0j# unused /usr/obj partition
16+
printf"m j\n\n\nswap\nw\nq\n"| disklabel -E sd0
17+
swapon /dev/sd0j
18+
mount -t mfs -o rw,noatime,nodev,-s=8000000 swap$CIRRUS_WORKING_DIR
19+
;;
20+
esac
21+
22+
cp -a$CIRRUS_WORKING_DIR.orig/.$CIRRUS_WORKING_DIR/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp