Advanced configuration

This guide provides comprehensive documentation for configuring the Lithnet Google Apps Management Agent through the miiserver.exe.config file.

Overview

The Lithnet Google Apps Management Agent supports advanced configuration options to optimize performance, control API rate limits, and manage threading behavior. These settings are configured in the miiserver.exe.config file which is located in the MIM Synchronization Service installation directory.

Most settings will not need to be changed from their defaults, but this guide details all available options for advanced users who need to fine-tune their configuration.

Configuration Structure

Declaring the Configuration Section

First, add the lithnet-google-ma configuration <section> declaration within the <configSections> element, if it does not already exist:

<configuration>
  <configSections>
    <section name="lithnet-google-ma" 
             type="Lithnet.GoogleApps.MA.MAConfigurationSection, Lithnet.GoogleApps.MA" />
  </configSections>

Note: If your miiserver.exe.config file already has a <configSections> element, simply add the <section> declaration to the existing element instead of creating a new one.

Main Configuration Element

All settings are contained within the <lithnet-google-ma> element, which should be placed in the body of the <configuration> element (after </configSections>):

Global Settings

These attributes are set directly on the <lithnet-google-ma> element:

Attribute
Type
Default
Description

export-threads

integer

30

Maximum number of threads used during export operations

import-threads

integer

50

Maximum number of threads used during import operations

Example:

API-Specific Configuration

Directory API

The Directory API is used for user, group, and organizational unit operations.

Attribute
Type
Default
Description

rate-limit

integer

1500

Maximum API requests per 100 seconds

pool-size

integer

30

Connection pool size for API service instances

export-threads-group-member

integer

5

Threads for exporting group membership data

import-threads-group-member

integer

10

Threads for importing group membership data

batch-size-group-member

integer

100

Number of operations per batch for group member changes

concurrent-operations-group-member

integer

10

Maximum concurrent group member operations

Groups Settings API

The Groups Settings API manages group configuration and settings.

Attribute
Type
Default
Description

rate-limit

integer

500

Maximum API requests per 100 seconds

pool-size

integer

30

Connection pool size for API service instances

import-threads-group-settings

integer

30

Threads for importing group settings

Contacts API

The Contacts API manages domain shared contacts.

Attribute
Type
Default
Description

rate-limit

integer

1500

Maximum API requests per 100 seconds

pool-size

integer

30

Connection pool size for API service instances

page-size

integer

1000

Number of contacts retrieved per API page request (minimum: 1)

Calendar API

The Calendar API manages calendar resources and events.

Attribute
Type
Default
Description

rate-limit

integer

1500

Maximum API requests per 100 seconds

pool-size

integer

30

Connection pool size for API service instances

Gmail API

The Gmail API manages Gmail settings and configurations.

Attribute
Type
Default
Description

rate-limit

integer

250

Maximum API requests per 1 seconds

Classroom API

The Classroom API manages Google Classroom courses and memberships.

Attribute
Type
Default
Description

rate-limit

integer

50

Maximum API requests per 10 seconds

pool-size

integer

30

Connection pool size for API service instances

import-threads-course-member

integer

10

Threads for importing course membership data

Complete Configuration Example

Performance Tuning Guidelines

Rate Limits

Rate limits are specified as requests per 100 seconds and should align with Google's API quotas for your organization:

  • Higher rate limits = Faster synchronization but higher risk of hitting quota limits

  • Lower rate limits = Slower synchronization but more stable operation

  • Monitor Google API console for quota usage and adjust accordingly

Threading

Thread counts control parallel operations:

  • More threads = Better performance with adequate system resources

  • Fewer threads = Lower resource usage, better for constrained environments

  • Balance against available CPU cores and memory

Connection Pools

Pool sizes determine how many API service instances are maintained:

  • Larger pools support more concurrent operations

  • Should generally match or exceed thread counts for optimal performance

  • Each pool member consumes memory

Troubleshooting

Contact API Timeouts

If experiencing timeouts with contacts, reduce page-size from the default 1000 to 100 or lower.

Rate Limit Errors

If encountering rate limit errors from Google APIs:

  1. Reduce the rate-limit value for the affected API

  2. Decrease thread counts for related operations

  3. Check your Google API Console quota settings

Important Notes

  • All configuration settings are optional and use sensible defaults if omitted

  • Changes require restarting the MIIServer service to take effect

  • Rate limits are enforced per 100-second rolling window

  • Thread and pool settings affect memory consumption and system resources

  • Configuration is read from miiserver.exe.config

Last updated