Perf server initial documentation; mostly placeholder now. (issue 316923002)

0 views
Skip to first unread message

ben...@google.com

unread,
Jun 4, 2014, 9:47:15 AM6/4/14
to rmi...@google.com, skia-...@googlegroups.com, ski...@google.com, robertp...@google.com, bsal...@google.com
Reviewers: rmistry,

Message:
This is just to get things started. Will edit along the way.

Description:
Perf server initial documentation; mostly placeholder now.

BUG=skia:

Please review this at https://codereview.chromium.org/316923002/

SVN Base: https://skia.googlesource.com/buildbot.git@master

Affected files (+86, -0 lines):
A compute_engine_scripts/perfserver/vm_setup_server.sh
A perf/server/DESIGN.md
A perf/server/README.md


Index: compute_engine_scripts/perfserver/vm_setup_server.sh
diff --git a/compute_engine_scripts/perfserver/vm_setup_server.sh
b/compute_engine_scripts/perfserver/vm_setup_server.sh
new file mode 100644
index
0000000000000000000000000000000000000000..4b057cb1e7aa2a3b2d624af0eba3b9aeecba241f
--- /dev/null
+++ b/compute_engine_scripts/perfserver/vm_setup_server.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+#
+# Setup the perf stats server.
+#
+# Copyright 2014 Google Inc. All Rights Reserved.
+#
Index: perf/server/DESIGN.md
diff --git a/perf/server/DESIGN.md b/perf/server/DESIGN.md
new file mode 100644
index
0000000000000000000000000000000000000000..a6aba80f67c1b1b05308245cb6a2468043d54001
--- /dev/null
+++ b/perf/server/DESIGN.md
@@ -0,0 +1,56 @@
+DESIGN
+======
+
+
+Overview
+--------
+Provides interactive dashboard for Skia performance data.
+
+
+Architecture
+------------
+
+Perf Stats Database
+-------------------
+
+Annotations Database
+--------------------
+
+A Cloud SQL (a cloud version of MySQL) database is used to keep
information on Skia git revisions and their corresponding annotations. The
database will be updated when users add/edit/delete annotations via the
dashboard UI.
+
+All passwords for MySQL are stored in valentine (search "skia perf").
+
+To connect to the database from authorized network (including skia-perf-b
GCE):
+
+ $ mysql -h 173.194.104.24 -u root -p
+
+Initial setup of the database, the users, and the tables:
+
+ CREATE DATABASE skia;
+ USE skia;
+ CREATE USER 'readonly'@'%' IDENTIFIED BY <password in valentine>;
+ GRANT SELECT ON *.* TO 'readonly'@'%';
+ CREATE USER 'readwrite'@'%' IDENTIFIED BY <password in valentine>;
+ GRANT SELECT, DELETE, UPDATE, INSERT ON *.* TO 'readwrite'@'%';
+
+ // Table for storing annotations.
+ CREATE TABLE notes (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, notes
VARCHAR(200), UNIQUE INDEX (id));
+
+ // Table for storing git revision information.
+ CREATE TABLE githash (ts INT NOT NULL PRIMARY KEY, gitnumber INT NOT
NULL, githash VARCHAR(40) NOT NULL, author VARCHAR(40) NOT NULL, message
VARCHAR(200) NOT NULL, UNIQUE INDEX (ts));
+
+ // Table for mapping revisions and annotations. This support
many-to-many
+ // mapping.
+ CREATE TABLE githashnotes (ts INT NOT NULL, id INT NOT NULL, FOREIGN
KEY (ts) REFERENCES githash(ts), FOREIGN KEY (id) REFERENCES notes(id),
UNIQUE INDEX (ts, id));
+
+Password for the database will be stored in the metadata instance. To see
the current password stored in metadata and the fingerprint:
+
+ gcutil --project=google.com:skia-buildbots getinstance skia-perf-b
+
+To set the mysql password that webtry is to use:
+
+ gcutil --project=google.com:skia-buildbots setinstancemetadata
skia-perf-b --metadata=readonly:[password-from-valentine]
--metadata=readwrite:[password-from-valentine] --fingerprint=[the metadata
fingerprint]
+
+Installation
+------------
+See the README file.
Index: perf/server/README.md
diff --git a/perf/server/README.md b/perf/server/README.md
new file mode 100644
index
0000000000000000000000000000000000000000..9092e72fda606d59821f3b1ec69d5de82df37e2a
--- /dev/null
+++ b/perf/server/README.md
@@ -0,0 +1,24 @@
+SkiaPerf Server
+===============
+
+Reads Skia performance data from databases and serves interactive
dashboards for easy exploration and annotations.
+
+Server Setup
+============
+
+Create a GCE instance:
+
+ gcutil --project=google.com:skia-buildbots addinstance skia-perf-b \
+ --zone=us-central2-b --external_ip_address=108.170.220.208 \
+ --service_account=default \
+
--service_account_scopes="https://www.googleapis.com/auth/devstorage.full_control"
\
+ --network=default --machine_type=n1-standard-1
--image=backports-debian-7-wheezy-v20140331 \
+ --persistent_boot_disk
+
+Make sure port 80 is accessible externally for the above instance.
+
+SSH into the instance:
+
+ gcutil --project=google.com:skia-buildbots ssh --ssh_user=default
skia-perf-b
+
+Setup scripts can be found in the buildbot repo under
compute_engine_scripts/perfserver.


rmi...@google.com

