Beware The Dreaded AR-15 Chainsaw Bayonet

The gun gurus at USA Today attempted to explain, for some reason, not only the features of the Ruger AR-15 used by the demented coward responsible for the Texas church massacre, but the “possible modifications” one can make to an AR as well. Including, naturally, the ever-popular chainsaw bayonet.

Wait. What? Yup. This actually happened. See USA Today’s video below, followed by a small sampling of the internet’s hilarious, meme-laden response…

To be fair, chainsaw bayonets do actually exist. I mean, they’re an $800 gag gift movie prop but, much to everyone’s surprise, somebody did really design one and does [attempt to] sell them.

Anyway, on to the memes!…

via The Truth About Guns
Beware The Dreaded AR-15 Chainsaw Bayonet

MySQL and Linux Context Switches

Context Switches

In this blog post, I’ll look at MySQL and Linux context switches and what is the normal number per second for a database environment.

You might have heard many times about the importance of looking at the number of context switches to indicate if MySQL is suffering from the internal contention issues. I often get the question of what is a “normal” or “acceptable” number, and at what point should you worry about the number of context switches per second?

First, let’s talk about what context switches are in Linux. This StackOverflow Thread provides a good discussion, with a lot of details, but basically it works like this:  

The process (or thread in MySQL’s case) is running its computations. Sooner or later, it has to do some blocking operation: disk IO, network IO, block waiting on a mutex or yield. The execution switches to the other process, and this is called voluntary context switch.On the other hand, the process/thread may need to be preempted by the scheduler because it used an allotted amount of CPU time (and now other tasks need to run) or because it is required to run high priority task. This is called involuntary context switches. When all the process in the system are added together and totaled, this is the system-wide number of context switches reported (using, for example, vmstat):

root@nuc2:~# vmstat 10
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
17  0      0 12935036 326152 2387388    0    0     0     5     0      1  9  0 91  0  0
20  0      0 12933936 326152 2387384    0    0     0     3 32228 124791 77 22  1  0  0
17  0      0 12933348 326152 2387364    0    0     0    11 33212 124575 78 22  1  0  0
16  0      0 12933380 326152 2387364    0    0     0    78 32470 126100 78 22  1  0  0

This is a global number. In many cases, however, it is better to look at it as context switches per CPU logical core. This is because cores execute tasks independently. As such, they have mostly independent causes for context switches. If you have a large number of cores, there can be quite a difference:

MySQL Context Switches

The number of context switches per second on this system looks high (at more than 1,000,000). Considering it has 56 logical cores, however, it is only about 30,000 per second per logical core (which is not too bad).

So how do we judge if the number of context switches is too high in your system? One answer is that it is too high if you’re wasting too much CPU on context switches. This brings up the question: how many context switches can the system handle if it is only doing context switches?

It is easy to find this out!  

Sysbench has a “threads” test designed specifically to measure this. For example:

sysbench --thread-locks=128 --time=7200 --threads=1024 threads run

Check the vmstat output or the Context Switches PMM graph:

MySQL Context Switches 1

We can see this system can handle up to 35 million context switches per second in total (or some 500K per logical CPU core on average).

I don’t recommend using more than 10% of CPU resources on context switching, so I would try to keep the number of the context switches at no more than 50K per logical CPU core.

Now let’s think about context switches from the other side: how many context switches do we expect to have at the very minimum for given load? Even if all the stars align and your query to MySQL doesn’t need any disk IO or context switches due to waiting for mutexes, you should expect at least two context switches: one to the client thread which processes the query and one for the query response sent to the client.    

Using this logic, if we have 100,000 queries/sec we should expect 200,000 context switches at the very minimum.

In the real world, though, I would not worry about contention being a big issue if you have less than ten context switches per query.

It is worth noting that in MySQL not every contention results in a context switch. InnoDB implements its own mutexes and RW-locks, which often try to “spin” to wait for a resource to become available. This wastes CPU time directly rather than doing a context switch.

Summary:

  • Look at the number of context switches per logical core rather than the total for easier-to-compare numbers
  • Find out how many context switches your system can handle per second, and don’t get too concerned if your context switches are no more than 10% of that number
  • Think about the number of context switches per query: the minimum possible is two, and values less than 10 make contention an unlikely issue
  • Not every MySQL contention results in a high number of context switches

via Planet MySQL
MySQL and Linux Context Switches

A Magazine That’s a Clip, Too

At first glance, the HC3R magazine looks like any other 25-rounder for Ruger 10-22. Flip it over, and the unusual structure suggests uncommon features.

hc3r_d6a0062

These magazines can be loaded two ways. The first is like any other; the follower is held down and 25 individual cartridges inserted through the feed lips. This method is fairly slow but it works fine.

