Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
4d9335d2
Commit
4d9335d2
authored
Jan 16, 2014
by
John Esmet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes #152 Add accounting for long input buffer wait stalls in the
logger
parent
42824104
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
0 deletions
+8
-0
ft/log-internal.h
ft/log-internal.h
+1
-0
ft/logger.cc
ft/logger.cc
+6
-0
ft/logger.h
ft/logger.h
+1
-0
No files found.
ft/log-internal.h
View file @
4d9335d2
...
...
@@ -177,6 +177,7 @@ struct tokulogger {
uint64_t
num_writes_to_disk
;
// how many times did we write to disk?
uint64_t
bytes_written_to_disk
;
// how many bytes have been written to disk?
tokutime_t
time_spent_writing_to_disk
;
// how much tokutime did we spend writing to disk?
uint64_t
num_wait_buf_long
;
// how many times we waited >= 100ms for the in buf
void
(
*
remove_finalize_callback
)
(
DICTIONARY_ID
,
void
*
);
// ydb-level callback to be called when a transaction that ...
void
*
remove_finalize_callback_extra
;
// ... deletes a file is committed or when one that creates a file is aborted.
...
...
ft/logger.cc
View file @
4d9335d2
...
...
@@ -422,9 +422,13 @@ wait_till_output_available (TOKULOGGER logger)
// Exit: Holds the output_condition_lock and logger->output_is_available
//
{
tokutime_t
t0
=
toku_time_now
();
while
(
!
logger
->
output_is_available
)
{
toku_cond_wait
(
&
logger
->
output_condition
,
&
logger
->
output_condition_lock
);
}
if
(
tokutime_to_seconds
(
toku_time_now
()
-
t0
)
>=
0.100
)
{
logger
->
num_wait_buf_long
++
;
}
}
static
void
...
...
@@ -1397,6 +1401,7 @@ status_init(void) {
STATUS_INIT
(
LOGGER_BYTES_WRITTEN
,
LOGGER_WRITES_BYTES
,
UINT64
,
"writes (bytes)"
,
TOKU_ENGINE_STATUS
|
TOKU_GLOBAL_STATUS
);
STATUS_INIT
(
LOGGER_UNCOMPRESSED_BYTES_WRITTEN
,
LOGGER_WRITES_UNCOMPRESSED_BYTES
,
UINT64
,
"writes (uncompressed bytes)"
,
TOKU_ENGINE_STATUS
|
TOKU_GLOBAL_STATUS
);
STATUS_INIT
(
LOGGER_TOKUTIME_WRITES
,
LOGGER_WRITES_SECONDS
,
TOKUTIME
,
"writes (seconds)"
,
TOKU_ENGINE_STATUS
|
TOKU_GLOBAL_STATUS
);
STATUS_INIT
(
LOGGER_WAIT_BUF_LONG
,
LOGGER_WAIT_LONG
,
UINT64
,
"count"
,
TOKU_ENGINE_STATUS
|
TOKU_GLOBAL_STATUS
);
logger_status
.
initialized
=
true
;
}
#undef STATUS_INIT
...
...
@@ -1414,6 +1419,7 @@ toku_logger_get_status(TOKULOGGER logger, LOGGER_STATUS statp) {
// No compression on logfiles so the uncompressed size is just number of bytes written
STATUS_VALUE
(
LOGGER_UNCOMPRESSED_BYTES_WRITTEN
)
=
logger
->
bytes_written_to_disk
;
STATUS_VALUE
(
LOGGER_TOKUTIME_WRITES
)
=
logger
->
time_spent_writing_to_disk
;
STATUS_VALUE
(
LOGGER_WAIT_BUF_LONG
)
=
logger
->
num_wait_buf_long
;
}
*
statp
=
logger_status
;
}
...
...
ft/logger.h
View file @
4d9335d2
...
...
@@ -244,6 +244,7 @@ typedef enum {
LOGGER_BYTES_WRITTEN
,
LOGGER_UNCOMPRESSED_BYTES_WRITTEN
,
LOGGER_TOKUTIME_WRITES
,
LOGGER_WAIT_BUF_LONG
,
LOGGER_STATUS_NUM_ROWS
}
logger_status_entry
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment