Symbian3/PDK/Source/GUID-7E401451-16EB-515B-88B2-4D0D2D6C7A57.dita
changeset 1 25a17d01db0c
child 3 46218c8b8afa
equal deleted inserted replaced
0:89d6a7a84779 1:25a17d01db0c
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    12 <concept id="GUID-7E401451-16EB-515B-88B2-4D0D2D6C7A57" xml:lang="en"><title>Adjustable
       
    13 Performance Configuration</title><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    14 <p>Various system parameters may be modified to control the way that elements
       
    15 within the system behave. The parameters listed in this document have been
       
    16 found to have significant impacts on important aspects of system performance. </p>
       
    17 <p>In each case there is trade off, typically between speed and resource use
       
    18 but sometimes between boot time and performance in steady state. The amount
       
    19 of trade off varies according hardware, software and how both are used. The
       
    20 only way of establishing the effect of each setting on a working device is
       
    21 through systematic testing. </p>
       
    22 <p>There is no common method of configuring the parameters listed here. Some
       
    23 of the values must be set before compilation, others before the ROM is built. </p>
       
    24 <ul>
       
    25 <li id="GUID-EE04CF03-F56D-52D7-BFF4-3D3AAB7C6106"><p><xref href="GUID-7E401451-16EB-515B-88B2-4D0D2D6C7A57.dita#GUID-7E401451-16EB-515B-88B2-4D0D2D6C7A57/GUID-09C25275-5D3A-514B-8F0D-C5C1A3FA41EC">Bitmaps</xref>  </p> </li>
       
    26 <li id="GUID-02A6FF27-4E28-50F5-B0B7-C4BB20201FFE"><p><xref href="GUID-7E401451-16EB-515B-88B2-4D0D2D6C7A57.dita#GUID-7E401451-16EB-515B-88B2-4D0D2D6C7A57/GUID-6F89A67C-D05C-535B-B316-22EBECA7D7BF">Central Repository</xref>  </p> </li>
       
    27 <li id="GUID-17BCAC94-0678-5048-A33F-151B36E0E83D"><p><xref href="GUID-7E401451-16EB-515B-88B2-4D0D2D6C7A57.dita#GUID-7E401451-16EB-515B-88B2-4D0D2D6C7A57/GUID-F0EB9A69-C00B-5778-AB90-E8C78CF0E2CB">Comms Server</xref>  </p> </li>
       
    28 <li id="GUID-59149610-A605-5C6C-BA53-E921E2658D6C"><p><xref href="GUID-7E401451-16EB-515B-88B2-4D0D2D6C7A57.dita#GUID-7E401451-16EB-515B-88B2-4D0D2D6C7A57/GUID-4E07079A-B7B7-5020-BB15-8F31D5FAFCDA">Database Management System (DBMS)</xref>  </p> </li>
       
    29 <li id="GUID-31BBAE9F-7427-5925-9FE7-907EC852C366"><p><xref href="GUID-7E401451-16EB-515B-88B2-4D0D2D6C7A57.dita#GUID-7E401451-16EB-515B-88B2-4D0D2D6C7A57/GUID-0E06EE19-F1FE-5940-8167-34654BFBA90A">Domain Name Daemon</xref>  </p> </li>
       
    30 <li id="GUID-252ED29A-8F5A-54F2-A98C-65F48D080C61"><p><xref href="GUID-7E401451-16EB-515B-88B2-4D0D2D6C7A57.dita#GUID-7E401451-16EB-515B-88B2-4D0D2D6C7A57/GUID-BE38584C-7999-5D27-B4A2-1A7CFA82D311">Heap Configuration</xref>  </p> </li>
       
    31 <li id="GUID-F6E88149-0B78-5E48-8399-51268803591F"><p><xref href="GUID-7E401451-16EB-515B-88B2-4D0D2D6C7A57.dita#GUID-7E401451-16EB-515B-88B2-4D0D2D6C7A57/GUID-9F765460-7F6A-5F2A-85DE-89EBFE213B1E">Recognizer Loading</xref>  </p> </li>
       
    32 <li id="GUID-E5B09C3D-FF56-5D3B-B47A-B2D4EE265A86"><p><xref href="GUID-7E401451-16EB-515B-88B2-4D0D2D6C7A57.dita#GUID-7E401451-16EB-515B-88B2-4D0D2D6C7A57/GUID-9B98E4EB-28BC-5A0A-8174-7949E515AFA6">Secure Backup </xref>  </p> </li>
       
    33 <li id="GUID-A49DD8FE-958E-542F-98EF-7926A2A10722"><p><xref href="GUID-7E401451-16EB-515B-88B2-4D0D2D6C7A57.dita#GUID-7E401451-16EB-515B-88B2-4D0D2D6C7A57/GUID-4EC82389-6C89-5C47-BAC4-A139BCB3531E">Server shutdown behaviour</xref>  </p> </li>
       
    34 <li id="GUID-E792C035-38A4-561C-91CF-A23574E3E744"><p><xref href="GUID-7E401451-16EB-515B-88B2-4D0D2D6C7A57.dita#GUID-7E401451-16EB-515B-88B2-4D0D2D6C7A57/GUID-2CACB838-2E72-5723-9511-68EC1D7E3BDD">Window Server</xref>  </p> </li>
       
    35 </ul>
       
    36 <section id="GUID-09C25275-5D3A-514B-8F0D-C5C1A3FA41EC"><title>Bitmaps</title> <p>Bitmaps
       
    37 use up large amounts of memory. There are several parameters that you can
       
    38 configure to reduce the amount of memory that bitmaps use. The effects that
       
    39 your adjustments have will depend upon both the nature of the bitmaps used
       
    40 in your system and the way that they are used. </p> <p><b>Bitmap compression ratio configuration </b> </p> <p>Bitmaps can be compressed
       
    41 using algorithms that typically take advantage of blocks of common colour.
       
    42 The amount that a bitmap can be compressed depends on the bitmap itself. </p> <p>A
       
    43 bitmap stored in a compressed format has to be decompressed before it can
       
    44 be displayed. </p> <p>A <b>compile-time macro</b>, <codeph>KCompressionThreshold</codeph>,
       
    45 specifies how much reduction in size must be achievable for bitmaps to be
       
    46 compressed. The theory is that if compression would only result in a small
       
    47 difference in size it is a waste of time. </p> <dl>
       
    48 <dlentry>
       
    49 <dt>Location</dt>
       
    50 <dd><p> <filepath>...\os\graphics\fbs\fontandbitmapserver\group\FBSCLI.MMP</filepath>  </p> </dd>
       
    51 </dlentry>
       
    52 <dlentry>
       
    53 <dt>Source</dt>
       
    54 <dd><codeblock id="GUID-BD267125-B08B-5723-9C4F-2737882BFD1D" xml:space="preserve">/* 
       
    55 KCompressionThreshold is used to determine whether a bitmap gets compressed.  
       
    56 Values of 0 -&gt; 256 represent 0% to 100% where 0% = no compression.  
       
    57 A value of 205 means that bitmaps are only compressed when the resulting size is 80% or less 
       
    58 of the original size.
       
    59 */
       
    60 MACRO KCompressionThreshold=205  // i.e. 80% compression 
       
    61 </codeblock> </dd>
       
    62 </dlentry>
       
    63 </dl> <p>You must recompile FBServ for this change to take effect. </p> <p><b>Bitmap storage location </b> </p> <p>Bitmaps are stored in different memory
       
    64 locations according to their size. </p> <ul>
       
    65 <li id="GUID-08722693-3C5C-50FD-BD60-EBE2C3EC28A3"><p>Small bitmaps are stored
       
    66 in a normal heap called a shared chunk. </p> </li>
       
    67 <li id="GUID-9066CCC7-4872-5BEC-B754-3406E02CE234"><p>Large bitmaps are stored
       
    68 in special area of memory, called the large chunk or pile, that is managed
       
    69 by the font and bitmap server. </p> </li>
       
    70 </ul> <p>This is because storing and deleting bitmaps, especially large ones,
       
    71 leads to memory fragmentation which can prevent RAM being freed for the rest
       
    72 of the system. Defragmetation, however, is a slow process, so only the large
       
    73 chunk is defragmented. </p> <p>A <b>compile-time macro</b>, <codeph>KMaxLargeBitmapAlloc</codeph>,
       
    74 specifies the cut-off point (in kB) at which a bitmap is considered large
       
    75 and, therefore, stored in the large chunk. </p> <p>The higher the value the
       
    76 larger the bitmaps stored in the shared chunk will be. This typically results
       
    77 in higher RAM use, because the heap becomes more fragmented, but better overall
       
    78 system performance because the defragmentation process runs less often on
       
    79 the large chunk. </p> <dl>
       
    80 <dlentry>
       
    81 <dt>Location</dt>
       
    82 <dd><p> <filepath>...\os\graphics\fbs\fontandbitmapserver\group\FBSCLI.MMP</filepath> </p> </dd>
       
    83 </dlentry>
       
    84 <dlentry>
       
    85 <dt>Source</dt>
       
    86 <dd><codeblock id="GUID-3EDA0707-66CD-563C-AB11-3FB72582CECB" xml:space="preserve">/*
       
    87 configurable value to control bitmap heap defragmentation by setting large bitmap threshold 
       
    88 */
       
    89 MACRO KMaxLargeBitmapAlloc=0x4000
       
    90 
       
    91 </codeblock> </dd>
       
    92 </dlentry>
       
    93 </dl> <p>You must recompile FBServ for this change to take effect. </p> <p><b>Large chunk defragmentation </b> </p> <p>Deleting large bitmaps results
       
    94 in fragmentation of the large chunk (see above). </p> <p>A <b>compile-time
       
    95 macro</b>, <codeph>KFreeCellCountLimit</codeph>, specifies the number of free
       
    96 cells that must exist in the large chunk before it gets defragmented. </p> <dl>
       
    97 <dlentry>
       
    98 <dt>Location</dt>
       
    99 <dd><p> <filepath>...\os\graphics\fbs\fontandbitmapserver\group\FBSCLI.MMP</filepath>  </p> </dd>
       
   100 </dlentry>
       
   101 <dlentry>
       
   102 <dt>Source</dt>
       
   103 <dd><codeblock id="GUID-576D18C1-6D4F-5E39-A69D-481D29F69CEE" xml:space="preserve">/*
       
   104 KFreeCellCountLimit determines when a forced foreground defragmentation will take place. 
       
   105 This will happen during an allocation on the FBS large bitmap chunk if the amount 
       
   106 of free cells exceeds the specified number.
       
   107 */
       
   108 MACRO KFreeCellCountLimit=40
       
   109 </codeblock> </dd>
       
   110 </dlentry>
       
   111 </dl> <p>A smaller value will result in less wasted RAM but poorer performance
       
   112 as the defragmentation process will run more often. </p> <p> <b>NOTE:</b> Cells
       
   113 can be of variable size so this value cannot be used to calculate the amount
       
   114 of wasted RAM. You can be sure, however, that the wasted RAM will be at least
       
   115 (<codeph>KMaxLargeBitmapAlloc</codeph> x <codeph>KFreeCellCountLimit</codeph>).
       
   116 For the default values this is 160kB. </p> <p>You must recompile FBServ for
       
   117 this change to take effect. </p> <p><b>Using bitmap fonts </b> </p> <p>Using bitmap fonts instead of FreeType
       
   118 fonts can reduce RAM use and increase performance at the expense of visual
       
   119 appearance. FreeType fonts have to be rasterised before they can be used.
       
   120 This takes time and memory. Bitmap fonts, however, can only be used in the
       
   121 pre-determined range of sizes built into the ROM. </p> <p>The performance
       
   122 trade off is dependant on the font rasteriser though once a font has been
       
   123 rasterised it can be cached in bitmap form. </p> <p>NOTE: You can be pre-rasterise
       
   124 FreeType fonts into bitmap fonts for inclusion in ROMs using the <codeph>ttf2bdf</codeph> tool.
       
   125 Though the tool is supplied with the Symbian platform (as part of the <codeph>graphics_font</codeph> CBR
       
   126 component) it is not supported. There may also be legal and licencing issues
       
   127 to consider when pre-rasterising ronts in this way. </p> </section>
       
   128 <section id="GUID-6F89A67C-D05C-535B-B316-22EBECA7D7BF"><title>Central Repository </title> <p>The
       
   129 Central Repository caches individual repositories in RAM after clients have
       
   130 closed their sessions. You can configure the <i>sizeof the cache</i> and the <i>length
       
   131 of time that entries persist</i> by editing the central repository INI file <filepath>\private\10202be9\centrep.ini</filepath>  </p> <codeblock id="GUID-D09B03B5-A74B-5EF5-B962-46756E491C48" xml:space="preserve">[CoarseGrainedCache]
       
   132 size= &lt;size in bytes&gt; 
       
   133 timeout= &lt;timeout in microseconds&gt; </codeblock> <p>Increasing the size
       
   134 of the cache and the timeout improve performance at the cost of increased
       
   135 RAM use. </p> <p> <b>NOTE:</b> If the cache fills up the oldest entries are
       
   136 pushed out before they timeout. </p> </section>
       
   137 <section id="GUID-F0EB9A69-C00B-5778-AB90-E8C78CF0E2CB"><title>Comms Server</title> <p>You
       
   138 can adjust the size of the <codeph>MBuf</codeph> pool. The <codeph>MBuf</codeph> pool
       
   139 is used for creating buffers for communication data. </p> <p>The value is
       
   140 set in <filepath>...\os\commsfw\commsprocess\commsrootserverconfig\etc\c32start.ini</filepath>. </p> <codeblock id="GUID-77C0F002-8BA1-5D2E-9EC6-78098940D30D" xml:space="preserve">
       
   141 [Global]
       
   142 MBufPoolSize=&lt;initial size in bytes&gt;,&lt;max size in bytes&gt; //The default is MBufPoolSize=262144,262144. </codeblock> <p> <b>NOTE:</b> In
       
   143 older versions of the Symbian platform only the maximum size was specified
       
   144 so, for compatibility reasons, if a single value is specified it will be interpreted
       
   145 as the maximum size. </p> <p>When an initial size is specified the pool grows
       
   146 as necessary until it reaches the maximum size. It does not shrink, however,
       
   147 so the RAM is not released until the device is rebooted. The disadvantage
       
   148 of setting a very low initial pool size is that there might be insufficient
       
   149 free RAM pages when it tries to grow which could cause panics. </p> </section>
       
   150 <section id="GUID-4E07079A-B7B7-5020-BB15-8F31D5FAFCDA"><title>Database Management
       
   151 System (DBMS)</title> <p>The size of the <b>cache</b> used by DBMS and the
       
   152 size of the <b>buffer</b> used by STORE when performing disk I/O are adjustable.
       
   153 Reducing their sizes reduces memory use but results in more I/O operations
       
   154 which reduces performance. </p> <p>Adjust the sizes of the cache and buffer
       
   155 as follows: </p> <ol id="GUID-9021FD5C-01F7-575A-9B3B-DC7289266602">
       
   156 <li id="GUID-EA542EA4-975D-5075-AD6D-46E09B37CCBA"><p>Define the constants <codeph>SYMBIAN_CUSTOM_DBMS_CACHE_SIZES</codeph> and <codeph>SYMBIAN_CUSTOM_STORE_BUFFER_SIZES</codeph> in the appropriate HRH file in <filepath>\epoc32\include\variant</filepath>. </p> </li>
       
   157 <li id="GUID-2AA8EE9F-EDAD-515D-8407-8D4736A6CF15"><p>Create <filepath>...\os\persistentdata\persistentstorage\dbms\bmake\EDbms.mmh</filepath> by
       
   158 copying <filepath>...\os\persistentdata\persistentstorage\dbms\bmake\EDbms_Template.mmh</filepath>. </p> <p>Edit
       
   159 the newly created file and modify the following macros: </p> <ul>
       
   160 <li id="GUID-00DE06B9-95F2-5DCB-A63E-1586CAE2686E"><p> <codeph>PAGE_CACHE_SIZE</codeph> -
       
   161 the size of the page cache used to cache index information in a database.
       
   162 It must not be less than 8 pages. </p> </li>
       
   163 <li id="GUID-2182B6CC-F0CF-52F8-9986-231546A90D8C"><p> <codeph>MAX_CLUSTER_CACHE_SIZE</codeph> -
       
   164 the size of the cluster cache which is used to cache row data for tables in
       
   165 a database. It must not be less than 4 clusters. </p> </li>
       
   166 </ul> </li>
       
   167 <li id="GUID-E3FC7916-96B7-53F1-8E57-53243FFDAB78"><p>Create <filepath>...\os\persistentdata\persistentstorage\store\BMAKEEStor.mmh</filepath> by
       
   168 copying <filepath>...\os\persistentdata\persistentstorage\store\BMAKE\EStor_Template.mmh</filepath>. </p> <p>Edit
       
   169 the newly created file and modify the following macros: </p> <ul>
       
   170 <li id="GUID-5D98A6F3-160F-5348-B85D-97E387E8AE70"><p> <codeph>DEFAULT_FILE_BUF_SIZE</codeph> This
       
   171 macro sets the default file buffer size in bytes used in <xref href="GUID-418E7956-BE91-39A2-A26D-F1CA88B458AA.dita"><apiname>RFileBuf</apiname></xref> objects.
       
   172 It must not be less than 1536 bytes. </p> </li>
       
   173 <li id="GUID-A6CAC043-CC3E-519F-84DB-D1F9E6AB8C42"><p> <codeph>MAX_READ_AHEAD_VALUE</codeph> This
       
   174 macro sets the maximum <xref href="GUID-418E7956-BE91-39A2-A26D-F1CA88B458AA.dita"><apiname>RFileBuf</apiname></xref> read-ahead value in bytes.
       
   175 This defines the number of bytes read into the file buffer when buffer underflow
       
   176 occurs. It must not be less than 512 bytes or greater than <codeph>DEFAULT_FILE_BUF_SIZE</codeph>  </p> </li>
       
   177 <li id="GUID-25FC3F98-0B4A-52E2-BF26-EDAEA0B03585"><p> <codeph>FILE_BLOCK_SIZE</codeph> This
       
   178 macro sets the file-system block size for <xref href="GUID-418E7956-BE91-39A2-A26D-F1CA88B458AA.dita"><apiname>RFileBuf</apiname></xref>. It
       
   179 is used in the event of a buffer underflow to perform block-aligned reads
       
   180 to load the buffer. It must not be less than 512 bytes or greater then <codeph>MAX_READ_AHEAD_VALUE</codeph>.
       
   181 It must also be a power of 2 </p> </li>
       
   182 </ul> </li>
       
   183 <li id="GUID-F7304DF3-99B5-50E5-8FA0-025A1C26317D"><p>Rebuild STORE then DBMS. </p> </li>
       
   184 </ol> </section>
       
   185 <section id="GUID-0E06EE19-F1FE-5940-8167-34654BFBA90A"><title>Domain Name
       
   186 Daemon</title> <p>You can control the number of concurrent requests handled
       
   187 by the Domain Name Daemon (DND). The DND reserves memory for these at startup
       
   188 to guarantee service. Reducing the number saves RAM but slows down web page
       
   189 retrieval, especially on pages with lots of in-line images. </p> <p>In the
       
   190 file <filepath>...\os\networkingsrv\tcpiputils\dnd\inc\listener.h</filepath>  </p> <codeblock id="GUID-3DFE4664-CAC8-5FE0-8D25-00D14D8754B3" xml:space="preserve">const TUint KDndNumResolver = 31 ;</codeblock> <p>You
       
   191 can also limit the number of Link-Local Multicast Name Resolvers (LLNMR) that
       
   192 get created which also saves RAM but impacts performance because fewer concurrent
       
   193 DNS queries can be made </p> <p>In the file  </p><filepath>...\os\networkingsrv\tcpiputils\dnd\inc\llmnrresponder.h</filepath> <codeblock id="GUID-E42FFFD4-2A9A-5D20-8171-F09AED1FEA15" xml:space="preserve">const TInt KLlmnrMaxEnabled = 15 ; </codeblock> <p> <b>NOTE:</b> You
       
   194 must ensure that there is at least one resolver enabled for each LLMNR-enabled
       
   195 network interface (NIF). </p> </section>
       
   196 <section id="GUID-BE38584C-7999-5D27-B4A2-1A7CFA82D311"><title>Heap Configuration</title> <p><b>Minimum heap cell size </b> </p> <p>You can set the minimum heap cell
       
   197 size used by the <xref href="GUID-EFAFDD75-7E59-306A-882D-317F5564979E.dita"><apiname>RHeap</apiname></xref> class. This has an impact on where
       
   198 new allocations are placed in the heap. You can set values for both the kernel
       
   199 heap and the user heap. </p> <p>The effect of changing the value is difficult
       
   200 to predict and there is not a simple relationship between size and RAM use
       
   201 or size and performance. In general, however, a larger value will result in
       
   202 faster performance and greater RAM use. </p> <p>Typical values to experiment
       
   203 with are 0, 4, 8, 16, 32 and 64. </p> <p>You set the value using a <codeph>patchdata</codeph> statement
       
   204 in an OBY (or IBY) file. </p> <codeblock id="GUID-76A70134-04D6-57B1-8F1D-7C7BF7813B3B" xml:space="preserve">
       
   205 patchdata [ekern.exe|euser.dll] @ KHeapMinCellSize &lt;NewValueForTheConstData&gt; 
       
   206 </codeblock> <p>For example </p> <codeblock id="GUID-34B89B58-109B-5DFF-A91F-D1C50866CE54" xml:space="preserve">
       
   207 patchdata ekern.exe @ KHeapMinCellSize 32
       
   208 
       
   209 patchdata euser.dll @ KHeapMinCellSize 32
       
   210 </codeblock> <p><b>Hysteresis window size </b> </p> <p>You can configure how the memory allocated
       
   211 by the <xref href="GUID-EFAFDD75-7E59-306A-882D-317F5564979E.dita"><apiname>RHeap</apiname></xref> class is returned to the system. </p> <p>The
       
   212 heap grows in fixed size chunks. You can specify how quickly it shrinks (the
       
   213 amount of hysteresis) by setting <codeph>KHeapShrinkHysRatio</codeph>. </p> <p>The
       
   214 value of <codeph>KHeapShrinkHysRatio</codeph> is multiplied with the size
       
   215 of the growth chunk to establish the hysteresis value. When heap cells are
       
   216 freed the system waits until the number of free cells reaches the hysteresis
       
   217 value before releasing the memory. </p> <p>The default value of <codeph>KHeapShrinkHysRatio</codeph> is
       
   218 2.0. Reducing the value towards 1 frees memory more quickly. Values of 1 or
       
   219 less result in no hysteresis. More hysteresis results in faster performance,
       
   220 as heap allocations occur less often, but more RAM use. </p> <p>You set the
       
   221 value using a <codeph>patchdata</codeph> statement in an OBY (or IBY) file.
       
   222 For example, </p> <codeblock id="GUID-FE3EAA41-A9EE-5659-A57F-6186AE22BF65" xml:space="preserve">
       
   223 patchdata ekern.exe @ KHeapShrinkHysRatio 1.5
       
   224 
       
   225 patchdata euser.dll @ KHeapShrinkHysRatio 1.5
       
   226 </codeblock> </section>
       
   227 <section id="GUID-9F765460-7F6A-5F2A-85DE-89EBFE213B1E"><title>Recognizer
       
   228 Loading</title> <p>You can configure the Apparc server to load recognizer
       
   229 plugins at startup or on demand. Loading on demand reduces RAM consumption
       
   230 and boot time. The trade-off is that the first use of each recognizer takes
       
   231 longer to complete as it needs to be loaded before it can be used. Because
       
   232 recognizers typically get used several times in quick succession the impact
       
   233 of the trade off can be reduced by using a timer to defer unloading </p> <p>You
       
   234 can enable or disable load-on-demand and specify the delay before unloading
       
   235 using the <codeph>patchdata</codeph> statement in an OBY (or IBY) file. </p> <codeblock id="GUID-17741E7B-5EF8-52F9-9DED-C5482B78EDEE" xml:space="preserve">patchdata apserv.dll @ KApaLoadDataRecognizersOnDemand &lt;newvalue&gt; </codeblock> <p>The
       
   236 default <codeph>newvalue</codeph> is 0 which means that recognizers are loaded
       
   237 at boot. A value of 1 specifies that recognizers will be loaded on demand. </p> <codeblock id="GUID-D398EA48-F84C-528D-B0B1-40B8A8E6F1A1" xml:space="preserve">patchdata apserv.dll @ KApaUnloadRecognizersTimeout &lt;newvalue&gt; </codeblock> <p>The
       
   238 default<codeph>newvalue</codeph> is 10000000 (10 seconds in milliseconds). </p> </section>
       
   239 <section id="GUID-9B98E4EB-28BC-5A0A-8174-7949E515AFA6"><title>Secure Backup
       
   240 Optimisation</title> <p>The secure backup engine uses a shared chunk to communicate
       
   241 information efficiently between client and server components. You can set
       
   242 the size of the chunk, and other parameters, in a file called <filepath>sbeconfig.xml</filepath> in
       
   243 the private directory of the secure backup engine. The default size of the
       
   244 chunk is 2MB. </p> <codeblock id="GUID-08DAB844-88CF-560B-93E0-718CBEA0A9C4" xml:space="preserve">
       
   245 &lt;?xml version="1.0" encoding="UTF-16" standalone="yes"?&gt;
       
   246 &lt;sbe_config&gt;
       
   247     &lt;heap size = "2097152" max_retries = "5" reduction_factor = "2"/&gt;
       
   248     &lt;central_repository uid = "0x10202BE9"/&gt; 
       
   249     &lt;exclude_drives list = "z"/&gt; 
       
   250 &lt;/sbe_config&gt; 
       
   251         </codeblock> </section>
       
   252 <section id="GUID-4EC82389-6C89-5C47-BAC4-A139BCB3531E"><title> Server shutdown
       
   253 behaviour</title> <p>The shutdown behaviour of servers has a large impact
       
   254 on RAM and performance characteristics. If a server is always running it can
       
   255 respond faster to each request but requires RAM all the time. A transitive
       
   256 server is one which shuts down when it has no active connections. A transitive
       
   257 server uses RAM only when necessary but its performance will vary according
       
   258 to whether it needs to be started. </p> <p>You can configure the shutdown
       
   259 behaviour of several key Symbian servers. </p> <p><b>Message Server </b> </p> <p>Symbian provides two versions of the Message
       
   260 Server: an always-on version and a transitive one. You can select which one
       
   261 to include in your ROM by editing <filepath>../generic/messaging/framework/server/group/messageserver.iby</filepath>  </p> <ul>
       
   262 <li id="GUID-563A829D-7ED3-50E0-A90C-472D2EBEA65C"><p>For always-on include <filepath>msgs.dll</filepath> in
       
   263 your ROM </p> </li>
       
   264 <li id="GUID-42CD2F3D-9552-5FC7-910E-3B8D6EE8892C"><p>For transitive behaviour
       
   265 include <filepath>msgs_autoshutdown.dll</filepath> in your ROM </p> </li>
       
   266 </ul> <p><b>Contacts Server </b> </p> <p>The behaviour of the Contacts Server is determined
       
   267 by a command line argument passed to <filepath>cntsrv.exe</filepath>. </p> <p>The
       
   268 default behaviour is transitive. For always-on behaviour you must start the
       
   269 server use the <codeph>-nontransient</codeph> option in your system startup
       
   270 file. </p> <codeblock id="GUID-85079652-9D30-5B44-BCDF-8DB41759B2CC" xml:space="preserve">
       
   271 START_PROCESS_INFO
       
   272     {
       
   273     path = "Z:\\sys\\bin\\cntsrv.exe";
       
   274     args = "-nontransient";
       
   275     ...
       
   276     }</codeblock> <p><b>Agenda Server </b> </p> <p>The behaviour of the Agenda Server is determined
       
   277 by a command line argument passed to <filepath>agsvexe.exe</filepath>. </p> <p>The
       
   278 default behaviour is transitive. For always-on behaviour you must start the
       
   279 server use the <codeph>-nontransient</codeph> option in your system startup
       
   280 file. </p> <codeblock id="GUID-DF1BBB3B-8A6E-5F63-B91C-9E4B9A952331" xml:space="preserve">
       
   281 START_PROCESS_INFO
       
   282     {
       
   283     path = "Z:\\sys\\bin\\agsvexe.exe";
       
   284     args = "-nontransient";
       
   285     ...
       
   286     }</codeblock> </section>
       
   287 <section id="GUID-2CACB838-2E72-5723-9511-68EC1D7E3BDD"><title>Window Server</title> <p><b>Flicker Free Redraw and Transparency </b> </p> <p>You can configure the
       
   288 drawing behaviour of the window server by enabling or disabling support for<b>flicker
       
   289 free redraw</b> and <b>transparency</b>. </p> <p>The window server is generally
       
   290 configured to allocate two full-screen bitmaps (which consume over 140kB each
       
   291 on a device with a normal resolution display). </p> <ul>
       
   292 <li id="GUID-E42668D2-7D67-527A-9A4A-A84A58781701"><p>An off-screen bitmap
       
   293 to reduce redraw flicker. Drawing commands between <codeph>BeginRedraw</codeph> and <codeph>EndRedraw</codeph> commands
       
   294 are committed to the off-screen bitmap. Only when <codeph>EndRedraw</codeph> is
       
   295 called does the window server update the screen with the contents of the off-screen
       
   296 bitmap. </p> </li>
       
   297 <li id="GUID-E4334927-57C3-5A1B-A6EF-549AFD203429"><p>A transparency bitmap
       
   298 to support transparent windows. </p> </li>
       
   299 </ul> <p>The allocation of these bitmaps can be configured in <filepath>Wsini.ini</filepath>. </p> <ul>
       
   300 <li id="GUID-B529F499-7FCC-5076-859C-3D0ABF8E0B9B"><p>The presence of the
       
   301 keyword <codeph>FLICKERFREEREDRAW</codeph> causes the off-screen bitmap to
       
   302 be allocated. </p> </li>
       
   303 <li id="GUID-751FB913-C942-5F8D-9A36-0B2727941977"><p>The presence of the
       
   304 keyword <codeph>TRANSPARENCY</codeph> causes <b>both</b> the off-screen and
       
   305 transparency bitmaps to be allocated. </p> </li>
       
   306 <li id="GUID-7D32B174-8E33-5292-9096-3EF0EB825C60"><p>If neither keyword is
       
   307 present no full-screen bitmaps are allocated. </p> </li>
       
   308 </ul> <p> </p> <p>In practice flicker free redraw makes a noticeable improvement
       
   309 to most UIs. If a UI uses transparent windows both bitmaps must be enabled. </p> <p><b>The default window server command buffer </b> </p> <p>Each connection
       
   310 to the window server has a command buffer so that the number of inter-process
       
   311 calls can be reduced. The buffer has a default size (<codeph>EClientBufferSize</codeph>)
       
   312 which is typically the minimum of 640 bytes. Applications can override the
       
   313 default whenever they create an <codeph>RWsSession</codeph>. </p> <p>The default
       
   314 buffer size is defined in <filepath>...\os\graphics\windowing\windowserver\SERVER\w32cmd.h</filepath>  </p> <p>The
       
   315 benefit of a small buffer is reduced RAM use. The benefits of a bigger buffer
       
   316 are reduced IPC (so drawing is more efficient) and reduced flicker. </p> <p> <b>NOTE:</b> Increasing
       
   317 the buffer size to reduce flicker is less effective than using the <codeph>FICKERFREEREDRAW</codeph> feature
       
   318 described above. </p> </section>
       
   319 </conbody></concept>