unread,
Jun 4, 2014, 9:59:18 AM6/4/14
to ben...@google.com, skia-...@googlegroups.com, ski...@google.com, robertp...@google.com, bsal...@google.com

https://codereview.chromium.org/316923002/diff/1/compute_engine_scripts/perfserver/vm_setup_server.sh
File compute_engine_scripts/perfserver/vm_setup_server.sh (right):

https://codereview.chromium.org/316923002/diff/1/compute_engine_scripts/perfserver/vm_setup_server.sh#newcode5
compute_engine_scripts/perfserver/vm_setup_server.sh:5: # Copyright 2014
Google Inc. All Rights Reserved.
Lets also create two more scripts in this directory called
vm_create_server.sh and vm_delete_server.sh.

https://codereview.chromium.org/316923002/diff/1/perf/server/README.md
File perf/server/README.md (right):

https://codereview.chromium.org/316923002/diff/1/perf/server/README.md#newcode8
perf/server/README.md:8:
We can instead point from here to a README file in
compute_engine_scripts that will contain information on how to create,
setup and delete this server referring to the corresponding scripts.

https://codereview.chromium.org/316923002/diff/1/perf/server/README.md#newcode16
perf/server/README.md:16: --persistent_boot_disk

This command is going to be the one that will be in vm_create_server.sh
but the constants will be used from
https://skia.googlesource.com/buildbot/+/master/compute_engine_scripts/buildbots/vm_config.sh

https://codereview.chromium.org/316923002/diff/1/perf/server/README.md#newcode22
perf/server/README.md:22: gcutil --project=google.com:skia-buildbots ssh
--ssh_user=default skia-perf-b
We should try to avoid hardcoding these values because if we migrate due
to a PCR then this may become skia-perf-a.

https://codereview.chromium.org/316923002/

bor...@google.com

unread,
Jun 4, 2014, 10:04:47 AM6/4/14
to ben...@google.com, rmi...@google.com, skia-...@googlegroups.com, ski...@google.com, robertp...@google.com, bsal...@google.com

https://codereview.chromium.org/316923002/diff/1/compute_engine_scripts/perfserver/vm_setup_server.sh
File compute_engine_scripts/perfserver/vm_setup_server.sh (right):

https://codereview.chromium.org/316923002/diff/1/compute_engine_scripts/perfserver/vm_setup_server.sh#newcode5
compute_engine_scripts/perfserver/vm_setup_server.sh:5: # Copyright 2014
Google Inc. All Rights Reserved.
Also, should probably use the same copyright header we use everywhere
else:

# Copyright (c) 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

https://codereview.chromium.org/316923002/

ben...@google.com

unread,
Jun 4, 2014, 11:23:32 AM6/4/14
to rmi...@google.com, bor...@google.com, skia-...@googlegroups.com, ski...@google.com, robertp...@google.com, bsal...@google.com
No I have a better idea on where to put what. PTAL, thanks!


https://codereview.chromium.org/316923002/diff/1/compute_engine_scripts/perfserver/vm_setup_server.sh
File compute_engine_scripts/perfserver/vm_setup_server.sh (right):

https://codereview.chromium.org/316923002/diff/1/compute_engine_scripts/perfserver/vm_setup_server.sh#newcode5
compute_engine_scripts/perfserver/vm_setup_server.sh:5: # Copyright 2014
Google Inc. All Rights Reserved.
On 2014/06/04 13:59:18, rmistry wrote:
> Lets also create two more scripts in this directory called
vm_create_server.sh
> and vm_delete_server.sh.

Done.
On 2014/06/04 13:59:18, rmistry wrote:
> We can instead point from here to a README file in
compute_engine_scripts that
> will contain information on how to create, setup and delete this
server
> referring to the corresponding scripts.

Done.
Got it. Is it fine to share and put new constants under buildbots, or we
should have a new vm_config?
On 2014/06/04 13:59:18, rmistry wrote:

> This command is going to be the one that will be in
vm_create_server.sh but the
> constants will be used from

https://skia.googlesource.com/buildbot/+/master/compute_engine_scripts/buildbots/vm_config.sh

https://codereview.chromium.org/316923002/diff/1/perf/server/README.md#newcode22
perf/server/README.md:22: gcutil --project=google.com:skia-buildbots ssh
--ssh_user=default skia-perf-b
I see, will figure out how it is done currently.

ben...@google.com

unread,
Jun 4, 2014, 11:24:05 AM6/4/14
to rmi...@google.com, bor...@google.com, skia-...@googlegroups.com, ski...@google.com, robertp...@google.com, bsal...@google.com
oops, I meant "NOW I have a better idea..."

https://codereview.chromium.org/316923002/

rmi...@google.com

unread,
Jun 4, 2014, 11:26:46 AM6/4/14
to ben...@google.com, bor...@google.com, skia-...@googlegroups.com, ski...@google.com, robertp...@google.com, bsal...@google.com
https://codereview.chromium.org/316923002/diff/1/perf/server/README.md#newcode16
perf/server/README.md:16: --persistent_boot_disk
On 2014/06/04 15:23:32, benchen wrote:
> Got it. Is it fine to share and put new constants under buildbots, or
we should
> have a new vm_config?

Should be fine to share vm_config and put new constants there.

ben...@google.com

unread,
Jun 4, 2014, 12:06:45 PM6/4/14
to rmi...@google.com, bor...@google.com, skia-...@googlegroups.com, ski...@google.com, robertp...@google.com, bsal...@google.com
Submitting the placeholders now.

https://codereview.chromium.org/316923002/
Reply all
Reply to author
Forward
0 new messages