Difference between revisions of "Performance/Library and directory structure"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Performance test with DEV300m45)
(Performance test with CWS sb110 based on DEV300m46)
 
(23 intermediate revisions by one other user not shown)
Line 1: Line 1:
 +
{{Performance}}
 
=Optimizing the placement of libraries for a better cold start up=
 
=Optimizing the placement of libraries for a better cold start up=
  
Line 11: Line 12:
  
 
== Windows ==
 
== Windows ==
 +
 +
=== Performance test with DEV300m45 ===
 +
 +
The following performance test wants to clarify how much performance can be gained with an optimized library placement. According to Microsoft documentation all libraries should be located next to the application executable. Therefore we modified some configuration files and moved all libraries  from "OpenOffice.org 3\Basis\program" and "OpenOffice.org 3\URE\bin" to the "OpenOffice.org\program" folder where soffice.exe, soffice.bin.
  
 
* Windows Vista Ultimate 32-Bit
 
* Windows Vista Ultimate 32-Bit
 
* Opteron 175 (Dual core) 2,2Ghz
 
* Opteron 175 (Dual core) 2,2Ghz
 
* 4 GB RAM
 
* 4 GB RAM
* Deskstar 7K250 160GB 8MB Cache
+
* Deskstar 7K250 250GB 7200rpm - SATA - 8MB Cache
 
* (Super Fetch and Prefetch disabled)
 
* (Super Fetch and Prefetch disabled)
 
+
* Measurement tool: Process Monitor from Microsoft
=== Performance test with DEV300m45 ===
+
 
+
The following performance test wants to clarify how much performance can be gained with an optimized library placement. According to Microsoft documentation all libraries should be located next to the application executable. Therefore we modified some configuration files and moved all libraries  from "OpenOffice.org 3\Basis\program" and "OpenOffice.org 3\URE\bin" to the "OpenOffice.org\program" folder where soffice.exe, soffice.bin.
+
  
 
{| width="80%" border="1" cellpadding="2"
 
{| width="80%" border="1" cellpadding="2"
Line 41: Line 43:
 
|}
 
|}
  
flat = All libraries are located next to the application binaries. Means that all libraries are within the "OpenOffice.org 3\program" folder.
+
*flat = All libraries are located next to the application binaries. Means that all libraries are within the "OpenOffice.org 3\program" folder.
 +
 
 +
The DEV300m45 includes an optimization regarding the access to the rdb files which contain types and services for UNO. That's why you see a performance improvement between OOO310m9 and a standard DEV300m45 installation.
  
 
The performance test clearly shows that the split of the libraries and not placing them next to the application binaries brought us a 10% start up performance penalty. Therefore it would makes sense to place these libraries again into the program folder of the installation.
 
The performance test clearly shows that the split of the libraries and not placing them next to the application binaries brought us a 10% start up performance penalty. Therefore it would makes sense to place these libraries again into the program folder of the installation.
 +
 +
=== Performance test with CWS sb110 based on DEV300m46 ===
 +
 +
Based on the data we retrieved from Performance Monitor-Logs we decided to use a flat library directory structure to speed up the library look up for OpenOffice.org. Unfortunately the folder layout of the URE is part of the API. So the solution implemented as [http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=DEV300%2Fsb110 CWS <code>sb110</code>] looks like:
 +
 +
* OpenOffice.org 3\Basis\program => "OpenOffice.org 3"\program
 +
* OpenOffice.org 3\URE\bin          not changed
 +
* Use of SetDllDirectory() for Windows XP SP1 and later to speed up the look up for URE based libraries.
 +
 +
==== What performance gains are possible with this solution? ====
 +
 +
We recognized that performance gains depend on hardware. Therefore the following tests were done on various systems.
 +
 +
* Measurement tool: Process Monitor from Microsoft
 +
 +
===== Low-end system (limited memory - recommended memory requirement for OpenOffice.org on Windows) =====
 +
 +
Test machine
 +
* Notebook
 +
* 1,8 GHz Pentium M (Single core)
 +
* 512 MB RAM
 +
