You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2022/05/17 21:41:18 UTC
[GitHub] [trafficserver] bneradt opened a new pull request, #8855: Expand the Http* error.log buffer to 16 KB.
bneradt opened a new pull request, #8855:
URL: https://github.com/apache/trafficserver/pull/8855
Many URLs and log paths are long enough that the previous 256 byte
error.log limit for HttpSM and HttpTransact made it so that the logs got
truncated. Some of those logs had meaningful strings at the end which
made them hard to interpret unless you had the source code in front of
you to figure out what was truncated. This expands the buffer size of
those error log entries to 16 KB to avoid truncation in the vast
majority of cases and thus make those entries more readable.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] bneradt merged pull request #8855: Allow for long Http* error.log lines
Posted by GitBox <gi...@apache.org>.
bneradt merged PR #8855:
URL: https://github.com/apache/trafficserver/pull/8855
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] bneradt commented on pull request #8855: Expand the Http* error.log buffer to 16 KB.
Posted by GitBox <gi...@apache.org>.
bneradt commented on PR #8855:
URL: https://github.com/apache/trafficserver/pull/8855#issuecomment-1129392424
[approve ci autest]
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] bryancall commented on pull request #8855: Allow for long Http* error.log lines
Posted by GitBox <gi...@apache.org>.
bryancall commented on PR #8855:
URL: https://github.com/apache/trafficserver/pull/8855#issuecomment-1135225814
@cmcfarlen will review this
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] bryancall commented on pull request #8855: Allow for long Http* error.log lines
Posted by GitBox <gi...@apache.org>.
bryancall commented on PR #8855:
URL: https://github.com/apache/trafficserver/pull/8855#issuecomment-1130265617
Here is a benchmark I wrote testing thread_local strings vs locally scoped. Personally I don't think it is worth saving less than 1 microsecond for error messages to have thread_local.
Benchmark results:
```
----------------------------------------------------------------------------
Benchmark Time CPU Iterations
----------------------------------------------------------------------------
thread_local_benchmark/threads:12 139 ns 1496 ns 538452
local_scope_benchmark/threads:12 6.68 ns 80.0 ns 8045064
```
Code:
```
#include <benchmark/benchmark.h>
#include <thread>
//----------------------------------------------------------------------------
static void thread_local_benchmark(benchmark::State& state) {
for (auto _ : state) {
thread_local std::string str;
str.append("dlk alsdkfjsaldkfj alskdfjasldk alskdfjlasdk ldsasdkfjalsdkfj lkj falskdjfla sdjfjlsjdfl alsdjkflsfj");
str.append("jfghkjirtyu fj alskdfjasldk alskdfjladk lasdkfjalsdkfj lkj falskdjfla sdjfjlsjdfl alsdjkflsfjdlk alsdkfjsaldkasdfasdfasd asdfasddf asdfasdf asdfasdf asdfasdfasdf afghjfghk alskdfjlasdk lasdkfjalsdkfj lkj falskdjfla sdjfjlsjdfl alsdjkflsfjdlk alsdkfjsaldkasdfasdfasd asdfasddf asdfasdf asdfasdf asdfasdfasdf afghjfghkjirtyu fj alskdfjasldk alskdfjlasdk lasdkfjalsdkfj lkj falskdjfla sdjfjlsjdfl alsdjkflsfjdfasd asdfasddf asdfas fj alskdfjasllasdk lasdkfjalsdkfj lkj falskdjfla sdjfjlsjdfl alsdjkflsfj");
}
}
//----------------------------------------------------------------------------
static void local_scope_benchmark(benchmark::State& state) {
for (auto _ : state) {
std::string str;
str.append("dlk alsdkfjsaldkfj alskdfjasldk alskdfjlasdk ldsasdkfjalsdkfj lkj falskdjfla sdjfjlsjdfl alsdjkflsfj");
str.append("jfghkjirtyu fj alskdfjasldk alskdfjladk lasdkfjalsdkfj lkj falskdjfla sdjfjlsjdfl alsdjkflsfjdlk alsdkfjsaldkasdfasdfasd asdfasddf asdfasdf asdfasdf asdfasdfasdf afghjfghk alskdfjlasdk lasdkfjalsdkfj lkj falskdjfla sdjfjlsjdfl alsdjkflsfjdlk alsdkfjsaldkasdfasdfasd asdfasddf asdfasdf asdfasdf asdfasdfasdf afghjfghkjirtyu fj alskdfjasldk alskdfjlasdk lasdkfjalsdkfj lkj falskdjfla sdjfjlsjdfl alsdjkflsfjdfasd asdfasddf asdfas fj alskdfjasllasdk lasdkfjalsdkfj lkj falskdjfla sdjfjlsjdfl alsdjkflsfj");
}
}
BENCHMARK(thread_local_benchmark)->Threads(12);
BENCHMARK(local_scope_benchmark)->Threads(12);
BENCHMARK_MAIN();
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] bneradt commented on pull request #8855: Allow for long Http* error.log lines
Posted by GitBox <gi...@apache.org>.
bneradt commented on PR #8855:
URL: https://github.com/apache/trafficserver/pull/8855#issuecomment-1130292932
> Thread local was actually slower in the benchmark I did.
>
Thank you for doing the benchmark! I'll use a undecorated std::string. Either way, this isn't hot code. Might as well keep it more simple, especially if thread_local can pessimize performance.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] zwoop commented on pull request #8855: Allow for long Http* error.log lines
Posted by GitBox <gi...@apache.org>.
zwoop commented on PR #8855:
URL: https://github.com/apache/trafficserver/pull/8855#issuecomment-1150450112
Cherry-picked to v9.2.x
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] zwoop commented on pull request #8855: Allow for long Http* error.log lines
Posted by GitBox <gi...@apache.org>.
zwoop commented on PR #8855:
URL: https://github.com/apache/trafficserver/pull/8855#issuecomment-1150450111
Cherry-picked to v9.2.x
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org