Skip to content

perf: Log requests using high amount of memory as warning - #48738

Merged
juliusknorr merged 1 commit into
masterfrom
perf/log-high-memory-requests
Feb 13, 2025
Merged

perf: Log requests using high amount of memory as warning#48738
juliusknorr merged 1 commit into
masterfrom
perf/log-high-memory-requests

Conversation

@juliusknorr

@juliusknorrjuliusknorr commented Oct 16, 2024

Copy link
Copy Markdown
Member

Should help us finding candidates to optimize more easily.

@juliusknorr
juliusknorr requested review from a team, icewind1991, nickvergessen, skjnldsv and yemkareems and removed request for a teamOctober 16, 2024 16:12
@juliusknorrjuliusknorr added this to the Nextcloud 31 milestone Oct 16, 2024
Comment threadlib/base.php Outdated
Comment threadlib/base.php Outdated
@blizzzblizzz mentioned this pull request Jan 8, 2025
This was referenced Jan 14, 2025
This was referenced Jan 21, 2025
@AndyScherzinger
AndyScherzingerforce-pushed the perf/log-high-memory-requests branch from 6a88895 to 8aa28ecCompareJanuary 26, 2025 12:05
@blizzzblizzz mentioned this pull request Jan 29, 2025
1 task
@blizzzblizzz modified the milestones: Nextcloud 31, Nextcloud 32Jan 29, 2025
@AndyScherzinger
AndyScherzingerforce-pushed the perf/log-high-memory-requests branch from 8aa28ec to 75bf7d5CompareFebruary 12, 2025 21:05
@juliusknorr

Copy link
Copy Markdown
MemberAuthor

Let me address the comment

@juliusknorr
juliusknorrforce-pushed the perf/log-high-memory-requests branch from 75bf7d5 to 19d8fa7CompareFebruary 12, 2025 21:14
Comment threadlib/base.php Outdated
};
if ($logLevel !== null) {
$message = 'Request used more than 300 MB of RAM: ' . Util::humanFileSize($memoryPeak);
$logger = \OCP\Server::get(LoggerInterface::class);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$logger = \OCP\Server::get(LoggerInterface::class);
$logger = Server::get(LoggerInterface::class);

Comment threadlib/base.php Outdated
Comment on lines +836 to +838
$memoryPeak > 500_000_000 => \OCP\ILogger::FATAL,
$memoryPeak > 400_000_000 => \OCP\ILogger::ERROR,
$memoryPeak > 300_000_000 => \OCP\ILogger::WARN,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$memoryPeak > 500_000_000 => \OCP\ILogger::FATAL,
$memoryPeak > 400_000_000 => \OCP\ILogger::ERROR,
$memoryPeak > 300_000_000 => \OCP\ILogger::WARN,
$memoryPeak > 500_000_000 => ILogger::FATAL,
$memoryPeak > 400_000_000 => ILogger::ERROR,
$memoryPeak > 300_000_000 => ILogger::WARN,

Signed-off-by: Julius Knorr <jus@bitgrid.net>
@juliusknorr
juliusknorrforce-pushed the perf/log-high-memory-requests branch from 19d8fa7 to d31bc88CompareFebruary 13, 2025 12:43
@juliusknorr
juliusknorr merged commit 8c69bf1 into masterFeb 13, 2025
@juliusknorr
juliusknorr deleted the perf/log-high-memory-requests branch February 13, 2025 18:50
@juliusknorr

Copy link
Copy Markdown
MemberAuthor

/backport to stable31

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsperformance 🚀

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@juliusknorr@nickvergessen@robertoschwald@solracsf@blizzz@skjnldsv