Magma Performance
Last updated at 3:32 am UTC on 15 September 2009
Self-Monitoring Statistics
Magma utilizes the "Ma Statistics" package to efficiently capture timing information about a particular MagmaSession or a particular MagmaServerConsole. To get statistics for a client session:
myMagmaSession statistics
To retrieve the detailed statistical object from the server:
myMagmaSession serverStatisticsPrimary
or:
myMagmaSession serverStatisticsSecondary
If not running in an HA configuration, the #serverStatisticsPrimary and #serverStatisticsSecondary will be the same.
MagmaBenchmarker
Separate from the above statistics, a benchmarking tool is available in the "Magma Tools" package that measures and reports the rate of its most of its basic operations, useful for gauging how different kinds of applications may perform.
The MagmaBenchmarker
class benchmarks key operations under certain conditions that demonstrate how fast a client session can go. It is important to note this is not a measurement of the server capacity. To handle this one client during the benchmark, the server is mostly idle. A single server can handle a "few" to "several", depending on network latency, clients at the rate reported by this single client.
There are three configurations under which to run the benchmarks:
- local
- remote with serialization but no network latency
- remote over a fast network, no compression
- remote over the internet (please state the geographic endpoints).
Running all of these is much more informative than running just one because you can discern how much "penalty" there is for various things like serialization or network latency, in your system / network.
To actually run the the local benchmark, print the following in a workspace:
MagmaBenchmarker runLocalBaseline: false "or true"
The boolean argument indicates whether to use WriteBarrier, which can significantly improve the commit speed.
The remote test requires separate server and client images running on the same or different computers.
On the server machine, execute the following:
MagmaBenchmarker startBenchmarkHost
This does nothing more than create a benchmark repository of sample objects and begins listening on a port for a remote client to begin the benchmark.
On another computer, start up a Squeak image with Magma installed and print the following:
MagmaBenchmarker runAgainstBenchmarkHost: 'localhost' withWriteBarrier: false "or true"
After several minutes to run, it will print out statistics similar to below.
Here is the output from recent runs of MagmaBenchmarker, now available in the "Magma tester" package.
Local
This tests the Magma-only code, requests and responses are passed directly between the client and the local server without having to serialize them. Therefore, these benchmarks represent the fastest that a single client can go on the stated hardware.
The date is 2009-08-25T21:43:29+00:00
Hardware Details:
computer : IBM T60p laptop
cpu : Intel Core2 Duo
speed : 2.0GHz
memory : 2GB
disk : internal SATA IDE (7200rpm)
OS Details:
osVersion : linux-gnu
platformName : unix
platformSubtype : i686
Vm Details:
vmVersion : Pharo0.1 of 16 May 2008 [latest update: #10074]
Image Details:
version : Squeak3.9
lastUpdate : 7067
showStatusViaCursor : false
Code Package Details (from Monticello):
Name: Ma exception handling-cmm.32
Author: cmm
Time: 20 March 2009, 7:06:21 pm
UUID: cdbb62ca-0bb3-44db-9e4f-9704bdbb8a28
Ancestors: Ma exception handling-cmm.31
Name: Ma base additions-cmm.142
Author: cmm
Time: 25 August 2009, 6:24:22 pm
UUID: 0a2d13cd-cd03-4c79-aae4-7c02ba9bfcaa
Ancestors: Ma base additions-cmm.141
Name: Ma proxy support-cmm.38
Author: cmm
Time: 5 July 2009, 8:18:42 pm
UUID: a6ad0668-49fc-4476-b786-60b1e4b2324c
Ancestors: Ma proxy support-cmm.37
Name: Ma traverse object graphs-cmm.29
Author: cmm
Time: 20 March 2009, 7:20:58 pm
UUID: 90a7107f-4d4d-42aa-9a69-3149c8cfbdb9
Ancestors: Ma traverse object graphs-cmm.28
Name: Ma Statistics-cmm.20
Author: cmm
Time: 4 August 2009, 11:34 am
UUID: 76a8ecf4-0754-481a-8f17-bf3a4638c013
Ancestors: Ma Statistics-cmm.19
Name: Ma object serialization-cmm.215
Author: cmm
Time: 18 August 2009, 2:35:21 pm
UUID: 217f944a-d00e-4ec4-a702-3c895de9f01f
Ancestors: Ma object serialization-cmm.214
Name: Collections-BTree-lr.68
Author: lr
Time: 31 May 2007, 1:44:42 pm
UUID: a0e4272d-1a26-4c38-88ef-29b531b01ee9
Ancestors: Collections-BTree-avi.67
Name: Ma special collections-cmm.101
Author: cmm
Time: 22 June 2009, 10:39:21 pm
UUID: e4d0a254-3b39-3943-ae63-4f5e27019cc9
Ancestors: Ma special collections-cmm.100
Name: Ma client server-cmm.213
Author: cmm
Time: 19 August 2009, 7:55:49 pm
UUID: d7862db7-0a37-45af-b466-7f0e2baee854
Ancestors: Ma client server-cmm.212
Name: WriteBarrier-pmm.26
Author: pmm
Time: 15 December 2006, 5:46:44 pm
UUID: af638952-5212-4c81-af50-50a558eb7ac0
Ancestors: WriteBarrier-avi.25
Name: Magma client-cmm.432
Author: cmm
Time: 19 August 2009, 3:20:30 pm
UUID: 53ca4612-f1fe-4570-9be4-9fb106bb2868
Ancestors: Magma client-cmm.431
Name: Magma server-cmm.377
Author: cmm
Time: 19 August 2009, 3:21:11 pm
UUID: fb3baa5f-ea26-44af-a52d-87aa5617182b
Ancestors: Magma server-cmm.376
Magma server details:
flushAggressively : true
MagmaSession Details:
isLocal : true
allowWriteBarrier : true
Benchmarker Details:
thousands : 1000
Benchmarks:
---
connectionTests
timeToDisconnect : 0:00:00:00.005
timeToConnect : 0:00:00:00.625
---
readTests
peakRefreshRate : 259.4962015193922 per second.
singleObjectRead : 6019.99600079984 per second.
oneThousandElementArrayRead : 439.9120175964807 per second.
oneThousandElementArrayOfObjectsRead : 11.92842942345924 per second.
oneMillionObjectPointersRead : 0.3855050115651503 per second.
oneThousandLevelsDeepRead : 9.85610092647349 per second.
---
writeTests
peakCommitRate : 100.7782877669128 per second.
oneThousandElementArrayCommit : 55.72198921509886 per second.
a1001BufferCommit : 98.9802039592082 per second.
aOneMillionBufferCommit : 10 seconds.
---
magmaArrayTests
getMagmaArraySize : 26622.47550489902 per second.
updateThousandsOfMagmaArrayElements : 354.729054189162 per second.
---
magmaCollectionTests
addThousandsOfObjectsTenAtATime : 2.828 seconds.
addThousandsOfObjectsOneHundredAtATime : 1.845 seconds.
addThousandsOfObjectsAtOnce : 1.771 seconds.
Remote baseline (loopback address to same computer = no network latency)
The date is 2009-08-25T22:15:23+00:00
Hardware Details:
computer : IBM T60p laptop
cpu : Intel Core2 Duo
speed : 2.0GHz
memory : 2GB
disk : internal SATA IDE (7200rpm)
OS Details:
osVersion : linux-gnu
platformName : unix
platformSubtype : i686
Vm Details:
vmVersion : Pharo0.1 of 16 May 2008 [latest update: #10074]
Image Details:
version : Squeak3.9
lastUpdate : 7067
showStatusViaCursor : false
Code Package Details (from Monticello):
Name: Ma exception handling-cmm.32
Author: cmm
Time: 20 March 2009, 7:06:21 pm
UUID: cdbb62ca-0bb3-44db-9e4f-9704bdbb8a28
Ancestors: Ma exception handling-cmm.31
Name: Ma base additions-cmm.142
Author: cmm
Time: 25 August 2009, 6:24:22 pm
UUID: 0a2d13cd-cd03-4c79-aae4-7c02ba9bfcaa
Ancestors: Ma base additions-cmm.141
Name: Ma proxy support-cmm.38
Author: cmm
Time: 5 July 2009, 8:18:42 pm
UUID: a6ad0668-49fc-4476-b786-60b1e4b2324c
Ancestors: Ma proxy support-cmm.37
Name: Ma traverse object graphs-cmm.29
Author: cmm
Time: 20 March 2009, 7:20:58 pm
UUID: 90a7107f-4d4d-42aa-9a69-3149c8cfbdb9
Ancestors: Ma traverse object graphs-cmm.28
Name: Ma Statistics-cmm.20
Author: cmm
Time: 4 August 2009, 11:34 am
UUID: 76a8ecf4-0754-481a-8f17-bf3a4638c013
Ancestors: Ma Statistics-cmm.19
Name: Ma object serialization-cmm.215
Author: cmm
Time: 18 August 2009, 2:35:21 pm
UUID: 217f944a-d00e-4ec4-a702-3c895de9f01f
Ancestors: Ma object serialization-cmm.214
Name: Collections-BTree-lr.68
Author: lr
Time: 31 May 2007, 1:44:42 pm
UUID: a0e4272d-1a26-4c38-88ef-29b531b01ee9
Ancestors: Collections-BTree-avi.67
Name: Ma special collections-cmm.101
Author: cmm
Time: 22 June 2009, 10:39:21 pm
UUID: e4d0a254-3b39-3943-ae63-4f5e27019cc9
Ancestors: Ma special collections-cmm.100
Name: Ma client server-cmm.213
Author: cmm
Time: 19 August 2009, 7:55:49 pm
UUID: d7862db7-0a37-45af-b466-7f0e2baee854
Ancestors: Ma client server-cmm.212
Name: WriteBarrier-pmm.26
Author: pmm
Time: 15 December 2006, 5:46:44 pm
UUID: af638952-5212-4c81-af50-50a558eb7ac0
Ancestors: WriteBarrier-avi.25
Name: Magma client-cmm.432
Author: cmm
Time: 19 August 2009, 3:20:30 pm
UUID: 53ca4612-f1fe-4570-9be4-9fb106bb2868
Ancestors: Magma client-cmm.431
Name: Magma server-cmm.377
Author: cmm
Time: 19 August 2009, 3:21:11 pm
UUID: fb3baa5f-ea26-44af-a52d-87aa5617182b
Ancestors: Magma server-cmm.376
MagmaSession Details:
isLocal : false
allowWriteBarrier : true
Benchmarker Details:
thousands : 1000
Benchmarks:
---
connectionTests
timeToDisconnect : 0:00:00:00.012
timeToConnect : 0:00:00:00.677
---
readTests
peakRefreshRate : 78.6898342320751 per second.
singleObjectRead : 280.8315010993404 per second.
oneThousandElementArrayRead : 19.93620414673046 per second.
oneThousandElementArrayOfObjectsRead : 9.98629332289015 per second.
oneMillionObjectPointersRead : 0.278357689631176 per second.
oneThousandLevelsDeepRead : 8.30860534124629 per second.
---
writeTests
peakCommitRate : 23.34863300738376 per second.
oneThousandElementArrayCommit : 9.08014212396368 per second.
a1001BufferCommit : 19.46375372393247 per second.
aOneMillionBufferCommit : 12 seconds.
---
magmaArrayTests
getMagmaArraySize : 267.0397761343194 per second.
updateThousandsOfMagmaArrayElements : 440.6237504998 per second.
---
magmaCollectionTests
addThousandsOfObjectsTenAtATime : 5.337 seconds.
addThousandsOfObjectsOneHundredAtATime : 2.635 seconds.
addThousandsOfObjectsAtOnce : 3.024 seconds.
Remote over 100Mbps LAN
The date is 2009-08-25T23:15:34+00:00
Hardware Details:
computer : IBM T60p laptop
cpu : Intel Core2 Duo
speed : 2.0GHz
memory : 2GB
disk : internal SATA IDE (7200rpm)
OS Details:
osVersion : linux-gnu
platformName : unix
platformSubtype : i686
Vm Details:
vmVersion : Pharo0.1 of 16 May 2008 [latest update: #10074]
Image Details:
version : Squeak3.9
lastUpdate : 7067
showStatusViaCursor : false
Code Package Details (from Monticello):
Name: Ma exception handling-cmm.32
Author: cmm
Time: 20 March 2009, 7:06:21 pm
UUID: cdbb62ca-0bb3-44db-9e4f-9704bdbb8a28
Ancestors: Ma exception handling-cmm.31
Name: Ma base additions-cmm.142
Author: cmm
Time: 25 August 2009, 6:24:22 pm
UUID: 0a2d13cd-cd03-4c79-aae4-7c02ba9bfcaa
Ancestors: Ma base additions-cmm.141
Name: Ma proxy support-cmm.38
Author: cmm
Time: 5 July 2009, 8:18:42 pm
UUID: a6ad0668-49fc-4476-b786-60b1e4b2324c
Ancestors: Ma proxy support-cmm.37
Name: Ma traverse object graphs-cmm.29
Author: cmm
Time: 20 March 2009, 7:20:58 pm
UUID: 90a7107f-4d4d-42aa-9a69-3149c8cfbdb9
Ancestors: Ma traverse object graphs-cmm.28
Name: Ma Statistics-cmm.20
Author: cmm
Time: 4 August 2009, 11:34 am
UUID: 76a8ecf4-0754-481a-8f17-bf3a4638c013
Ancestors: Ma Statistics-cmm.19
Name: Ma object serialization-cmm.215
Author: cmm
Time: 18 August 2009, 2:35:21 pm
UUID: 217f944a-d00e-4ec4-a702-3c895de9f01f
Ancestors: Ma object serialization-cmm.214
Name: Collections-BTree-lr.68
Author: lr
Time: 31 May 2007, 1:44:42 pm
UUID: a0e4272d-1a26-4c38-88ef-29b531b01ee9
Ancestors: Collections-BTree-avi.67
Name: Ma special collections-cmm.101
Author: cmm
Time: 22 June 2009, 10:39:21 pm
UUID: e4d0a254-3b39-3943-ae63-4f5e27019cc9
Ancestors: Ma special collections-cmm.100
Name: Ma client server-cmm.213
Author: cmm
Time: 19 August 2009, 7:55:49 pm
UUID: d7862db7-0a37-45af-b466-7f0e2baee854
Ancestors: Ma client server-cmm.212
Name: WriteBarrier-pmm.26
Author: pmm
Time: 15 December 2006, 5:46:44 pm
UUID: af638952-5212-4c81-af50-50a558eb7ac0
Ancestors: WriteBarrier-avi.25
Name: Magma client-cmm.432
Author: cmm
Time: 19 August 2009, 3:20:30 pm
UUID: 53ca4612-f1fe-4570-9be4-9fb106bb2868
Ancestors: Magma client-cmm.431
Name: Magma server-cmm.377
Author: cmm
Time: 19 August 2009, 3:21:11 pm
UUID: fb3baa5f-ea26-44af-a52d-87aa5617182b
Ancestors: Magma server-cmm.376
MagmaSession Details:
isLocal : false
allowWriteBarrier : true
Benchmarker Details:
thousands : 1000
Benchmarks:
---
connectionTests
timeToDisconnect : 0:00:00:01.025
timeToConnect : 0:00:00:00.89
---
readTests
peakRefreshRate : 49.38024790083966 per second.
singleObjectRead : 136.345461815274 per second.
oneThousandElementArrayRead : 67.3730507796881 per second.
oneThousandElementArrayOfObjectsRead : 3.85579332947754 per second.
oneMillionObjectPointersRead : 7 seconds.
oneThousandLevelsDeepRead : 3.29011031546352 per second.
---
writeTests
peakCommitRate : 17.78221778221778 per second.
oneThousandElementArrayCommit : 9.88142292490119 per second.
a1001BufferCommit : 10.7484076433121 per second.
aOneMillionBufferCommit : 19 seconds.
---
magmaArrayTests
getMagmaArraySize : 138.372325534893 per second.
updateThousandsOfMagmaArrayElements : 445.7108578284343 per second.
---
magmaCollectionTests
addThousandsOfObjectsTenAtATime : 12.577 seconds.
addThousandsOfObjectsOneHundredAtATime : 5.975 seconds.
addThousandsOfObjectsAtOnce : 6.852 seconds.
Remote over 54Mbps Wireless-G) LAN
The date is 2009-08-25T22:50:09+00:00
Hardware Details:
computer : IBM T60p laptop
cpu : Intel Core2 Duo
speed : 2.0GHz
memory : 2GB
disk : internal SATA IDE (7200rpm)
OS Details:
osVersion : linux-gnu
platformName : unix
platformSubtype : i686
Vm Details:
vmVersion : Pharo0.1 of 16 May 2008 [latest update: #10074]
Image Details:
version : Squeak3.9
lastUpdate : 7067
showStatusViaCursor : false
Code Package Details (from Monticello):
Name: Ma exception handling-cmm.32
Author: cmm
Time: 20 March 2009, 7:06:21 pm
UUID: cdbb62ca-0bb3-44db-9e4f-9704bdbb8a28
Ancestors: Ma exception handling-cmm.31
Name: Ma base additions-cmm.142
Author: cmm
Time: 25 August 2009, 6:24:22 pm
UUID: 0a2d13cd-cd03-4c79-aae4-7c02ba9bfcaa
Ancestors: Ma base additions-cmm.141
Name: Ma proxy support-cmm.38
Author: cmm
Time: 5 July 2009, 8:18:42 pm
UUID: a6ad0668-49fc-4476-b786-60b1e4b2324c
Ancestors: Ma proxy support-cmm.37
Name: Ma traverse object graphs-cmm.29
Author: cmm
Time: 20 March 2009, 7:20:58 pm
UUID: 90a7107f-4d4d-42aa-9a69-3149c8cfbdb9
Ancestors: Ma traverse object graphs-cmm.28
Name: Ma Statistics-cmm.20
Author: cmm
Time: 4 August 2009, 11:34 am
UUID: 76a8ecf4-0754-481a-8f17-bf3a4638c013
Ancestors: Ma Statistics-cmm.19
Name: Ma object serialization-cmm.215
Author: cmm
Time: 18 August 2009, 2:35:21 pm
UUID: 217f944a-d00e-4ec4-a702-3c895de9f01f
Ancestors: Ma object serialization-cmm.214
Name: Collections-BTree-lr.68
Author: lr
Time: 31 May 2007, 1:44:42 pm
UUID: a0e4272d-1a26-4c38-88ef-29b531b01ee9
Ancestors: Collections-BTree-avi.67
Name: Ma special collections-cmm.101
Author: cmm
Time: 22 June 2009, 10:39:21 pm
UUID: e4d0a254-3b39-3943-ae63-4f5e27019cc9
Ancestors: Ma special collections-cmm.100
Name: Ma client server-cmm.213
Author: cmm
Time: 19 August 2009, 7:55:49 pm
UUID: d7862db7-0a37-45af-b466-7f0e2baee854
Ancestors: Ma client server-cmm.212
Name: WriteBarrier-pmm.26
Author: pmm
Time: 15 December 2006, 5:46:44 pm
UUID: af638952-5212-4c81-af50-50a558eb7ac0
Ancestors: WriteBarrier-avi.25
Name: Magma client-cmm.432
Author: cmm
Time: 19 August 2009, 3:20:30 pm
UUID: 53ca4612-f1fe-4570-9be4-9fb106bb2868
Ancestors: Magma client-cmm.431
Name: Magma server-cmm.377
Author: cmm
Time: 19 August 2009, 3:21:11 pm
UUID: fb3baa5f-ea26-44af-a52d-87aa5617182b
Ancestors: Magma server-cmm.376
MagmaSession Details:
isLocal : false
allowWriteBarrier : true
Benchmarker Details:
thousands : 1000
Benchmarks:
---
connectionTests
timeToDisconnect : 0:00:00:00.013
timeToConnect : 0:00:00:00.894
---
readTests
peakRefreshRate : 48.20717131474104 per second.
singleObjectRead : 132.9468212714914 per second.
oneThousandElementArrayRead : 62.9858481164042 per second.
oneThousandElementArrayOfObjectsRead : 3.778838504375497 per second.
oneMillionObjectPointersRead : 9 seconds.
oneThousandLevelsDeepRead : 3.26923076923077 per second.
---
writeTests
peakCommitRate : 17.2962226640159 per second.
oneThousandElementArrayCommit : 10.09701049297169 per second.
a1001BufferCommit : 10.58729524570515 per second.
aOneMillionBufferCommit : 21 seconds.
---
magmaArrayTests
getMagmaArraySize : 137.2353176188574 per second.
updateThousandsOfMagmaArrayElements : 445.3109378124375 per second.
---
magmaCollectionTests
addThousandsOfObjectsTenAtATime : 12.355 seconds.
addThousandsOfObjectsOneHundredAtATime : 5.87 seconds.
addThousandsOfObjectsAtOnce : 6.729 seconds.
Remote over the Internet client in: (city?) server in: (city?)