In my experience, it reliably fed a variety of ammunition profiles while shooting a 10/22.

Once the magazine has been emptied, lock the magazine follower at the bottom of the  curved body, then push down on the ribbed release latch near the feed tower to free a 20-shot en block clip.

hc3r_d6a0063

The molded raceway holds additional ammunition securely and safe from dust on the inside of the magazine.

hc3r_d6a0065

Insert the loaded clip into the back of the magazine, then unlock the follower and lower it gently. The magazine is now ready for action. This operation can be done with the magazine still in the action.

hc3r_d6a0064

Loading the clips can be done manually, but you can do it much more quickly by placing 20 cartridges into the clip pocket, then scooping them up with the opening of the clip. The entire process takes a couple of seconds without any risk of deforming the bullets by spring pressure. Fully loaded, an HC3R magazine holds 25 rounds ready to fire, and 20 in close reserve.

hc3r_d6a0066

Not only is the loading process quite simple, it also provides a fairly affordable and lightweight method for carrying rimfire ammunition. MSRP for the magazine with one clip is $30, and a 5-pack of clips holding 100 rounds total runs $20 — so the total capacity for one magazine and six clips would be 145 rounds.

The post A Magazine That’s a Clip, Too appeared first on AllOutdoor.com.

via All Outdoor
A Magazine That’s a Clip, Too

Good Guy With A Gun In Texas Story Is Former NRA Instructor

While the story out of Sutherland Springs is heartbreaking, more astute folks are noting that it could have been worse. After all, when the killer had completed with the carnage inside, he stepped out of the church and into the sights of a man named Stephen Willeford who lived near the First Baptist Church.

Willeford was at home when his daughter came into his bedroom to tell him she heard gunshots at the First Baptist Church nearby.

Willeford, a former NRA instructor, got his rifle out of his safe while his daughter looked outside again. She ran back in and told him she saw a man in black tactical gear shooting up the church.

“I kept hearing the shots, one after another, very rapid shots – just ‘pop pop pop pop’ and I knew every one of those shots represented someone, that it was aimed at someone, that they weren’t just random shots,” Willeford said.”

Willeford loaded his magazine and ran across the street to the church, not even taking the time to put on shoes. When Willeford saw the gunman, he exchanged gunfire.

“He saw me and I saw him,” Willeford said. “I was standing behind a pickup truck for cover.”

“I know I hit him,” Willeford said. “He got into his vehicle, and he fired another couple rounds through his side window. When the window dropped, I fired another round at him again.”

 

As the gunman sped away, Willeford approached a pickup truck at a stop sign.

“That guy just shot up the Baptist church. We need to stop him,” he said. Together, Willeford and the driver took off in pursuit. As they caught up to the killer’s vehicle, the truck slowed down. It then sped up eventually went off the road, flipping over into a ditch.

Willeford says he yelled out for the shooter to exit the vehicle, but he didn’t.

That’s because the 26-year-old killer had apparently taken his own life.

In the coming days, as we have seen over the hours since news of this tragedy broke, there will be those who will seek to disarm law-abiding citizens. It’s important that we remember that were it not for Stephen Willeford, the tragedy could have been worse. We’ll never know how much worse it could have been because of his bravery.

Those same voices would have disarmed Willeford. Those same voices would disarm the countless people he’s trained to respond similarly to hostile actions as an NRA instructor.

Willeford has said that he isn’t a hero, but that’s a mistake. He’s the epitome of a good guy with a gun, and that alone makes him a hero. We don’t know how many lives were saved because of his courage and decision to take his personal safety into his own hands. Because of that decision, and his willingness to stand for others, the killer was stopped.

There will be those who claim it was irrelevant, that the killer had done his business in the church, but they forget that it seems likely the church itself wasn’t his target. It was the mother-in-law who was a member there.

Who else could have died because this made has family issues?

Thanks to Stephen Willeford, we won’t actually know.

The post Good Guy With A Gun In Texas Story Is Former NRA Instructor appeared first on Bearing Arms.

via Bearing Arms
Good Guy With A Gun In Texas Story Is Former NRA Instructor

Massachusetts Enacts Bump Fire Stock Ban: Possible Life Imprisonment for Simple Possession

Massachusetts Enacts Bump Fire Stock Ban: Possible Life Imprisonment for Simple Possession

“Massachusetts became the first state to enact a ban on bump stocks following the mass shooting at a Las Vegas music festival,” foxnews.com reports. “Republican Lt. Gov. Karyn Polito signed the bill Friday in her capacity as acting governor because Republican Gov. Charlie Baker is on vacation in California.” The bill’s penalties are beyond harsh . . .

