Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
e1e32ade
Commit
e1e32ade
authored
Feb 18, 2022
by
Antoine Kaufmann
Browse files
images: separate image for memcacached
This speeds up base image build significantly
parent
ea903dda
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
20 deletions
+37
-20
experiments/pyexps/dist_memcache.py
experiments/pyexps/dist_memcache.py
+6
-1
images/rules.mk
images/rules.mk
+10
-1
images/scripts/install-base.sh
images/scripts/install-base.sh
+0
-18
images/scripts/install-memcached.sh
images/scripts/install-memcached.sh
+21
-0
No files found.
experiments/pyexps/dist_memcache.py
View file @
e1e32ade
...
@@ -143,8 +143,10 @@ for host_type in host_types:
...
@@ -143,8 +143,10 @@ for host_type in host_types:
c
.
extra_deps
.
append
(
switch_top
)
c
.
extra_deps
.
append
(
switch_top
)
all_servers
=
[]
all_servers
=
[]
for
(
s
,
_
)
in
racks
:
all_clients
=
[]
for
(
s
,
c
)
in
racks
:
all_servers
+=
s
all_servers
+=
s
all_clients
+=
c
# set up client -> server connections
# set up client -> server connections
for
i
in
range
(
0
,
n
):
for
i
in
range
(
0
,
n
):
...
@@ -158,5 +160,8 @@ for host_type in host_types:
...
@@ -158,5 +160,8 @@ for host_type in host_types:
c
.
node_config
.
app
.
concurrency
=
len
(
server_ips
)
c
.
node_config
.
app
.
concurrency
=
len
(
server_ips
)
c
.
extra_deps
+=
all_servers
c
.
extra_deps
+=
all_servers
for
h
in
all_servers
+
all_clients
:
h
.
node_config
.
disk_image
=
'memcached'
# add to experiments
# add to experiments
experiments
.
append
(
e
)
experiments
.
append
(
e
)
images/rules.mk
View file @
e1e32ade
...
@@ -27,10 +27,12 @@ KERNEL_VERSION := 5.4.46
...
@@ -27,10 +27,12 @@ KERNEL_VERSION := 5.4.46
UBUNTU_IMAGE
:=
$(d)
output-ubuntu1804/ubuntu1804
UBUNTU_IMAGE
:=
$(d)
output-ubuntu1804/ubuntu1804
BASE_IMAGE
:=
$(d)
output-base/base
BASE_IMAGE
:=
$(d)
output-base/base
MEMCACHED_IMAGE
:=
$(d)
output-memcached/memcached
NOPAXOS_IMAGE
:=
$(d)
output-nopaxos/nopaxos
NOPAXOS_IMAGE
:=
$(d)
output-nopaxos/nopaxos
MTCP_IMAGE
:=
$(d)
output-mtcp/mtcp
MTCP_IMAGE
:=
$(d)
output-mtcp/mtcp
TAS_IMAGE
:=
$(d)
output-tas/tas
TAS_IMAGE
:=
$(d)
output-tas/tas
IMAGES
:=
$(UBUNTU_IMAGE)
$(BASE_IMAGE)
$(NOPAXOS_IMAGE)
IMAGES
:=
$(UBUNTU_IMAGE)
$(BASE_IMAGE)
$(NOPAXOS_IMAGE)
$(MEMCACHED_IMAGE)
RAW_IMAGES
:=
$(
addsuffix
.raw,
$(IMAGES)
)
RAW_IMAGES
:=
$(
addsuffix
.raw,
$(IMAGES)
)
img_dir
:=
$(d)
img_dir
:=
$(d)
...
@@ -74,6 +76,13 @@ $(BASE_IMAGE): $(packer) $(QEMU) $(UBUNTU_IMAGE) $(bz_image) $(m5_bin) \
...
@@ -74,6 +76,13 @@ $(BASE_IMAGE): $(packer) $(QEMU) $(UBUNTU_IMAGE) $(bz_image) $(m5_bin) \
rm
-rf
$(img_dir)
/input-base
rm
-rf
$(img_dir)
/input-base
touch
$@
touch
$@
$(MEMCACHED_IMAGE)
:
$(packer) $(QEMU) $(BASE_IMAGE)
\
$(addprefix $(d)
,
extended-image.pkr.hcl scripts/install-memcached.sh
\
scripts/cleanup.sh)
rm
-rf
$(
dir
$@
)
cd
$(img_dir)
&&
./packer-wrap.sh base memcached extended-image.pkr.hcl
touch
$@
$(NOPAXOS_IMAGE)
:
$(packer) $(QEMU) $(BASE_IMAGE)
\
$(NOPAXOS_IMAGE)
:
$(packer) $(QEMU) $(BASE_IMAGE)
\
$(addprefix $(d)
,
extended-image.pkr.hcl scripts/install-nopaxos.sh
\
$(addprefix $(d)
,
extended-image.pkr.hcl scripts/install-nopaxos.sh
\
scripts/cleanup.sh nopaxos.config)
scripts/cleanup.sh nopaxos.config)
...
...
images/scripts/install-base.sh
View file @
e1e32ade
...
@@ -11,21 +11,3 @@ update-grub
...
@@ -11,21 +11,3 @@ update-grub
tar
xf kheaders.tar.bz2
-C
/
tar
xf kheaders.tar.bz2
-C
/
popd
popd
rm
-rf
/tmp/input
rm
-rf
/tmp/input
apt-get
-y
install
memcached libevent-dev
systemctl disable memcached.service
cd
/tmp
wget https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz
tar
xf libmemcached-1.0.18.tar.gz
cd
libmemcached-1.0.18
./configure
--enable-memaslap
--disable-dtrace
--prefix
=
/usr
--enable-static
\
--disable-shared
\
CXXFLAGS
=
'-fpermissive -pthread'
\
CFLAGS
=
'-fpermissive -pthread'
\
LDFLAGS
=
'-pthread'
||
(
cat
config.log
;
exit
1
)
make
-j
`
nproc
`
make
-j
`
nproc
`
install
cd
/tmp
rm
-rf
libmemcached-1.0.18 libmemcached-1.0.18.tar.gz
images/scripts/install-memcached.sh
0 → 100644
View file @
e1e32ade
#!/bin/bash -eux
set
-eux
apt-get
-y
install
memcached libevent-dev
systemctl disable memcached.service
cd
/tmp
wget https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz
tar
xf libmemcached-1.0.18.tar.gz
cd
libmemcached-1.0.18
./configure
--enable-memaslap
--disable-dtrace
--prefix
=
/usr
--enable-static
\
--disable-shared
\
CXXFLAGS
=
'-fpermissive -pthread'
\
CFLAGS
=
'-fpermissive -pthread'
\
LDFLAGS
=
'-pthread'
||
(
cat
config.log
;
exit
1
)
make
-j
`
nproc
`
make
-j
`
nproc
`
install
cd
/tmp
rm
-rf
libmemcached-1.0.18 libmemcached-1.0.18.tar.gz
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment