Squeak
  links to this page:    
View this PageEdit this Page (locked)Uploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Magma Performance
Last updated at 9:36 pm UTC on 8 December 2011

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:
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: true "or false"

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:

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 2011-12-08T15:12:18.752-06:00

Hardware Details:
	computer : Intel DH55TC Motherboard
	cpu :  Intel Core i3
	speed :  2.93GHz
	memory :  4GB RAM
	disk :  single IDE hard-drive

OS Details:
	osVersion : linux-gnu
	platformName : unix
	platformSubtype : i686

Vm Details:
	vmVersion : Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.104]

Image Details:
	version : Squeak4.2
	lastUpdate : 11797
	showStatusViaCursor : false

Code Package Details (from Monticello):

Name: Ma-Core-cmm.214
Author: cmm
Time: 7 December 2011, 10:13:20.778 pm
UUID: c9cad4a4-6b6b-40f7-8651-98ef40c04b82
Ancestors: Ma-Core-cmm.213

Name: Ma-Collections-cmm.132
Author: cmm
Time: 5 December 2011, 10:08:50.687 pm
UUID: 398c3144-4377-4a84-ad77-4ce468637ac2
Ancestors: Ma-Collections-cmm.131

Name: Ma-Ascii-Report-cmm.9
Author: cmm
Time: 3 December 2011, 2:47:01.87 pm
UUID: ea7ab1db-5e5e-4b1e-8d42-a2b18107e0f9
Ancestors: MaFixedWidthReport-cmm.8

Name: Ma-Statistics-cmm.28
Author: cmm
Time: 3 December 2011, 2:45:14.204 pm
UUID: 89bd84ee-8c1e-4c28-a2a4-cb02c10e15a4
Ancestors: Ma Statistics-cmm.27

Name: Ma-Serializer-Core-cmm.278
Author: cmm
Time: 7 December 2011, 10:15:26.22 pm
UUID: 56fbbcc1-35fa-4ef6-88dd-37c7e4a41134
Ancestors: Ma-Serializer-Core-cmm.277

Name: Ma-Serializer-Squeak-Core-cmm.2
Author: cmm
Time: 4 December 2011, 4:28:48.218 pm
UUID: c16dfd42-e468-461d-9d4e-4b5517abaa1d
Ancestors: Ma-Serializer-Squeak-Core-cmm.1

Name: Ma-Client-Server-Core-cmm.220
Author: cmm
Time: 3 December 2011, 3:14:35.776 pm
UUID: bf61c57d-4d2a-4d3c-b806-55be628f4314
Ancestors: Ma client server-cmm.219

Name: Ma-Core-cmm.214
Author: cmm
Time: 7 December 2011, 10:13:20.778 pm
UUID: c9cad4a4-6b6b-40f7-8651-98ef40c04b82
Ancestors: Ma-Core-cmm.213

Name: Ma-Collections-cmm.132
Author: cmm
Time: 5 December 2011, 10:08:50.687 pm
UUID: 398c3144-4377-4a84-ad77-4ce468637ac2
Ancestors: Ma-Collections-cmm.131

Name: Ma-Ascii-Report-cmm.9
Author: cmm
Time: 3 December 2011, 2:47:01.87 pm
UUID: ea7ab1db-5e5e-4b1e-8d42-a2b18107e0f9
Ancestors: MaFixedWidthReport-cmm.8

Name: Ma-Statistics-cmm.28
Author: cmm
Time: 3 December 2011, 2:45:14.204 pm
UUID: 89bd84ee-8c1e-4c28-a2a4-cb02c10e15a4
Ancestors: Ma Statistics-cmm.27

Name: Ma-Serializer-Core-cmm.278
Author: cmm
Time: 7 December 2011, 10:15:26.22 pm
UUID: 56fbbcc1-35fa-4ef6-88dd-37c7e4a41134
Ancestors: Ma-Serializer-Core-cmm.277

Name: Ma-Client-Server-Core-cmm.220
Author: cmm
Time: 3 December 2011, 3:14:35.776 pm
UUID: bf61c57d-4d2a-4d3c-b806-55be628f4314
Ancestors: Ma client server-cmm.219

Name: Magma-Client-cmm.605
Author: cmm
Time: 7 December 2011, 10:16:37.466 pm
UUID: de902d05-c661-456a-b89f-5ed93cc1b7ec
Ancestors: Magma-Client-NicolasPetton.604

Name: Magma-Server-cmm.444
Author: cmm
Time: 3 December 2011, 5:16:21.892 pm
UUID: 876a34d2-be3d-4729-91a5-4c6758d03aa3
Ancestors: Magma-Server-cmm.443

Name: Magma-Tools-cmm.65
Author: cmm
Time: 8 December 2011, 2:56:02.81 pm
UUID: 9696f4eb-93b6-4832-af25-8bd7dd8e757d
Ancestors: Magma-Tools-cmm.64
	** modified **

Name: Ma-Search-cmm.40
Author: cmm
Time: 3 December 2011, 2:23:49.548 pm
UUID: 5f148606-57df-49a3-8c02-3b103f0c4020
Ancestors: Ma contextual search-cmm.39

Magma server details:
	flushAggressively : true

MagmaSession Details:
	isLocal : true
	allowWriteBarrier : true

Benchmarker Details:
	thousands : 1000

Benchmarks:
---

connectionTests
	timeToDisconnect : 0:00:00:00.004
	timeToConnect : 0:00:00:00.282