“The provision passed by the legislature allows for excessive punishment including life imprisonment,” The Gun Owners Action League of Massachusetts (GOAL) warned ahead of Polito’s signature, “with a minimum sentence of 18 months, for the mere possession of these accessories.”

The ban — tucked away in a “mini” appropriations bill — gives Bay Staters 90 days to get rid of their bump fire stocks. Not sell. Eliminate. “The legislation was passed leaving no pathway to legal ownership. It also makes it illegal for owners of these items to legally sell them,” GOAL points out. Fifth Amendment that.

Meanwhile, the bill’s supporters are busy using the immediate aftermath of its passage to trumpet the benefits of banning a device which has been used in precisely no crimes in their state.

Democratic state Rep. David Linsky, one of the first in Massachusetts to call for outlawing the devices, said it would make the state safer while respecting the rights of gun owners.

“I am proud of my colleagues in the Legislature for continuing Massachusetts’ reputation as having among the safest and most effective gun laws in the nation,” he said.

That’s one way of looking at it . . .

via The Truth About Guns
Massachusetts Enacts Bump Fire Stock Ban: Possible Life Imprisonment for Simple Possession

Upgrade to a Smart Thermostat For $108, Plus a FREE Echo Dot

While the Nest would beat it in a beauty contest, this Sensi thermostat has most of the same smart features in a more traditional body, and it’s a hell of a lot cheaper.

One of the most notable of those smart features is Alexa support; if there’s an Amazon Echo in range, you can change your home’s temperature with nothing but your voice. For a limited time, you can get the Sensi and an Echo Dot for just $108, which is $71 less than buying them separately, and somewhat incredibly, $21 less than buying the thermostat by itself.


via Gizmodo
Upgrade to a Smart Thermostat For $108, Plus a FREE Echo Dot

Blizzard is making a ‘StarCraft II’ campaign free to play

Blizzard is taking StarCraft 2: Wings of Liberty‘s campaign free to play. As Polygon reports, come November 14th, you’ll have access to the entire narrative and if you already own that, you’ll get the Protoss-themed Heart of the Swarm campaign for free. The other narratives will run you $15 each. Unlike StarCraft II: Starter Edition that included free multiplayer, the adversarial mode that comes in tow here will feature ranked play — not just casual, unranked matches.

It’s a smart move, and free access to ranked multiplayer could be a boon for the StarCraft eSports scene. After all, Dota 2 and League of Legends are both free-to-play (as is Blizzard’s own Heroes of the Storm), and those are doing pretty well for themselves. Valve saw a sizable uptick in players — and money — after making the aging Team Fortress 2 free-to-play, as well.

Source: Polygon

via Engadget
Blizzard is making a ‘StarCraft II’ campaign free to play

Luke Is Back on the Falcon in New The Last Jedi Clip

Still: Star Wars via Twitter

“Darkness rises, and the Light to meet it.” A new clip for The Last Jedi brings Luke Skywalker back to the ship that started it all, but that’s not the only place we see the Millennium Falcon.

The new clip gives us plenty of new glimpses at the upcoming film, including a few surprises. We get a better look at Snoke’s throne room, as well as Finn joining in the Battle on Crait. And look, the Falcon is there too! The Last Jedi arrives December 15, and tickets are currently on sale.

via Gizmodo
Luke Is Back on the Falcon in New The Last Jedi Clip

Ohio State President Drake up for third consecutive $200,000 bonus after ‘terrific year’

Ohio State University President Michael Drake is up for his third raise and maximum bonus in as many years on the job, with trustees citing financial performance and a more hands-on role with the Wexner Medical Center following the departure of its CEO.
Trustees will vote Friday on a 2 percent raise, equal to that for faculty and staff, and the maximum 25 percent bonus of $208,000. The raise would bring his base salary to $849,000, up from $800,000 when he started in 2014.
The committee overseeing…

via Columbus Business News – Local Columbus News | Business First of Columbus
Ohio State President Drake up for third consecutive $200,000 bonus after ‘terrific year’

State of Ohio salaries: Here are the highest-paid officials, plus a searchable database

Ohio’s highest-paid state employees overwhelmingly are psychiatrists at the Ohio Department of Mental Health and Addiction Services. The agency that oversees the state’s mental health hospitals touts a Monday-through-Friday work week and competitive pay on its website for job applicants, but psychiatrists can work overtime if they choose. That’s the case for all but one of the top 18 state-employed earners in 2016, who made an average of $99,202 in overtime pay each last year.
Check out the gallery…

via Columbus Business News – Local Columbus News | Business First of Columbus
State of Ohio salaries: Here are the highest-paid officials, plus a searchable database