It Took an Entire Month to Build This Elaborate Treetop Hot Wheels Track That Includes a Powered Elevator

http://img.youtube.com/vi/GXUU58dhDLg/0.jpg

One of the many joyful things the internet has brought us is seeing people take their favorite childhood toys to the extreme. If you thought the Hot Wheels track you built as a kid that spanned half your house was impressive, it’s time to hang your head in shame while watching this truly amazing treetop layout.

Although the track zig-zags through a towering tree and races along branches, the creators of this course explain on Reddit that they didn’t use a single screw or nail to attach the structure to the tree. It was tied on using string so that when the fun was over the track was easy to remove without causing any permanent damage.

All-in-all the folks behind the Backyard Racing channel estimate it took two whole weeks to design the layout of the treetop track and test that all the various obstacles would work, and another two weeks to put it all together. In addition to the track sections that seem perilously perched atop tree branches, there’s also jumps, full loops, tunnels, Kodi the Australian Shepherd, and countless boosters that keeps the Hot Wheels car zooming along the track when gravity power runs out.

Without a doubt the most impressive feature (with the beautiful Fall foliage coming in at a close second, and the popsicle stick swinging bridge just behind that) is the drill-powered gondola lift that takes Hot Wheels cars from the very bottom of the track all the way back to the highest point in the tree again. Operated by a small Lego minifigure at the controls inside, it turns this whole track into a continuous Hot Wheels roller coaster, but more importantly, it means no one has to climb a ladder every time they want to launch a car.

Gizmodo

Watch: The Infamous ‘WKRP in Cincinnati Turkey Drop!

https://www.louderwithcrowder.com/media-library/image.jpg?id=24807628&width=980

I don’t have many Thanksgiving traditions. One involves a bottle of Pappy I partake in once a year. I sit on the porch with bourbon and a cigar and reflect on the things for which I am most thankful. Mostly bourbon. And content. Sweet, sweet content. I drink my way through whatever lame football matchups are on and wonder what kind of a God would force his children to sit through Joe Buck talking. At some point, I eat. This year I’ll be skipping the Thanksgiving Turkey and instead be making the Thanksgiving Waygu Tri-Tip, smoked over mesquite wood. Try not to be jealous while pretending Aunt Bertha’s turkey isn’t dry AF.

But the day is always started with reliving the infamous WKRP in Cincinnati Turkey Drop of 1978. Since you and I both know you were going to look for this video, too:

They sent Les Nessman to a strip mall, so Herb and Mr. Carlson could throw turkeys out of a helicopter. In 2021, PETA would be involved. MSNBC would claim this was white supremacy. And Les, instead of almost being killed by a man and his two children, would be yelled at for not wearing a mask.

Aaaand the money quote:

As God as my witness, I thought turkeys could fly.

Quite frankly, that was the greatest marketing stunt this side of giving away a hand-etched mug with every annual subscription to the world’s greatest political comedy show.

From all of us here at the Louder with Crowder Dot Com website, have a Happy Thanksgiving!

Get your content free from Big Tech’s filter. Bookmark this website and sign up for our newsletter!


7 BAD Excuses for Alec Baldwin | Louder With Crowder

youtu.be

Louder With Crowder

If you insure through USAA, you might want to check the status of your account…

 

… because it appears some of their customers are having problems.  Beans, blogging at Chant du Depart, describes what he found.

So, there I was, Saturday, planning on holiday meals and planning bills (like car tag renewals and such) and while reviewing my bank statement (on-line, I’m not a total Luddite) and lo and behold, something was missing.

Utilities – check.
Cable/Internet – check.
Rent – check.
Death insurance – check.
Scamazon – check.
Food, food, food, food – check, check, check, check.
Drugs (legal variety) – check.
Car insurance – 
Car insurance – 
CAR INSURANCE!!!???? 

Lo, and behold, the wondrous USAA of which I have been a valued and happy member, thanks to Dad and Mum, for a very long time, has not dunned my account for October or November.

. . .

USAA lady – "Hello, how can I help you?"

Me – "Why have you not dunned my account for October and November?  And does this mean I no longer have car insurance?"

USAA lady – "Well, (goes onto short but clearly understandable explanation of how USAA has gone to new computer system and they migrated most data over, like phone numbers, addresses, email addys, shoe sizes, but not billing info)."

Me – "Just my billing info?  Because that would be my usual luck."

USAA lady – "No, a lot of billing info."

Me – "So you’ve been answering a lot of these calls?"

USAA lady – "Yes."  Deep remorseful sigh…

There’s more at the link.

Of course, I immediately called USAA, and found that our insurance premiums had been debited as usual.  However, our account was no longer listed as "verified", which meant I had to do that at once, otherwise our December premiums would not be withdrawn on time.  That’s in hand right now.

Full marks to USAA for sorting out the potential problem as soon as I queried it;  but it’s not so good that I had to find out about it through a third-party blog on the Internet.  If you insure through USAA, you might want to give them a call to make sure that everything’s on the up and up with your account.

Thanks, Beans, for the heads-up.  It was very timely.

Peter

Bayou Renaissance Man

The Evolution of macOS

https://theawesomer.com/photos/2021/11/history_of_macos_t.jpg

The Evolution of macOS

Link

