Couchbase .NET SDK __CB_SDK_VERSION__

Show / Hide Table of Contents

Class TuningOptions

Options for performance tuning specific to the .NET SDK.

Inheritance
object
TuningOptions
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Couchbase
Assembly: Couchbase.NetClient.dll
Syntax
public class TuningOptions

Constructors

View Source

TuningOptions()

Declaration
public TuningOptions()

Properties

View Source

MaximumInFlightOperationsPerConnection

Maximum number of operations which may be sent and still awaiting a response from the server per connection. This value may need tuning on high latency connections or based on average operation response size. Defaults to 16 operations per connection.

Declaration
[InterfaceStability(Level.Volatile)]
public int MaximumInFlightOperationsPerConnection { get; set; }
Property Value
Type Description
int
Remarks

Note that this is not directly limiting the total number of in-flight operations, each bucket and each node gets a dedicated pool of connections that scale based on the minimum and maximum pool size. This limit is per connection.

This limit only applies to operations sent on the wire and awaiting a response. Operations waiting to be retried do not count against this limit. Operations being encoded or decoded also do not count towards this limit.

View Source

MaximumOperationBuilderCapacity

Maximum size of a buffer used for building key/value operations to be sent to the server which will be retained for reuse. Buffers larger than this value will be disposed. If your application is consistently sending mutation operations larger than this value, increasing the value may improve performance at the cost of RAM utilization. Defaults to 1MB.

Declaration
[InterfaceStability(Level.Volatile)]
public int MaximumOperationBuilderCapacity { get; set; }
Property Value
Type Description
int
View Source

MaximumRetainedOperationBuilders

Maximum number of buffers used for building key/value operations to be sent to the server which will be retained for reuse. If your application has a very high degree of parallelism (for example, a very large number of data nodes), increasing this number may improve performance at the cost of RAM utilization. Defaults to the 4 times the number of logical CPUs.

Declaration
[InterfaceStability(Level.Volatile)]
public int MaximumRetainedOperationBuilders { get; set; }
Property Value
Type Description
int
View Source

StreamHttpResponseBodies

If enabled, HTTP responses such as query responses will be streamed after response headers are received rather than waiting for the entire response body to be received. This defaults to true on modern .NET runtimes and false on .NET 4.x.

Declaration
[InterfaceStability(Level.Volatile)]
public bool StreamHttpResponseBodies { get; set; }
Property Value
Type Description
bool
Remarks

When enabled it becomes more important to call Dispose() on result objects such as IQueryResult<T> and IAnalyticsResult<T> to ensure the underlying HTTP connection is released. This is especially true on .NET 4.x where failure to dispose may cause issues with connection pool exhaustion.

  • View Source
In this article
Back to top Copyright © 2020 Couchbase, Inc. All rights reserved.