---

readTests
	peakRefreshRate : 43,300 per second.
	singleObjectRead : 28,000 per second.
	oneThousandElementArrayRead : 4,030 per second.
	oneThousandElementArrayOfObjectsRead : 57.2 per second.
	oneMillionObjectPointersRead : 2.45 per second.
	oneThousandLevelsDeepRead : 44.7 per second.
---

writeTests
	peakCommitRate : 456 per second.
	oneThousandElementArrayCommit : 280 per second.
	a1001BufferCommit : 10.5 per second.
	aOneMillionObjectPointerCommit : 279 per second.
---

magmaArrayTests
	getMagmaArraySize : 104,000 per second.
	updateThousandsOfMagmaArrayElements : 1,260 per second.
---

magmaCollectionTests
	addThousandsOfObjectsTenAtATime : 0.554 seconds.
	addThousandsOfObjectsOneHundredAtATime : 0.294 seconds.
	addThousandsOfObjectsAtOnce : 0.268 seconds.


Remote baseline (loopback address to same computer = no network latency)

The date is 2011-12-08T15:29:04.044-06:00

Hardware Details:
	computer : Intel DH55TC Motherboard
	cpu :  Intel Core i3
	speed :  2.93GHz
	memory :  4GB RAM
	disk :  single IDE hard-drive

OS Details:
	osVersion : linux-gnu
	platformName : unix
	platformSubtype : i686

Vm Details:
	vmVersion : Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.104]

Image Details:
	version : Squeak4.2
	lastUpdate : 11797
	showStatusViaCursor : false

Code Package Details (from Monticello):

Name: Ma-Core-cmm.214
Author: cmm
Time: 7 December 2011, 10:13:20.778 pm
UUID: c9cad4a4-6b6b-40f7-8651-98ef40c04b82
Ancestors: Ma-Core-cmm.213

Name: Ma-Collections-cmm.132
Author: cmm
Time: 5 December 2011, 10:08:50.687 pm
UUID: 398c3144-4377-4a84-ad77-4ce468637ac2
Ancestors: Ma-Collections-cmm.131

Name: Ma-Ascii-Report-cmm.9
Author: cmm
Time: 3 December 2011, 2:47:01.87 pm
UUID: ea7ab1db-5e5e-4b1e-8d42-a2b18107e0f9
Ancestors: MaFixedWidthReport-cmm.8

Name: Ma-Statistics-cmm.28
Author: cmm
Time: 3 December 2011, 2:45:14.204 pm
UUID: 89bd84ee-8c1e-4c28-a2a4-cb02c10e15a4
Ancestors: Ma Statistics-cmm.27

Name: Ma-Serializer-Core-cmm.278
Author: cmm
Time: 7 December 2011, 10:15:26.22 pm
UUID: 56fbbcc1-35fa-4ef6-88dd-37c7e4a41134
Ancestors: Ma-Serializer-Core-cmm.277

Name: Ma-Client-Server-Core-cmm.220
Author: cmm
Time: 3 December 2011, 3:14:35.776 pm
UUID: bf61c57d-4d2a-4d3c-b806-55be628f4314
Ancestors: Ma client server-cmm.219

Name: Magma-Client-cmm.605
Author: cmm
Time: 7 December 2011, 10:16:37.466 pm
UUID: de902d05-c661-456a-b89f-5ed93cc1b7ec
Ancestors: Magma-Client-NicolasPetton.604

Name: Magma-Server-cmm.444
Author: cmm
Time: 3 December 2011, 5:16:21.892 pm
UUID: 876a34d2-be3d-4729-91a5-4c6758d03aa3
Ancestors: Magma-Server-cmm.443

Name: Magma-Tools-cmm.65
Author: cmm
Time: 8 December 2011, 2:56:02.81 pm
UUID: 9696f4eb-93b6-4832-af25-8bd7dd8e757d
Ancestors: Magma-Tools-cmm.64
	** modified **

Name: Ma-Search-cmm.40
Author: cmm
Time: 3 December 2011, 2:23:49.548 pm
UUID: 5f148606-57df-49a3-8c02-3b103f0c4020
Ancestors: Ma contextual search-cmm.39

MagmaSession Details:
	isLocal : false
	allowWriteBarrier : true

Benchmarker Details:
	thousands : 1000

Benchmarks:
---

connectionTests
	timeToDisconnect : 0:00:00:00.002
	timeToConnect : 0:00:00:00.282
---

readTests
	peakRefreshRate : 658 per second.
	singleObjectRead : 895 per second.
	oneThousandElementArrayRead : 24.8 per second.
	oneThousandElementArrayOfObjectsRead : 42.1 per second.
	oneMillionObjectPointersRead : 1.26 per second.
	oneThousandLevelsDeepRead : 38.6 per second.
---

writeTests
	peakCommitRate : 110 per second.
	oneThousandElementArrayCommit : 19 per second.
	a1001BufferCommit : 6.27 per second.
	aOneMillionObjectPointerCommit : 50.9 per second.
---

magmaArrayTests
	getMagmaArraySize : 1,460 per second.
	updateThousandsOfMagmaArrayElements : 1,160 per second.
---

magmaCollectionTests
	addThousandsOfObjectsTenAtATime : 1.092 seconds.
	addThousandsOfObjectsOneHundredAtATime : 0.93 seconds.
	addThousandsOfObjectsAtOnce : 0.484 seconds.