Apple released its first Macintosh computer back in 1984, running one of the earliest graphical user interfaces for personal computers. The guys at Nobel Tech put together a retrospective of every version of the Macintosh operating system, from its first public release, System 0.97 to the latest version of macOS 12, Monterrey.

The Awesomer

Temporary Tables in MySQL – Never Ending Story?

https://www.percona.com/blog/wp-content/uploads/2021/11/Temporary-Tables-MySQL-300×157.pngTemporary Tables MySQL

Temporary Tables MySQLIf you ever had to deal with performance and/or disk space issues related to temporary tables, I bet you eventually found yourself puzzled. There are many possible scenarios depending on the type of temporary table, settings, and MySQL version used. We have observed a pretty long evolution in that matter due to a couple of reasons. One of them was the need to completely eliminate the need to use the deprecated MyISAM engine, and at the same time introduce more performant and reliable alternatives. Another set of improvements was required related to InnoDB, where it was necessary to lower the overhead of temporary tables using that engine.

For that reason, I decided to gather them in a sort of summary which may help to troubleshoot their usage. Due to vast changes between major MySQL releases, I divided the article by them.

MySQL 5.6

(If you are still using that version, you are encouraged to consider upgrading it soon as it has reached EOL.)

User-Created Temporary Tables

When a table is created using CREATE TEMPORARY TABLE clause, it will use the engine defined by default_tmp_storage_engine (defaults to InnoDB) if not explicitly defined otherwise and will be stored inside the directory defined by the tmpdir variable.

An example one may look like this:

mysql > create temporary table tmp1 (id int, a varchar(10));
Query OK, 0 rows affected (0.02 sec)

