Re: [Maria-discuss] Are some MyISAM settings used for Aria
Hi Jocelyn, The article you linked is quite old, so I wanted to check the source code to find if something changed. I didn't investigate much but I searched in MariaDB's master branch via GitHub. The search strings were 'read_rnd_buffer_size' and 'read-rnd-buffer-size'. I found nothing except for some test files and the variable initialization at server startup. I repeated the same searches in MySQL master branch, and again, I found only tests and initialization. Can you explain this? The variable is unused now? Federico -------------------------------------------- Lun 24/4/17, jocelyn fournier <jocelyn.fournier@gmail.com> ha scritto: Oggetto: Re: [Maria-discuss] Are some MyISAM settings used for Aria A: "Sales" <info@smallbusinessconsultingexperts.com> Cc: "Maria Discuss" <maria-discuss@lists.launchpad.net> Data: Lunedì 24 Aprile 2017, 09:16 Hi Steve, Le 24 avr. 2017 3:28 AM, "Sales" <info@smallbusinessconsultingexperts.com> a écrit : On Apr 23, 2017, at 4:12 PM, jocelyn fournier <jocelyn.fournier@gmail.com> wrote: Hi Steve, Le 23/04/2017 à 19:32, Sales a écrit : On our system, Mariadb 10.1.22, with aria_used_for_temp_tables = ON, we have a set of MyISAM settings carried over from an earlier setup. Those settings are: key_buffer_size=256M myisam_sort_buffer_size = 64M join_buffer_size=512K bulk_insert_buffer_size=512M read_rnd_buffer_size = 1M read_rnd_buffer_size and join_buffer_size are not MyISAM specific settings, did you try to modify/not modify only those ones ? HTH, Jocelyn Really? So, the doc is wrong? https://mariadb.com/kb/en/ mariadb/server-system- variables/#read_rnd_buffer_ size Says, MyISAM. So, are you saying that is mistaken? If so, that would make sense At least according to https://www.percona.com/blog/2007/07/24/what-exactly-is-read_rnd_buffer_size... it's not. BTW it has been updated in the mysql manual to mention it optimizes mrr for any engine :https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_... MariaDB KB would need an update as well. Jocelyn _______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
On Apr 24, 2017, at 8:14 AM, Federico Razzoli <federico_raz@yahoo.it> wrote:
Hi Jocelyn,
The article you linked is quite old, so I wanted to check the source code to find if something changed. I didn't investigate much but I searched in MariaDB's master branch via GitHub. The search strings were 'read_rnd_buffer_size' and 'read-rnd-buffer-size'. I found nothing except for some test files and the variable initialization at server startup. I repeated the same searches in MySQL master branch, and again, I found only tests and initialization. Can you explain this? The variable is unused now?
One use of read_rnd_buffer_size was with mrr in MySQL. After the changeover to Mariadb, we missed that Mariadb uses mrr_buffer_size instead of read_rnd_buffer_size. You probably know that, but, just pointing out one place where it would have been removed from the code. Steve
Hi Federico! Le 24/04/2017 à 18:56, Sales a écrit :
On Apr 24, 2017, at 8:14 AM, Federico Razzoli <federico_raz@yahoo.it> wrote:
Hi Jocelyn,
The article you linked is quite old, so I wanted to check the source code to find if something changed. I didn't investigate much but I searched in MariaDB's master branch via GitHub. The search strings were 'read_rnd_buffer_size' and 'read-rnd-buffer-size'. I found nothing except for some test files and the variable initialization at server startup. I repeated the same searches in MySQL master branch, and again, I found only tests and initialization. Can you explain this? The variable is unused now? You should search read_rnd_buff_size, it's used in sql/records.cc to compute the size of the cache_records in the READ_RECORD struct.
Jocelyn
On Apr 24, 2017, at 3:04 PM, jocelyn fournier <jocelyn.fournier@gmail.com> wrote:
You should search read_rnd_buff_size, it's used in sql/records.cc to compute the size of the cache_records in the READ_RECORD struct.
But, the original link implied use with mrr, however, this page: https://mariadb.com/kb/en/mariadb/multi-range-read-optimization/ <https://mariadb.com/kb/en/mariadb/multi-range-read-optimization/> Says: "MariaDB uses mrr_buffer_size as a limit of MRR buffer size for range access, while MySQL uses read_rnd_buffer_size.” So, I guess it is still used, but, not for mrr. Steve
Le 24/04/2017 à 23:05, Sales a écrit :
On Apr 24, 2017, at 3:04 PM, jocelyn fournier <jocelyn.fournier@gmail.com <mailto:jocelyn.fournier@gmail.com>> wrote:
You should search read_rnd_buff_size, it's used in sql/records.cc <http://records.cc> to compute the size of the cache_records in the READ_RECORD struct.
But, the original link implied use with mrr, however, this page:
https://mariadb.com/kb/en/mariadb/multi-range-read-optimization/
Says:
"MariaDB uses mrr_buffer_size as a limit of MRR buffer size for range access, while MySQL uses read_rnd_buffer_size.”
So, I guess it is still used, but, not for mrr. Yes it's not anymore mrr specific. The doc from the MariaDB source code is great to understand what it does :
rr_from_cache: -------------- This is a special variant of rr_from_tempfile that can be used for handlers that is not using the HA_FAST_KEY_READ table flag. Instead of reading the references one by one from the temporary file it reads a set of them, sorts them and reads all of them into a buffer which is then used for a number of subsequent calls to rr_from_cache. It is only used for SELECT queries and a number of other conditions on table size. and init_read_record is used to scan by using a number of different methods. Which method to use is set-up in this call so that later calls to the info->read_record will call the appropriate method using a function pointer. There are five methods that relate completely to the sort function filesort. The result of a filesort is retrieved using read_record calls. The other two methods are used for normal table access. The filesort will produce references to the records sorted, these references can be stored in memory or in a temporary file. The temporary file is normally used when the references doesn't fit into a properly sized memory buffer. For most small queries the references are stored in the memory buffer. https://raw.githubusercontent.com/MariaDB/server/bb2c1a52c61706dde8c525a8887... Jocelyn
participants (3)
-
Federico Razzoli
-
jocelyn fournier
-
Sales