multi-thread seems locked on translog_flush_set_new_goal_and_wait

Asked by 林晓斌

Hi, I use 20 threads to run insert command on a table of aria.

During the test, I see that there are many threads are in the state of "freeing items"
The pstack result shows that they are waiting at translog_flush_set_new_goal_and_wait. There are 6 threads' stat like this:
Thread 8 (Thread 0x54bf3940 (LWP 7546)):
#0 0x00000037ca60ab99 in pthread_cond_wait@@GLIBC_2.3.2 ()
#1 0x0000000000825a07 in translog_flush_set_new_goal_and_wait ()
#2 0x000000000082a621 in translog_flush ()
#3 0x0000000000810a85 in ma_commit ()
#4 0x00000000007f8240 in ha_maria::implicit_commit ()
#5 0x00000000005f77cf in dispatch_command ()
#6 0x00000000005f8b32 in do_command ()
#7 0x00000000005e9a1d in handle_one_connection ()
#8 0x00000037ca6064a7 in start_thread () from /lib64/libpthread.so.0
#9 0x00000037c9ad3c2d in clone () from /lib64/libc.so.6

And 5 like
#0 0x00000037ca60a170 in pthread_rwlock_wrlock () from /lib64/libpthread.so.0
#1 0x0000000000849af3 in maria_write ()
#2 0x000000000070e2a4 in handler::ha_write_row ()
#3 0x0000000000682ac4 in write_record ()
#4 0x0000000000689117 in mysql_insert ()
#5 0x00000000005f294a in mysql_execute_command ()
#6 0x00000000005f7646 in mysql_parse ()
#7 0x00000000005f7ac3 in dispatch_command ()
#8 0x00000000005f8b32 in do_command ()
#9 0x00000000005e9a1d in handle_one_connection ()
#10 0x00000037ca6064a7 in start_thread () from /lib64/libpthread.so.0
#11 0x00000037c9ad3c2d in clone () from /lib64/libc.so.6

Here is the variables , most as default.
+------------------------------------------+---------------------+
| Variable_name | Value |
+------------------------------------------+---------------------+
| aria_block_size | 8192 |
| aria_checkpoint_interval | 30 |
| aria_checkpoint_log_activity | 1048576 |
| aria_force_start_after_recovery_failures | 0 |
| aria_group_commit | none |
| aria_group_commit_interval | 0 |
| aria_log_file_size | 1073741824 |
| aria_log_purge_type | immediate |
| aria_max_sort_file_size | 9223372036853727232 |
| aria_page_checksum | ON |
| aria_pagecache_age_threshold | 300 |
| aria_pagecache_buffer_size | 134217720 |
| aria_pagecache_division_limit | 100 |
| aria_recover | NORMAL |
| aria_repair_threads | 1 |
| aria_sort_buffer_size | 134217728 |
| aria_stats_method | nulls_unequal |
| aria_sync_log_dir | NEWFILE |
| aria_used_for_temp_tables | ON |
+------------------------------------------+---------------------+

Thought the threads do not locked eatch other like Myisam, their tps are almost the same, no advantage of parallelism.

My question is that, is there configure I can set to improve the tps?

Question information

Language:
English Edit question
Status:
Expired
For:
MariaDB Edit question
Assignee:
Oleksandr "Sanja" Byelkin Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Sergei Golubchik (sergii) said :
#2

reopened

Revision history for this message
Sergei Golubchik (sergii) said :
#3

expired