* Toshiba MK6026GAX 60 GB, 2.5" - 5400rpm - UDMA100 - 16MB Cache
 +
* Windows XP Professional SP3
 +
 +
This is a typical notebook system with plenty of software installed by the notebook manufacturer. Windows reports about 205MB of physical memory available after start up. Trashing couldn't be noticed during the cold start up tests, even when using Process Monitor for logging.
 +
 +
{| width="80%" border="1" cellpadding="2"
 +
!width="20%"|Optimization method
 +
!width="10%"|Test run 1
 +
!width="10%"|Test run 2
 +
!width="10%"|Test run 3
 +
!width="10%"|Test run 4
 +
!width="10%"|Test run 5
 +
!width="15%"|Mean time
 +
|-
 +
|| OOO310m9 || 22,2s || 21,6s || 22,1s || 22,0s || --- || 22,0s (100%)
 +
|-
 +
|| DEV300m46 (standard) || 20,5s || 20,1s || 20,0s || 20,3s || 20,2s || 20,2s (91,8%)
 +
|-
 +
|| DEV300m46 (sb110) || 20,1s || 19,6s || 20,0s || 19,8s || 19,9s || 19,9s (90,4%)
 +
|-
 +
|| DEV300m46 (flat) || 19,6s || 19,7s || 19,8s || 19,5s || 19,6s || 19,6s (89,0%)
 +
|-
 +
|}
 +
 +
===== Medium range system (plenty of memory) =====
 +
 +
Test machine
 +
 +
* Desktop system
 +
* Opteron 175 (Dual core) 2,2Ghz
 +
* 4 GB RAM
 +
* Deskstar 7K250 250GB 7200rpm - SATA - 8MB Cache
 +
* Windows Vista Ultimate 32-Bit
 +
* (Super Fetch and Prefetch disabled)
 +
 +
{| width="80%" border="1" cellpadding="2"
 +
!width="20%"|Optimization method
 +
!width="10%"|Test run 1
 +
!width="10%"|Test run 2
 +
!width="10%"|Test run 3
 +
!width="10%"|Test run 4
 +
!width="10%"|Test run 5
 +
!width="15%"|Mean time
 +
|-
 +
|| OOO310m9 || 16,1s || 16,1s || 16,4s || 16,2s || 16,2s || 16,2s (100%)
 +
|-
 +
|| DEV300m46 (standard) || 15,2s || 15,2s || 15,5s || 15,1s || 15,8s || 15,4s (95,0%)
 +
|-
 +
|| DEV300m46 (sb110) || 14,7s || 14,8s || 14,5s || 14,8s || 14,4s || 14,6s (90,1%)
 +
|-
 +
|| DEV300m46 (flat) || 14,2s || 13,9s || 13,7s || 14,0s || 13,8s || 13,9s (85,8%)
 +
|-
 +
|}
 +
 +
[[Category:Performance]]

Latest revision as of 08:43, 22 June 2009

Performance 170.png
Performance Project

performance.openoffice.org

Quick Navigation

Team

Communication

Activities

About this template


Optimizing the placement of libraries for a better cold start up

This part wants to concentrate on a possible problem which has been introduced by the three layer structure for OpenOffice.org 3.

Main idea

According to an article from Microsoft the placement of shared libraries is crucial for a good start up performance. The article states that the load time of a library can be reduced by about 20% if it's located at the first search position (next to the binary).

It must be clarified if the findings can also have positive effects on the other platforms.

At least on recent Linux versions, the loader appears to cache the content of directories it has already scanned for a library, so that spreading the libraries across multiple directories has no real performance impact. On Mac OS X, library dependencies are always with full path, anyway. Sb 14:15, 14 April 2009 (UTC)

Windows

Performance test with DEV300m45

The following performance test wants to clarify how much performance can be gained with an optimized library placement. According to Microsoft documentation all libraries should be located next to the application executable. Therefore we modified some configuration files and moved all libraries from "OpenOffice.org 3\Basis\program" and "OpenOffice.org 3\URE\bin" to the "OpenOffice.org\program" folder where soffice.exe, soffice.bin.

  • Windows Vista Ultimate 32-Bit
  • Opteron 175 (Dual core) 2,2Ghz
  • 4 GB RAM
  • Deskstar 7K250 250GB 7200rpm - SATA - 8MB Cache
  • (Super Fetch and Prefetch disabled)
  • Measurement tool: Process Monitor from Microsoft