mysql > show create table tmp1\G
*************************** 1. row ***************************
Table: tmp1
Create Table: CREATE TEMPORARY TABLE `tmp1` (
`id` int(11) DEFAULT NULL,
`a` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
1 row in set (0.00 sec)

But how do you find the file created on disk that stores this table data? While this query may help:

mysql > select table_id,space,name,path from information_schema.INNODB_SYS_DATAFILES join information_schema.INNODB_SYS_TABLES using (space) where name like '%tmp%'\G
*************************** 1. row ***************************
table_id: 21
space: 7
name: tmp/#sql11765a_2_1
path: /data/sandboxes/msb_5_6_51/tmp/#sql11765a_2_1.ibd
1 row in set (0.00 sec)

We don’t see the original table name here. Even by looking at the buffer pool, we still don’t have the real name:

mysql > select TABLE_NAME from information_schema.INNODB_BUFFER_PAGE where table_name like '%tmp%';
+-------------------------+
| TABLE_NAME              |
+-------------------------+
| `tmp`.`#sql11765a_2_1`  |
+-------------------------+
1 row in set (0.07 sec)

Here comes the extension available in the Percona Server for MySQL 5.6 variant – additional information_schema table: GLOBAL_TEMPORARY_TABLES. With that one, we can craft a query that provides a bit more information:

mysql > select SPACE,TABLE_SCHEMA,TABLE_NAME,ENGINE,g.NAME,PATH from information_schema.GLOBAL_TEMPORARY_TABLES g LEFT JOIN information_schema.INNODB_SYS_TABLES s ON s.NAME LIKE CONCAT('%', g.name, '%') LEFT JOIN information_schema.INNODB_SYS_DATAFILES USING(SPACE)\G
*************************** 1. row ***************************
SPACE: 16
TABLE_SCHEMA: test
TABLE_NAME: tmp1
ENGINE: InnoDB
NAME: #sql12c75d_2_0
PATH: /data/sandboxes/msb_ps5_6_47/tmp/#sql12c75d_2_0.ibd
*************************** 2. row ***************************
SPACE: NULL
TABLE_SCHEMA: test
TABLE_NAME: tmp3
ENGINE: MEMORY
NAME: #sql12c75d_2_2
PATH: NULL
*************************** 3. row ***************************
SPACE: NULL
TABLE_SCHEMA: test
TABLE_NAME: tmp2
ENGINE: MyISAM
NAME: #sql12c75d_2_1
PATH: NULL
3 rows in set (0.00 sec)

So at least for the InnoDB temp table, we can correlate the exact table name with the file path.

Internal Temporary Tables

These are ones created by MySQL in the process of executing a query. We don’t have any access to such tables, but let’s see how we can investigate their usage.

This type is created in memory (using MEMORY engine) as long as its size doesn’t exceed either tmp_table_size or max_heap_table_size variables, and if no TEXT/BLOB columns are in use. If such a table has to be stored on disk though, in MySQL 5.6 it will use MyISAM storage and also tmpdir used as a location. Quick example, on 10M rows sysbench table, query producing big internal temporary table:

mysql > SELECT pad, COUNT(*) FROM sbtest1 GROUP BY pad;

And we can see the related files growing:

$ ls -lh /data/sandboxes/msb_5_6_51/tmp/
total 808M
-rw-rw---- 1 przemek przemek 329M Sep 29 23:24 '#sql_11765a_0.MYD'
-rw-rw---- 1 przemek przemek 479M Sep 29 23:24 '#sql_11765a_0.MYI'

It may be difficult to correlate a particular temp table and its client connection though. The only information I found is:

mysql > select FILE_NAME,EVENT_NAME from performance_schema.file_summary_by_instance where file_name like '%tmp%' \G
*************************** 1. row ***************************
FILE_NAME: /data/sandboxes/msb_5_6_51/tmp/Innodb Merge Temp File
EVENT_NAME: wait/io/file/innodb/innodb_temp_file
*************************** 2. row ***************************
FILE_NAME: /data/sandboxes/msb_5_6_51/tmp/#sql_11765a_0.MYI
EVENT_NAME: wait/io/file/myisam/kfile
*************************** 3. row ***************************
FILE_NAME: /data/sandboxes/msb_5_6_51/tmp/#sql_11765a_0.MYD
EVENT_NAME: wait/io/file/myisam/dfile
3 rows in set (0.00 sec)

MySQL 5.7

User-Created Temporary Tables

As earlier, the default_tmp_storage_engine variable decides on the engine used. But two changes happened here. InnoDB temporary tables now use a common dedicated shared tablespace – ibtmp1, unless it is compressed. Moreover, we have an additional information_schema view: INNODB_TEMP_TABLE_INFO. Given that, we can get information like below:

mysql > select name, FILE_NAME, FILE_TYPE, TABLESPACE_NAME, SPACE, PER_TABLE_TABLESPACE, IS_COMPRESSED from INFORMATION_SCHEMA.INNODB_TEMP_TABLE_INFO join INFORMATION_SCHEMA.FILES on FILE_ID=SPACE\G
*************************** 1. row ***************************
name: #sql12cf58_2_5
FILE_NAME: ./ibtmp1
FILE_TYPE: TEMPORARY
TABLESPACE_NAME: innodb_temporary
SPACE: 109
PER_TABLE_TABLESPACE: FALSE
IS_COMPRESSED: FALSE
*************************** 2. row ***************************
name: #sql12cf58_2_4
FILE_NAME: /data/sandboxes/msb_ps5_7_33/tmp/#sql12cf58_2_4.ibd
FILE_TYPE: TEMPORARY
TABLESPACE_NAME: innodb_file_per_table_110
SPACE: 110
PER_TABLE_TABLESPACE: TRUE
IS_COMPRESSED: TRUE
2 rows in set (0.01 sec)

But again to correlate with a table name, the Percona Server for MySQL extension needs to be used:

mysql > select g.TABLE_SCHEMA, g.TABLE_NAME, name, FILE_NAME, FILE_TYPE, TABLESPACE_NAME, SPACE, PER_TABLE_TABLESPACE, IS_COMPRESSED from INFORMATION_SCHEMA.INNODB_TEMP_TABLE_INFO join INFORMATION_SCHEMA.FILES on FILE_ID=SPACE join information_schema.GLOBAL_TEMPORARY_TABLES g using (name)\G
*************************** 1. row ***************************
TABLE_SCHEMA: test
TABLE_NAME: tmp1
name: #sql12cf58_2_5
FILE_NAME: ./ibtmp1
FILE_TYPE: TEMPORARY
TABLESPACE_NAME: innodb_temporary
SPACE: 109
PER_TABLE_TABLESPACE: FALSE
IS_COMPRESSED: FALSE
*************************** 2. row ***************************
TABLE_SCHEMA: test
TABLE_NAME: tmp3
name: #sql12cf58_2_4
FILE_NAME: /data/sandboxes/msb_ps5_7_33/tmp/#sql12cf58_2_4.ibd
FILE_TYPE: TEMPORARY
TABLESPACE_NAME: innodb_file_per_table_110
SPACE: 110
PER_TABLE_TABLESPACE: TRUE
IS_COMPRESSED: TRUE
2 rows in set (0.01 sec)

Alternatively, to see also MyISAM and related .frm files, we can use:

mysql > SELECT g.TABLE_SCHEMA, g.TABLE_NAME, NAME, f.FILE_NAME, g.ENGINE, TABLESPACE_NAME, PER_TABLE_TABLESPACE, SPACE FROM information_schema.GLOBAL_TEMPORARY_TABLES g join performance_schema.file_instances f ON FILE_NAME LIKE CONCAT('%', g.name, '%') left join INFORMATION_SCHEMA.INNODB_TEMP_TABLE_INFO using (name) left join INFORMATION_SCHEMA.FILES fl on space=FILE_ID order by table_name\G
*************************** 1. row ***************************
TABLE_SCHEMA: test
TABLE_NAME: tmp1
NAME: #sql12cf58_2_5
FILE_NAME: /data/sandboxes/msb_ps5_7_33/tmp/#sql12cf58_2_5.frm
ENGINE: InnoDB
TABLESPACE_NAME: innodb_temporary
PER_TABLE_TABLESPACE: FALSE
SPACE: 109
*************************** 2. row ***************************
TABLE_SCHEMA: test
TABLE_NAME: tmp2
NAME: #sql12cf58_2_6
FILE_NAME: /data/sandboxes/msb_ps5_7_33/tmp/#sql12cf58_2_6.MYD
ENGINE: MyISAM
TABLESPACE_NAME: NULL
PER_TABLE_TABLESPACE: NULL
SPACE: NULL
*************************** 3. row ***************************
TABLE_SCHEMA: test
TABLE_NAME: tmp2
NAME: #sql12cf58_2_6
FILE_NAME: /data/sandboxes/msb_ps5_7_33/tmp/#sql12cf58_2_6.MYI
ENGINE: MyISAM
TABLESPACE_NAME: NULL
PER_TABLE_TABLESPACE: NULL
SPACE: NULL
*************************** 4. row ***************************
TABLE_SCHEMA: test
TABLE_NAME: tmp2
NAME: #sql12cf58_2_6
FILE_NAME: /data/sandboxes/msb_ps5_7_33/tmp/#sql12cf58_2_6.frm
ENGINE: MyISAM
TABLESPACE_NAME: NULL
PER_TABLE_TABLESPACE: NULL
SPACE: NULL
*************************** 5. row ***************************
TABLE_SCHEMA: test
TABLE_NAME: tmp3
NAME: #sql12cf58_2_4
FILE_NAME: /data/sandboxes/msb_ps5_7_33/tmp/#sql12cf58_2_4.frm
ENGINE: InnoDB
TABLESPACE_NAME: innodb_file_per_table_110
PER_TABLE_TABLESPACE: TRUE
SPACE: 110
*************************** 6. row ***************************
TABLE_SCHEMA: test
TABLE_NAME: tmp3
NAME: #sql12cf58_2_4
FILE_NAME: /data/sandboxes/msb_ps5_7_33/tmp/#sql12cf58_2_4.ibd
ENGINE: InnoDB
TABLESPACE_NAME: innodb_file_per_table_110
PER_TABLE_TABLESPACE: TRUE
SPACE: 110
6 rows in set (0.01 sec)

Internal Temporary Tables

For internal temporary tables in 5.7, it is similar in terms of in-memory ones. But the default engine for on-disk temp tables is defined via a new variable: internal_tmp_disk_storage_engine, which now defaults also to InnoDB, and also the ibtmp1 tablespace is used to store its contents.

Insight into this shared temporary tablespace is pretty limited. We can check its size and how much free space is currently available. An example view was taken during heavy query ongoing:

mysql > select FILE_NAME, FILE_TYPE, TABLESPACE_NAME, ENGINE, TOTAL_EXTENTS, FREE_EXTENTS, EXTENT_SIZE/1024/1024 as 'extent in MB', MAXIMUM_SIZE from INFORMATION_SCHEMA.FILES where file_name like '%ibtmp%'\G
*************************** 1. row ***************************
FILE_NAME: ./ibtmp1
FILE_TYPE: TEMPORARY
TABLESPACE_NAME: innodb_temporary
ENGINE: InnoDB
TOTAL_EXTENTS: 588
FREE_EXTENTS: 1
extent in MB: 1.00000000
MAXIMUM_SIZE: NULL
1 row in set (0.00 sec)

And after the query is finished we can see most of the space is freed (FREE_EXTENTS):

mysql > select FILE_NAME, FILE_TYPE, TABLESPACE_NAME, ENGINE, TOTAL_EXTENTS, FREE_EXTENTS, EXTENT_SIZE/1024/1024 as 'extent in MB', MAXIMUM_SIZE from INFORMATION_SCHEMA.FILES where file_name like '%ibtmp%'\G
*************************** 1. row ***************************
FILE_NAME: ./ibtmp1
FILE_TYPE: TEMPORARY
TABLESPACE_NAME: innodb_temporary
ENGINE: InnoDB
TOTAL_EXTENTS: 780
FREE_EXTENTS: 764
extent in MB: 1.00000000
MAXIMUM_SIZE: NULL
1 row in set (0.00 sec)

However, the tablespace won’t be truncated unless MySQL is restarted:

$ ls -lh msb_5_7_35/data/ibtmp*
-rw-r----- 1 przemek przemek 780M Sep 30 19:50 msb_5_7_35/data/ibtmp1

To see the writing activity (which may turn out to be much higher for a single query than total size growth made by it):

mysql > select FILE_NAME, SUM_NUMBER_OF_BYTES_WRITE/1024/1024/1024 as GB_written from performance_schema.file_summary_by_instance where file_name like '%ibtmp%' \G
*************************** 1. row ***************************
FILE_NAME: /data/sandboxes/msb_5_7_35/data/ibtmp1
GB_written: 46.925933837891
1 row in set (0.00 sec)

MySQL 8.0

For simplicity, let’s skip how things worked before 8.0.16 and discuss only how it works since then, as the changes in that matter are quite significant:

  • internal_tmp_disk_storage_engine variable was removed and it is no longer possible to use the MyISAM engine for internal temporary tables
  • shared ibtmp1 table space is no longer used for either temporary table type
  • a pool of new Session Temporary Tablespaces was introduced to handle both user and internal temporary tables on disk and is located by default in the main data directory
  • the new TempTable engine for in-memory tables uses both the space in memory as well as mmapped files on disk

User-Created Temporary Tables

For an example temporary table:

mysql > create temporary table tmp1 (id int, a varchar(10));
Query OK, 0 rows affected (0.00 sec)

mysql > select * from information_schema.INNODB_TEMP_TABLE_INFO;
+----------+----------------+--------+------------+
| TABLE_ID | NAME           | N_COLS | SPACE      |
+----------+----------------+--------+------------+
|     1089 | #sqlbbeb3_a_12 |      5 | 4243767289 |
+----------+----------------+--------+------------+
1 row in set (0.00 sec)

We can correlate which file was used from that pool by looking at the space number:

mysql > select * from INFORMATION_SCHEMA.INNODB_SESSION_TEMP_TABLESPACES ;
+----+------------+----------------------------+-------+----------+-----------+
| ID | SPACE      | PATH                       | SIZE  | STATE    | PURPOSE   |
+----+------------+----------------------------+-------+----------+-----------+
| 10 | 4243767290 | ./#innodb_temp/temp_10.ibt | 81920 | ACTIVE   | INTRINSIC |
| 10 | 4243767289 | ./#innodb_temp/temp_9.ibt  | 98304 | ACTIVE   | USER      |
|  0 | 4243767281 | ./#innodb_temp/temp_1.ibt  | 81920 | INACTIVE | NONE      |
|  0 | 4243767282 | ./#innodb_temp/temp_2.ibt  | 81920 | INACTIVE | NONE      |
|  0 | 4243767283 | ./#innodb_temp/temp_3.ibt  | 81920 | INACTIVE | NONE      |
|  0 | 4243767284 | ./#innodb_temp/temp_4.ibt  | 81920 | INACTIVE | NONE      |
|  0 | 4243767285 | ./#innodb_temp/temp_5.ibt  | 81920 | INACTIVE | NONE      |
|  0 | 4243767286 | ./#innodb_temp/temp_6.ibt  | 81920 | INACTIVE | NONE      |
|  0 | 4243767287 | ./#innodb_temp/temp_7.ibt  | 81920 | INACTIVE | NONE      |
|  0 | 4243767288 | ./#innodb_temp/temp_8.ibt  | 81920 | INACTIVE | NONE      |
+----+------------+----------------------------+-------+----------+-----------+
10 rows in set (0.00 sec)

But again, no way to look for the table name. Fortunately, Percona Server for MySQL still has the GLOBAL_TEMPORARY_TABLES table, so given the three available system views, we can get better information on user-created temporary tables using various engines, like below:

mysql > SELECT SESSION_ID, SPACE, PATH, TABLE_SCHEMA, TABLE_NAME, SIZE, DATA_LENGTH, INDEX_LENGTH, ENGINE, PURPOSE FROM information_schema.GLOBAL_TEMPORARY_TABLES LEFT JOIN information_schema.INNODB_TEMP_TABLE_INFO USING(NAME) LEFT JOIN INFORMATION_SCHEMA.INNODB_SESSION_TEMP_TABLESPACES USING(SPACE)\G
*************************** 1. row ***************************
  SESSION_ID: 10
      SPACE: 4243767290
        PATH: ./#innodb_temp/temp_10.ibt
TABLE_SCHEMA: test
  TABLE_NAME: tmp3
        SIZE: 98304
DATA_LENGTH: 16384
INDEX_LENGTH: 0
      ENGINE: InnoDB
    PURPOSE: USER
*************************** 2. row ***************************
  SESSION_ID: 13
      SPACE: NULL
        PATH: NULL
TABLE_SCHEMA: test
  TABLE_NAME: tmp41
        SIZE: NULL
DATA_LENGTH: 24
INDEX_LENGTH: 1024
      ENGINE: MyISAM
    PURPOSE: NULL
*************************** 3. row ***************************
  SESSION_ID: 13
      SPACE: NULL
        PATH: NULL
TABLE_SCHEMA: test
  TABLE_NAME: tmp40
        SIZE: NULL
DATA_LENGTH: 128256
INDEX_LENGTH: 0
      ENGINE: MEMORY
    PURPOSE: NULL
*************************** 4. row ***************************
  SESSION_ID: 13
      SPACE: 4243767287
        PATH: ./#innodb_temp/temp_7.ibt
TABLE_SCHEMA: test
  TABLE_NAME: tmp33
        SIZE: 98304
DATA_LENGTH: 16384
INDEX_LENGTH: 0
      ENGINE: InnoDB
    PURPOSE: USER
4 rows in set (0.01 sec)

Similar to ibtmp1, these tablespaces are not truncated apart from MySQL restart.

From the above, we can see that user connection 10 has one open InnoDB temporary table, and connection 13 has three temporary tables using three different engines.

Internal Temporary Tables

While a heavy query is running in connection 10, we can get the following views:

mysql > show processlist\G
...
*************************** 2. row ***************************
    Id: 10
  User: msandbox
  Host: localhost
    db: test
Command: Query
  Time: 108
  State: converting HEAP to ondisk
  Info: SELECT pad, COUNT(*) FROM sbtest1 GROUP BY pad

mysql > select * from performance_schema.memory_summary_global_by_event_name where EVENT_NAME like '%temptable%'\G
*************************** 1. row ***************************
                  EVENT_NAME: memory/temptable/physical_disk
                COUNT_ALLOC: 2
                  COUNT_FREE: 0
  SUM_NUMBER_OF_BYTES_ALLOC: 1073741824
    SUM_NUMBER_OF_BYTES_FREE: 0
              LOW_COUNT_USED: 0
          CURRENT_COUNT_USED: 2
            HIGH_COUNT_USED: 2
    LOW_NUMBER_OF_BYTES_USED: 0
CURRENT_NUMBER_OF_BYTES_USED: 1073741824
  HIGH_NUMBER_OF_BYTES_USED: 1073741824
*************************** 2. row ***************************
                  EVENT_NAME: memory/temptable/physical_ram
                COUNT_ALLOC: 12
                  COUNT_FREE: 1
  SUM_NUMBER_OF_BYTES_ALLOC: 1074790400
    SUM_NUMBER_OF_BYTES_FREE: 1048576
              LOW_COUNT_USED: 0
          CURRENT_COUNT_USED: 11
            HIGH_COUNT_USED: 11
    LOW_NUMBER_OF_BYTES_USED: 0
CURRENT_NUMBER_OF_BYTES_USED: 1073741824
  HIGH_NUMBER_OF_BYTES_USED: 1073741824
2 rows in set (0.00 sec)

mysql > select * from INFORMATION_SCHEMA.INNODB_SESSION_TEMP_TABLESPACES where id=10\G
*************************** 1. row ***************************
     ID: 10
  SPACE: 4243767290
   PATH: ./#innodb_temp/temp_10.ibt
   SIZE: 2399141888
  STATE: ACTIVE
PURPOSE: INTRINSIC
*************************** 2. row ***************************
     ID: 10
  SPACE: 4243767289
   PATH: ./#innodb_temp/temp_9.ibt
   SIZE: 98304
  STATE: ACTIVE
PURPOSE: USER
2 rows in set (0.00 sec)

From the above, we can see the query created a huge temporary table, that first exceeded temptable_max_ram variable and continued to grow in a mmapped file (still TempTable engine), but as also temptable_max_mmap was reached, the table had to be converted to on-disk InnoDB intrinsic table. The same pool of temporary InnoDB tables is used in this case, but we can see the purpose information, depending if the table is external (user-created) or internal.

The mmapped file is not visible in the file system as it has deleted state, but can be watched with lsof:

mysqld  862655 przemek   52u      REG              253,3  133644288  52764900 /data/sandboxes/msb_ps8_0_23/tmp/mysql_temptable.8YIGV8 (deleted)

It is important to know here, that as long as mmapped space has not exceeded, the Created_tmp_disk_tables counter is not incremented even though a file is created on disk here.

Also, in Percona Server for MySQL, the extended slow log, the size of temporary tables when the TempTable engine is used, is not accounted for: https://jira.percona.com/browse/PS-5168 – it shows “Tmp_table_sizes: 0”.

In some use cases, there are problems reported with the TempTable. It is possible to switch back to the old Memory engine via the internal_tmp_mem_storage_engine variable if needed.

References

 

Complete the 2021 Percona Open Source Data Management Software Survey

Have Your Say!

Planet MySQL

Swoole vs Roadrunner for Laravel Octane


Laravel Octane is a package from the Laravel team that can massively increase your application’s performance. In a normal PHP application, each HTTP request starts from a completely blank slate. The server will spawn a new PHP process, boot up the framework components and your application code, process the HTTP request, and once the response has been sent to the user it will end the process. Rinse and repeat for every request. This may sound like a huge waste of resources, but it’s actually one of the more compelling reasons to use PHP: you don’t have to care about state between requests which simplifies development. Laravel Octane introduces a very different paradigm. It will boot the framework and your application code once and keep it in memory to re-use between multiple HTTP requests. This comes with large performance improvements at the detriment of the ease of development. Now you need to think about what state is maintained between requests. It’s a tradeoff.

Swoole or Roadrunner?

When you use Laravel Octane you need to decide if you’re going to use the Swoole or Roadrunner web server to serve your application. For somebody who has never been down this path the decision can be overwhelming – after all, there are pros and cons to both and you don’t want to leave useful features on the table by choosing the wrong web server. Below is a comparison between the two based on my own research.

Swoole benefits

Swoole is actually a PHP extension that adds a lot of features to the language that can be used to increase your application’s performance. Due to this, it is considered a lot more featured than Roadrunner. Some of these features include:

  • Concurrent tasks, which allow you to run multiple functions truly asynchronously.
  • Ticks, which allow you to run a function at a specified interval.
  • Octane caching, which adds a ridiculously high performance in-memory cache to your Laravel application.
  • Swoole tables, which is an in-memory data store that is shared between all Swoole processes.

Swoole is also brings higher performance than Roadrunner, as can be seen in this GitHub repository.

Swoole drawbacks

Since Swoole is a PHP extension, you need to specifically compile it into the language during your build step. Depending on how you build and deploy your application this may introduce complexity for you or require you to learn how to build your own PHP installation. Thankfully, a lot of the hard work has been taken care of already. Laravel Sail has Swoole built in to the Docker image for local development, and there are resources online showing you how to get it working in services like Laravel Forge.

Swoole also does not work with Xdebug, the most popular debugging tool in the PHP ecosystem. You can read more about this in the GitHub issue. There was an effort to create a new debugging tool that specifically works with Swoole named yasd, however it is not nearly as mature as Xdebug.

Finally, there are a lot of reports of profiling and monitoring tools such as Datadog and New Relic not working reliably with Swoole due to its use of coroutines and technically running in a CLI environment. This is a departure away from how PHP applications are traditionally deployed, and it seems a lot of these tools have not yet caught up. Here is a good example from the Datadog repository.

Roadrunner benefits

Roadrunner, unlike Swoole, is not a PHP extension but simply a replacement for PHP-FPM. This means it does not need to be compiled into the language itself, making it a lot easier for most people to deploy. In most cases you can simply swap your usage of PHP-FPM directly with Roadrunner and immediately see large performance improvements.

Also unlike Swoole, Roadrunner is reported to work out-of-the-box with tools such as Xdebug. In fact, there is an official documentation page on how to configure your IDE. Profiling and monitoring tools such as Datadog and New Relic, which generally don’t have good support for Swoole, are also reported to be working just fine under applications served with Roadrunner. If you need to monitor your application’s health and performance metrics, this may seal the deal for you provided Roadrunner is giving you the performance your application needs.

Roadrunner drawbacks

There are really only two major drawbacks to using Roadrunner instead of Swoole: it does not add features to the PHP language that would prove useful in an application that demands high performance, and it is not able to serve as high of a request rate as Swoole. Whether you absolutely need that extra bit of performance for your application that Swoole offers is up to you – you must trade it off with the lack of health and performance monitoring, and lack of Xdebug support.

Personally, since I consider health and performance metrics as vital parts of running an application in production, and Roadrunner does give a substantial performance upgrade from PHP-FPM, Roadrunner would be my choice if I was using Laravel Octane.

Laravel News Links

More Rittenhouse Trial Fallout

https://s.w.org/images/core/emoji/12.0.0-1/72×72/1f33a.png

The media gets lots of stories wrong, but the Kyle Rittenhouse story (along with the Russiagate hoax, the “fine people” hoax, and the antifa/BLM “mostly peaceful riots” gaslight) is a story that the mainstream media got intentionally wrong to push a particular narrative. (If you haven’t read it already, this previously linked Bari Weiss piece on the trial is the go-to piece for covering media lies.) As the fallout from media lies continues,

  • Here’s Matt Taibbi

    Kyle Rittenhouse was found not guilty on all six charges today, already causing a great exploding of heads in the pundit-o-sphere. Unrest wouldn’t be surprising. How could it be otherwise? Colleagues in national media spent over a year telling the country the 18-year-old was not just guilty, but a moral monster whose acquittal would be an in-your-face affirmation of systemic white supremacy.

    It used to bother me that journalists were portrayed in pop culture as sniveling, amoral weenies. Take William Atherton’s iconic portrayal in Die Hard of “Thornburg,” the TV-news creep who gasps, “Tell me you got that!” with orgasmic awe when an explosion rocks the Nakatomi building. I got that I’d seen that face on reporters.

    But risking the life of hero John McClane’s wife Holly by putting her name on TV, and getting the info by threatening the family nanny Paulina with an immigration raid? We’re bad, I thought, but not that bad. I got that it was a movie, but my father was a local TV man, and that one stung a bit.

    MSNBC Thursday pulled a Thornburg in real life. Police stopped a man named James Morrison who was apparently following a jury bus, and said he was acting at the direction of a New York-based MSNBC producer named Irene Byon. Even if all you’re after is a post-verdict interview, if a jury gets the slightest whiff that the press is searching out their names and addresses, that’s clear intimidation. People will worry about the safety of their spouses and children as they’re deliberating. Not that it matters to anyone but the defense, prosecution, judge, jury, and taxpayers, but you’re also putting the trial at risk. I’ve covered plenty of celebrity trials, from Michael Jackson to the Enron defendants, and know the identifying-jurors practice isn’t unheard of. However, in a powder-keg case like this, it’s bonkers to play it any way but straight.

    We’ve seen Die Hard-level indifference to social consequence from the beginning of this case. The context of the Rittenhouse shootings involved a summer of protests that began after the police killing of George Floyd, and continued in Kenosha after the shooting of Jacob Blake. We saw demonstrations of all types last summer, ranging from solemn candlelight vigils and thousands of protesters laying peacefully on their backs across bridges, to the burning of storefronts and “hundreds” of car thieves stealing “nearly 80” cars from a dealership in San Leandro, California. When the population is on edge, and people are amped and ready to lash out, that puts an even greater onus on media figures to get things right.

    In a tinderbox situation like this one, it was reckless beyond belief for analysts to tell audiences Rittenhouse was a murderer when many if not most of them had a good idea he would be acquitted. But that’s exactly what most outlets did.

    This is separate and apart from the question of whether or not you like Kyle Rittenhouse, or agree with his politics, or if, as a parent, you would want your own teenager carrying an AR-15 into a chaotic protest zone. The huge media error here was of the “Walls are closing in” variety, except the context was far worse. The “Walls are closing in” stupidity raised vague expectations among #Resistance audiences that at some unfixed point in time, Donald Trump would be pushed from office by scandal. In this case, the same people who poured out onto the streets last summer were told over and over that Rittenhouse was guilty, setting the stage for shock and horror if and when the “wrong” verdict came back.

    Media figures got every element of this story wrong. As documented by TK contributor Matt Orfalea, the Young Turks alone spat out all sorts of misconceptions with shocking inattention: that Rittenhouse was “shooting randomly at people” after falling down, that he’d fired first, that there was no evidence that anyone had raised a gun at him, among many, many other errors. Belatedly, the show conceded some of these problems…

    Snip.

    Joe Scarborough on MSNBC said Rittenhouse unloaded “about sixty rounds” into the crowd (it was eight), adding in another segment that he “drove across state lines and started shooting people up,” and in still another that he was “shooting wildly, running around acting like a rent a cop, trying to protect property in a town he doesn’t know.” (His father and other relatives live there). John Heilemann on the same channel said Rittenhouse was “arguably a domestic terrorist” who “crossed state lines to go and shoot people.” Bakari Sellers, CNN: “The only person who fired shots that night was Kyle Rittenhouse” (he didn’t fire first, and protesters actually fired more rounds).

    In the early days after the shooting, there were widespread reports that Rittenhouse either was a “militia member” or “thought of himself as a militia member,” but these turned out to not be true (he was actually only a member of a Police Explorers program). A well-known politician, squad member Ayanna Pressley, whom I wouldn’t by any means characterize as stupid or generally careless, tweeted a slew of accusations paired with a challenge to media outlets to “fix your damn headlines”

    This was followed by other politicians making similar comments. Congressman Ted Lieu in September of last year said Rittenhouse “drove across state lines and he murdered two protesters,” adding, “Americans of all colors and creeds are seeing that racism and white supremacy are problems we can’t ignore.” Stacy Abrams said Rittenhouse was “willing to drive across state lines in order to commit murder.” Of course, the crowning impropriety, already mentioned in this space, was then-candidate Joe Biden putting Rittenhouse in a campaign ad in which he talked about how Trump “refused to disavow white supremacists” in a debate…

    Snip.

    A scant few outlets bothered to do what The New Yorker did in July of this year, in examining each of these claims one by one. This involved simple things like citing the Anti-Defamation League report covering Rittenhouse:

    Quote:
    There is to date no evidence that Rittenhouse was involved with the Kenosha Guard or showed up as a result of their call to action. Nor is there evidence of ties to other extremist groups, either militia groups or white supremacist groups. Rittenhouse’s social media accounts provided no evidence of ties to extremism prior to the killings.

    The New Yorker also took a sober look at the oft-howled objection that Rittenhouse “crossed state lines,” as if this were somehow an offense in itself (see the Matt Orfalea video above) and quickly determined that news outlets simply didn’t bother to ask a few basic questions about the case:

    Quote:
    Because he lived in Illinois, people assumed that he had travelled some distance, for nefarious purposes, and had “crossed state lines” with his rifle. (The Rittenhouse apartment was a mile south of the Wisconsin border, and Rittenhouse had been storing his gun in Kenosha, at the house of a friend’s stepfather.)

    Because of all of these simple factual misconceptions that Rittenhouse was a militia member and a white supremacist who’d traveled a great distance to a town to which he had no connection, then fired first and indiscriminately analysts not only pre-judged Rittenhouse’s guilt, but offered advance explanations for any possible acquittal.

    Since it was not possible that it was real self-defense, the trial could only be an affirmation of white supremacy’s hold on the judicial system. “I know what white people are willing to do to defend white supremacy,” is how Nation justice correspondent Elie Mystal put it, in a Democracy Now! appearance that casually explained some of Judge Schroeder’s decisions by saying things like, “That’s what racists do.” There’s simply no requirement anymore for substantiating words like “white supremacist” or “racist” in media. We were once terrified to use these words without a lot of backup, but now, we don’t distinguish between a person who attends Richard Spencer rallies and, say, a judge with a “God Bless The U.S.A.” ringtone, or a member of a Police Explorers program.

    Pretty much any use of the phrase “white supremacy” in current political context indicates the one using it is pushing a radical left-wing social justice agenda.

  • Here’s a quick and dirty takedown of various Rittenhouse lies in meme form:
  • GoFundMe, who blocked fundraising for Kyle Rittenhouse, now says he can fundraise now that he no longer needs it.
  • Tiny problem with GoFundMe’s explanation: at the same time they were denying funding to Kyle Rittenhouse’s defense, they were allowing it for accused antifa/#BlackLivesMatter rioters.

    One campaign, titled “CHARGED WITH BANK ROBBERY DURING GEORGE FLOYD RIOT,” has raised $140 of a $40,000 goal for a couple arrested in May last year.

    “My girlfriend was released with no paper, but unfortunately they kept me and charged me with bank larceny,” the description reads, adding that the charges have since changed to “attempted bank robbery.”

    Another titled “Fundraiser for Tuscon Arrestees” is soliciting donations for 12 people who face felony riot charges. The campaign has so far raised nearly $7,200 of a $12,000 goal.

    The “Tia Pugh Legal Defense Fund” is raising money for a 22-year-old Alabama woman arrested for criminal mischief and inciting a riot. The fund has just fallen about $50 short of a $3,000 goal.

    Rittenhouse, however, was unable to collect donations from the website because the then-17-year-old shooter was charged with a violent crime.

  • One cop fired for contributing to Rittenhouse’s defense demands his job back.

    The Norfolk Virginia Police Department fired Sgt. William K. Kelly III for donating anonymously $25 to Kyle Rittenhouse’s defense.

    The department only found out because a hacker group released the information of the anonymous users.

    A jury found Rittenhouse not guilty on all counts.

    Kelly wants his job back.

  • A lot of the left-wing response to the Rittenhouse verdict is that “juries would never acquit black people who used deadly force in self-defense.” A tiny problem with this argument: It’s not true.
  • One rare Democrat not joining the irrational “Kyle Rittenhouse is a white supremacist murderer” mob: Tulsi Gabbard.
  • There was actually a lot less left-wing rioting after the Rittenhouse verdict than expected. The exception: Portland, Oregon. Of course.
  • Oops! Someone said the quit part out-loud again: “This Chicago mob shouted ‘the only solution is communist revolution’ after the Rittenhouse verdict
  • Borepatch has a short meme roundup.
  • I hope Kyle Rittenhouse lawsuits prompt media bankruptcies and house-cleaning of SJW radicals far and wide.

    Lawrence Person’s BattleSwarm Blog