Memory rising to 29Gb in one hour run
まだ誰も着手していません。
評価
調査の方向性
提供された SetData メソッド、WriteMeasurements 呼び出し、DomainEntityConverter.ConvertToPointData の実装から始めます。500 サンプルを 1 秒間隔で処理する報告済みの 200 件の並列呼び出しを再現し、その後、クライアントのバッファリングによってデータが保持されるのか、それとも使用パターンが原因なのかを判断します。メモリの挙動が説明され、修正変更またはサポートされている使用方法のガイダンスが特定されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Steps to reproduce:
List the minimal actions needed to reproduce the behavior.
- Singleton InfluxDBClient instance used for all writes. Single writeApi used for all calls throughout
client = new InfluxDBClient(url, Token);
var writeOptions = new WriteOptions
{
BatchSize = 5000,
FlushInterval = 500,
JitterInterval = 0,
};
converter = new DomainEntityConverter();
writeApiConv = client.GetWriteApi(writeOptions, converter);
// Below set data is called with other test client with load like:
// 200 parellel calls with each call having 500 samples, this is equal to 1lakh tags (or point data).
// Above load is called at every 1 second interval.
// Observation: Good news (happy with) writes are pretty fast in ~100ms, 200 parallel calls finishes easily.
// My main concern is memory rise.

Below details are for 10 min run memory going to ~15GB



public async Task SetData(SetDataRequest dataRequest, string bucket = bucketTagAsMeasurementName_Conv)
{
var data = new List<StaticTagAsMeasurement2>();
foreach (var sampleSet in dataRequest.SampleSets)
{
for (int sampleIndex = 0; sampleIndex < sampleSet.Samples.Count; sampleIndex++)
{
var sample = sampleSet.Samples[sampleIndex];
data.Add(new StaticTagAsMeasurement2
{
Id = Guid.Parse(sampleSet.TagId),
HashId = sampleSet.TagId.GetHashCode(),
Value = double.Parse(sample.Value.ToString()),
DataStatus = sample.DataStatus,
NodeStatus = sample.NodeStatus,
IsValid = sample.DataStatus == 0,
Time = sample.Timestamp
});
}
}
writeApiConv.WriteMeasurements(data, WritePrecision.Ns, bucket, orgName);
}
// I tried first with commented PointData approach & then with PointData.Builder approach - same memory rise with both.
DomainEntityConverter{
public PointData ConvertToPointData<T>(T entity, WritePrecision precision)
{
if (entity is StaticTagAsMeasurement2 tag2)
{
var pointBuilder = PointData.Builder.Measurement(tag2.Id.ToString());
pointBuilder = pointBuilder.Field("hashId", tag2.HashId);
pointBuilder = pointBuilder.Field("value", tag2.Value);
pointBuilder = pointBuilder.Field("isValid", tag2.IsValid);
pointBuilder = pointBuilder.Field("dataStatus", tag2.DataStatus);
pointBuilder = pointBuilder.Field("nodeStatus", tag2.NodeStatus);
pointBuilder = pointBuilder.Timestamp(new DateTime(tag2.Time, DateTimeKind.Utc), precision);
return pointBuilder.ToPointData();
// var pointData = PointData
//.Measurement(tag2.Id.ToString())
//.Field("hashId", tag2.HashId);
//.Field("value", tag2.Value)
//.Field("isValid", tag2.IsValid)
//.Field("dataStatus", tag2.DataStatus)
//.Field("nodeStatus", tag2.NodeStatus)
//.Timestamp(new DateTime(tag2.Time, DateTimeKind.Utc), precision);
// return pointData;
}
}
}
Expected behavior:
The memory should be stable say around 1GB so that long runs can be achieved
Actual behavior:
Memory is rising very fast
Specifications:
- Client Version:
- InfluxDB Version: v2.6
- Platform: Intel(R) Core(TM) i7-9850H CPU @ 2.60GHz 2.59 GHz
64.0 GB (63.7 GB usable)
64-bit operating system, x64-based processor
- 主要言語
- C#
- スター
- 377
- フォーク
- 93
- 平均マージ
- 9日 2時間
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
influxdata/influxdb-client-csharp のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
influxdata/influxdb-client-csharp#642 · コメント 1 件 ·
-
Reduce dependencies by adding TFM再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
-
question
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
influxdata/influxdb-client-csharp#623 · コメント 3 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 30/100
influxdata/influxdb-client-csharp#586 · コメント 2 件 ·
influxdata/influxdb-client-csharp の issue をすべて見る
似ている issue
-
bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
nightscout/nocturne#4057 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
fluentmigrator/fluentmigrator#2463 ·
メンテナーはふだん 1 日以内に返信
-
[Windows] Hidden title bar: a maximized window restored from minimized on a secondary monitor gets the primary monitor's work area as its client area対応中かも @lijy91 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
libnativeapi/nativeapi#53 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
anti_entropy_register : instrument_inchange compare le blob, pas le code (un commentaire re-orpheline une reference)対応中かも @jsboige が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
jsboige/CoursIA#28257 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100