Optimization method Test run 1 Test run 2 Test run 3 Test run 4 Test run 5 Mean time
OOO310m9 16,1s 16,1s 16,4s 16,2s 16,2s 16,2s (100%)
DEV300m45 (standard) 15,8s 15,8s 14,9s 15,9s 14,8s 15,4s (95%)
DEV300m45 (flat*) 13,7s 14,1s 14,3s 13,7s 13,3s 13,8s (85%)
DEV300m45 (not rebased/flat*) 9,9s 11,5s 11,3s 11,6s 10,7s 11s (68%)
  • flat = All libraries are located next to the application binaries. Means that all libraries are within the "OpenOffice.org 3\program" folder.

The DEV300m45 includes an optimization regarding the access to the rdb files which contain types and services for UNO. That's why you see a performance improvement between OOO310m9 and a standard DEV300m45 installation.

The performance test clearly shows that the split of the libraries and not placing them next to the application binaries brought us a 10% start up performance penalty. Therefore it would makes sense to place these libraries again into the program folder of the installation.

Performance test with CWS sb110 based on DEV300m46

Based on the data we retrieved from Performance Monitor-Logs we decided to use a flat library directory structure to speed up the library look up for OpenOffice.org. Unfortunately the folder layout of the URE is part of the API. So the solution implemented as CWS sb110 looks like:

  • OpenOffice.org 3\Basis\program => "OpenOffice.org 3"\program
  • OpenOffice.org 3\URE\bin not changed
  • Use of SetDllDirectory() for Windows XP SP1 and later to speed up the look up for URE based libraries.

What performance gains are possible with this solution?

We recognized that performance gains depend on hardware. Therefore the following tests were done on various systems.

  • Measurement tool: Process Monitor from Microsoft
Low-end system (limited memory - recommended memory requirement for OpenOffice.org on Windows)

Test machine

  • Notebook
  • 1,8 GHz Pentium M (Single core)
  • 512 MB RAM
  • Toshiba MK6026GAX 60 GB, 2.5" - 5400rpm - UDMA100 - 16MB Cache
  • Windows XP Professional SP3

This is a typical notebook system with plenty of software installed by the notebook manufacturer. Windows reports about 205MB of physical memory available after start up. Trashing couldn't be noticed during the cold start up tests, even when using Process Monitor for logging.

Optimization method Test run 1 Test run 2 Test run 3 Test run 4 Test run 5 Mean time
OOO310m9 22,2s 21,6s 22,1s 22,0s --- 22,0s (100%)
DEV300m46 (standard) 20,5s 20,1s 20,0s 20,3s 20,2s 20,2s (91,8%)
DEV300m46 (sb110) 20,1s 19,6s 20,0s 19,8s 19,9s 19,9s (90,4%)
DEV300m46 (flat) 19,6s 19,7s 19,8s 19,5s 19,6s 19,6s (89,0%)
Medium range system (plenty of memory)

Test machine

  • Desktop system
  • Opteron 175 (Dual core) 2,2Ghz
  • 4 GB RAM
  • Deskstar 7K250 250GB 7200rpm - SATA - 8MB Cache
  • Windows Vista Ultimate 32-Bit
  • (Super Fetch and Prefetch disabled)
Optimization method Test run 1 Test run 2 Test run 3 Test run 4 Test run 5 Mean time
OOO310m9 16,1s 16,1s 16,4s 16,2s 16,2s 16,2s (100%)
DEV300m46 (standard) 15,2s 15,2s 15,5s 15,1s 15,8s 15,4s (95,0%)
DEV300m46 (sb110) 14,7s 14,8s 14,5s 14,8s 14,4s 14,6s (90,1%)
DEV300m46 (flat) 14,2s 13,9s 13,7s 14,0s 13,8s 13,9s (85,8%)
Personal tools