‘Calling Facebook a toilet is a little unfair to toilets’: HBO’s John Oliver flush with anger for social giant

“Last Week Tonight with John Oliver” got in its digs at tech companies on Sunday night. The show’s jab at Zillow was child’s play compared to how the host took down Facebook and the role the social giant is playing in cultures and communities overseas.
In his nearly 20-minute main story on his weekly HBO show, Oliver focused on Facebook’s impact in Myanmar in particular where internet use — and Facebook use especially — has exploded in recent years.
But the story goes beyond distracted teens and delves into serious concerns about ethnic cleansing. Certainly Facebook was not to blame for genocide in Myanmar, Olivers stressed, but the service did inflame pre-existing tensions he said. Oliver pointed to a report by independent U.N. investigators who said “Facebook has been a useful instrument for those seeking to spread hate.”
Because Oliver is a comedian, it’s not all super heavy and he does pepper his monologue with plenty of zingers:
- “Facebook: The worst place to wish happy birthday to a friend, other than a funeral.”
- Mark Zuckerberg, while explaining Facebook’s early motto “Move fast and break things,” said, “Sometimes we go too fast and we mess up a bunch of stuff and we have to fix it. And that’s cool.” Oliver asked, “Is that cool? That seems like the most reckless corporate motto since the Hindenberg company’s “Flay fast and smoke cigarettes in a big bag of hydrogen!”
- “Calling Facebook a toilet is a little unfair to toilets, because they make s*it go away, whereas Facebook retains s*it, disseminates s*it to your acquaintances, and reminds you of s*it from seven years ago, all while allowing corporations to put there s*it in front of you. There is a purity and integrity to toilets that Facebook seriously lacks.”
But Oliver gets at the seriousness of the issue in Myanmar and the tensions between different ethnic factions quite convincingly, and he wonders why so much hate speech in the country stayed up for so long on the site — which has rules against that sort of thing.
“No one should be judged by the worst things people say about them on Facebook,” Oliver argued.
Watch the full video above.
via GeekWire
‘Calling Facebook a toilet is a little unfair to toilets’: HBO’s John Oliver flush with anger for social giant
The Best Hand Mixer
The Breville Handy Mix Scraper was the most versatile, effective mixer of any we tried, with the most functional attachments and useful features that make it a joy to use in the kitchen. With nine speeds that can toggle from powerful to gentle, it made the best cookies, sponge cake, and pizza dough in our tests. It had the most unique and intelligent design of any mixer we tried, with a built-in timer, a button to pause mixing, a light that shines into the bowl, and rubber-coated scrapers. As a bonus, it was also the simplest to clean and store compared with other mixers. We think this superior mixer is worth its relatively high cost, but the Cuisinart Power Advantage Plus 9-Speed Hand Mixer is a steadfast budget option if you want a pared-down machine for occasional tasks.
The Breville excelled in all of our tests. It was powerful enough to blend the thick cookie dough without straining, and its coated beaters helped keep all of the ingredients from climbing up the sides of the bowl. Each baked cookie was well-mixed with an even distribution of the good, chunky morsels we wanted in every bite—chewy raisins, chopped walnuts, chocolate chips, and flakes of coconut. The sponge cake it produced had an even crumb, a delicate texture, and the least air bubbles of any we baked. It was also one of the loftiest, unlike the VonShef’s cake, which sunk in the middle and at the sides. The Breville’s dough hook was even able to mix pizza dough pretty well, whacking it around to create a single ball, whereas the VonShef and the KitchenAid created stringier doughs that we had to take out of the bowl and shape on the counter. After whipping eggs and sugar for the requisite seven minutes, the Handy Mix produced just under a quart of seven-minute frosting—slightly less than the Cuisinart— but it was still fluffy, spreadable, and delicious.
Compared with those of other mixers, the Breville’s attachments stood out for their more thoughtful design and effective mixing capabilities. Rubber-coated beaters on the Breville do a better job of scraping the sides and bottom of the bowl compared with other models’ beaters, and help with noise control. “It doesn’t make a racket if you’re mixing stuff in a metal bowl,” said Lopez, who also owns this mixer. And we didn’t have to scrape the bowl with a spatula as often as with the Cuisinart when mixing our cookie dough with the beater attachment. The Breville’s two whisk attachments actually work to whip eggs for sponge cake or meringue, while we had to use the beater attachment to get similar results with all of the other mixers, which had only one whisk. In our genoise test, we found that the Breville’s whisk attachments actually worked better than the beaters at aeration (we tried both), making a more evenly baked cake.
With its clever extra features, the Breville was by far the easiest and most enjoyable mixer to use of any we tested. A screen with a built-in timer helps keep track for time-sensitive recipes, which I found especially useful when making seven-minute frosting. The timer also has a pause button, so you can stop mixing, add ingredients or scrape down your bowl, and then resume immediately without having to speed up again. You can seamlessly transition between nine speeds with a scroll wheel, similar to one an old-school computer mouse. Even though there’s nothing wrong with pressing a button, the scrolling felt easy and familiar (and made me nostalgic for pre-Apple days). The mixer also has a light at the bottom of the machine that shines into the bowl, which I used to check if the sponge cake batter had turned the pale, glossy yellow I was looking for. None of the other mixers we tested had these features, and though they’re definitely a bonus, I didn’t think they were a gimmick—they made the baking process easier overall.
-
An LCD panel shows a timer and your current speed. Photo: Michael Hession
-
A light at the bottom of the Breville shines into the bowl so that you can easily see the state of your batter or dough. Photo: Michael Hession
-
A rubber coating on the Breville’s beaters prevents them from clanging loudly against a bowl during mixing. Photo: Michael Hession
Breville says that this mixer is touch-sensitive, using the company’s proprietary Beater IQ technology to adjust mixing speeds depending on which attachments you use. We didn’t notice this kicking in during testing, but the Handy Mix was sufficiently powerful to handle all of the doughs and batters we made. It seamlessly transitioned from slow to high speeds without splashing ingredients around.
-
Dough hooks, whisks, and standard beater attachments come with the Breville; the rubber-coated beaters help scrape the mixing bowl and are quieter than metal beaters, the two whisks aerate batters more effectively than mixers with only one whisk, and the dough hooks can knead dense pizza dough. Photo: Michael Hession
-
All of the attachments store neatly in a clear plastic case, so you won’t lose them to the depths of a drawer. Photo: Michael Hession
This mixer was the easiest to clean and store, too. Instead of pressing a button to eject beaters, you can pull a loop to release them, which requires much less effort than with other mixers. This is a small detail, but it makes using the Breville that much easier—in contrast, I had to put my full body weight on the VonShef’s eject button to try to get the beaters out. The Handy Mix has Breville’s patented Assist Plug (found on most Breville appliances), which has a loop for your finger so that you can pull the plug out of the wall more easily. I found myself wishing that more of my kitchen appliances and home electronics had this feature.
All of the beaters are dishwasher safe, and you can easily wipe down the mixer with a damp cloth (although all hand mixers have vents—to keep the motor from overheating—that can trap food). A plastic case slides cleanly onto the base of Breville for storage, whereas you have to align the Cuisinart’s storage case with the mixer’s vents to attach one to the other. The Breville’s case neatly holds all of the beater attachments and the cord. With some other mixers, you either have to save the box the machine comes in, or store components in a bag. We like that the all-in-one system keeps the mixer’s small parts together, so that you don’t have to fumble around in a drawer for a single missing dough hook.
Epicurious also likes this mixer, and Michelle Lopez told us she uses it for many baking projects. “It’s quiet, powerful, and comes with a bunch of bells and whistles that make it great for precise baking,” she said. The Breville has a one-year limited warranty. We’ll continue to test it over time to see how it holds up.
via Wirecutter: Reviews for the Real World
The Best Hand Mixer
Bamboo Skewer Chopping Board
Pask Makes shows us how wood skewers are good for more than serving kebabs. By stacking, cutting, clamping, and gluing hundreds of sticks, then planing and sanding the result, he was able to create a beautiful cutting board we’d love to have on our counter.
How Ford Lost the First Mustang Ever Made—and What They Had to Do to Get it Back
Car fans, here’s a story you can tell your friends at the bar.

When Ford first designed their iconic Mustang, which was set to debut in April of 1964 as a model year 1965 car, they initially produced a limited batch to seed the dealerships with. This early batch—known as the 1964 1/2 model year among collectors—was intended both to familiarize the production line workers with the car, and to ensure that every major dealership in the U.S. and Canada had a display model in advance of the car’s launch.



In order to have all of the deliveries arrive in advance of the launch, the first car off of the line in February of 1964—serial #5F08F 00001—was shipped to the physically furthest dealership, a remote Ford outpost in St. John’s, Newfoundland.

These preproduction cars were not supposed to be sold. But a young pilot, Captain Stanley Tucker (below), spotted the display Mustang at the Newfoundland dealership and somehow convinced them—three days before launch, no less–to sell the car to him. Money talks, and the car changed hands.

Ford sold a whopping 680,000 Mustangs in their first year. Realizing they had a monster hit on their hands, the company sought to get serial #5F08F 00001 back, to preserve it for posterity. After learning that #5F08F 00001 had been sold, Ford contacted Captain Tucker directly and offered to buy it back.
Captain Tucker refused to sell it.
Finally, after two years of strong (and presumably profitable) Mustang sales, in order to get #5F08F 00001 back, Ford made Captain Tucker an offer he couldn’t refuse:
via Core77
How Ford Lost the First Mustang Ever Made—and What They Had to Do to Get it Back
How to make your own bootable macOS 10.14 Mojave USB install drive

Andrew Cunningham
Apple hasn’t shipped operating systems on physical media in almost a decade, but there are still good reasons to want a reliable old USB stick for macOS Mojave. Luckily, it’s not hard to make one—either with a handy graphical user interface or some light Terminal use. Here’s what you need to get started.
- A Mac that you have administrator access to. We’ve created Mojave USB stick from both High Sierra and Mojave, but your experience with other versions may vary.
- An 8GB or larger USB flash drive or an 8GB or larger partition on some other kind of external drive. A USB 3.0 drive will make things significantly faster, but an older USB 2.0 drive will work in a pinch.
- The macOS 10.14 Mojave installer from the Mac App Store in your Applications folder. The installer will delete itself when you install the operating system, but it can be re-downloaded if necessary.
- If you want a GUI, take a look at Ben Slaney’s Install Disk Creator from MacDaddy. There are other apps out there that do this, but this one is quick and simple.
If you want to use this USB installer with newer Macs as they are released, you’ll want to periodically re-download new Mojave installers and make new install drives periodically. Apple rolls support for newer hardware into new macOS point releases as they come out, so this will help keep your install drive as universal and versatile as possible.
There’s also one new consideration for newer Macs with Apple’s T2 controller chip—as of this writing, the iMac Pro and both 2018 MacBook Pros. Among this chip’s many security features is one that disallows booting from external drives by default. To re-enable this feature, hold down Command-R while your Mac reboots to go into Recovery Mode, and use the Startup Security Utility to “allow booting from external media.” If you’re trying to install an older version of macOS, you may also need to go from Full Security to Medium Security to enable booting, but if you’re just trying to install the current version of macOS, the Full Security option should be just fine.
The easy way
-
Install Disk Creator puts a friendly face on the normal terminal command.
Andrew Cunningham -
Select the macOS installer you’d like to use; the tool can work with the High Sierra and Mojave installers (and probably others, though we haven’t tested anything else with the latest version).
Andrew Cunningham -
You’ll need a flash drive with 8GB or more of space, which will be formatted before it’s used.
Andrew Cunningham -
Put in your password and you’re off to the races.
Andrew Cunningham -
The time it takes to create your disk will depend on the kind of USB stick you’re using.
Andrew Cunningham -
And you’re done!
Andrew Cunningham
Once you’ve obtained all of the necessary materials, connect the USB drive to your Mac and launch the Install Disk Creator. This app is basically just a GUI wrapper for the terminal command, so it should be possible to make install disks for versions of macOS going all the way back to Lion. In any case, it will work just fine for our purposes.
Install Disk Creator will automatically detect macOS installers on your drive and suggest one for you, displaying its icon along with its path. You can navigate to a different one if you want, and you can also pick from among all the storage devices and volumes currently connected to your Mac through the drop-down menu at the top of the window. Once you’re ready to go, click “Create Installer” and wait. A progress bar across the bottom of the app will tell you how far you have to go, and a pop-up notification will let you know when the process is done. This should only take a few minutes on a USB 3.0 flash drive in a modern Mac, though using USB 2.0 or other interfaces will slow things down.
The only slightly less-easy way
The Install Disk Creator is just a wrapper for the terminal command to create macOS install disks, so if you’re comfortable formatting your USB drive yourself and opening a Terminal window, it’s almost as easy to do it this way. Assuming that you have the macOS Mojave installer in your Applications folder and you have a Mac OS Extended (Journaled)-formatted USB drive named “Untitled” mounted on the system, you can create a Mojave install drive using the following command.
sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ macOS\ Mojave.app --nointeraction
The command will erase the disk and copy the install files over. Give it some time, and your volume will soon be loaded up with not just the macOS installer but also an external recovery partition that may come in handy if your hard drive dies and you’re away from an Internet connection. If you’d like to create an install drive for a macOS version other than Mojave, just tweak the paths above to refer to Sierra or High Sierra instead, keeping in mind the backslashes between words (you’d type macOS\ High\ Sierra.app
instead of macOS High Sierra.app
, for example).
Whichever method you use, you should be able to boot from your new USB drive either by changing the default Startup Disk in System Preferences or by holding down the Option key at boot and selecting the drive. Once booted, you’ll be able to install or upgrade Mojave as you normally would. You can also use Safari, Disk Utility, or Time Machine from the recovery partition to restore backups or troubleshoot.
via Ars Technica
How to make your own bootable macOS 10.14 Mojave USB install drive
SQL Order of Operations – SQL Query Order of Execution

Knowing the bits and bytes of an SQL query’s order of operations can be very valuable, as it can ease the process of writing new queries, while also being very beneficial when trying to optimize an SQL query.
If you’re looking for the short version, this is the logical order of operations, also known as the order of execution, for an SQL query:
You can speed up any SQL query, automatically. Try it now for free.
- FROM, including JOINs
- WHERE
- GROUP BY
- HAVING
- WINDOW functions
- SELECT
- DISTINCT
- UNION
- ORDER BY
- LIMIT and OFFSET
But the reality isn’t that easy nor straight forward. As we said, the SQL standard defines the order of execution for the different SQL query clauses. Said that, modern databases are already challanaging that default order by applying some optimization tricks which might change the actual order of execution, though they must end up returning the same result as if they were running the query at the default execution order.
Why would they do that? Well, it can be silly if the database would first fetch all data mentioned in the FROM clause (including the JOINs), before looking into the WHERE clause and its indexes. Those tables can hold lots of data, so you can imagine what will happen if the database’s optimizer would stick to the traditional order of operations of an SQL query.
Let’s look into each of the SQL query parts according to their execution order.
FROM and JOINs
The tables specified in the FROM clause (including JOINs), will be evaluated first, to determine the entire working set which is relevant for the query. The database will merge the data from all tables, according to the JOINs ON clauses, while also fetching data from the subqueries, and might even create some temporary tables to hold the data returned from the subqueries in this clause.
In many cases though, the database’s optimizer will choose to evaluate the WHERE part first, to see which part of the working set can be left out (preferably using indexes), so it won’t inflate the data set too much if it doesn’t really have to.
WHERE clause
The WHERE clause will be the second to be evaluated, after the FROM clause. We have the working data set in place, and now we can filter the data according to the conditions in the WHERE clause.
These conditions can include references to the data and tables from the FROM clause, but cannot include any references to aliases defined in the SELECT clause, as that data and those aliases may not yet ‘exist’ in that context, as that clause wasn’t yet evaluated by the database.
Also, a common pitfall for the WHERE clause would be to try and filter out aggregated values in the WHERE clause, for example with this clause: “WHERE sum(available_stock) > 0“. This statement will fail the query execution, because aggregations will be evaluated later in the process (see the GROUP BY section below). To apply filtering condition on aggregated data, you should use the HAVING clause and not the WHERE clause.
GROUP BY clause
Now that we filtered the data set using the WHERE clause, we can aggregate the data according to one or more columns appearing in the GROUP BY clause. Grouping the data is actually splitting it to different chunks or buckets, where each bucket has one key and a list of rows that match that key. Not having a GROUP BY clause is like putting all rows in a one huge bucket.
Once you aggregate the data, you can now use aggregation functions to return a per-group value for each of the buckets. Such aggregation functions include COUNT, MIN, MAX, SUM and others.
You can speed up any SQL query, automatically. Try it now for free.
HAVING clause
Now that we have grouped the data using the GROUP BY clause, we can use the HAVING clause to filter out some buckets. The conditions in the HAVING clause can refer to the aggregation functions, so the example which didn’t work in the WHERE clause above, will work just fine in the HAVING clause: “HAVING sum(available_stock) > 0″.
As we’ve already grouped the data, we can no longer access the original rows at this point, so we can only apply conditions to filter entire buckets, and not single rows in a bucket.
Also, as we mentioned in previous sections, aliases defined in the SELECT clause cannot be accessed in the section either, as they weren’t yet evaluated by the database (this is true in most databases).
Window functions
If you are using Window functions, this is the point where they’ll be executed. Just like the grouping mechanism, Window functions are also performing a calculation on a set of rows. The main difference is that when using Window functions, each row will keep its own identity and won’t be grouped into a bucket of other similar rows.
Window functions can only be used in either the SELECT or the ORDER BY clause. You can use aggregation functions inside the Window functions, for example:
SUM(COUNT(*)) OVER ()
SELECT clause
Now that we are done with discarding rows from the data set and grouping the data, we can select the data we want to be fetched from the query to the client side. You can use column names, aggregations and subqueries inside the SELECT clause. Keep in mind that if you’re using a reference to an aggregation function, such as COUNT(*) in the SELECT clause, it’s merely a reference to an aggregation which already occurred when the grouping took place, so the aggregation itself doesn’t happen in the SELECT clause, but this is only a reference to its result set.
DISTINCT keyword
The syntax of the DISTINCT keyword is a bit confusing, because the keyword takes its place before the column names in the SELECT clause. But, the actual DISTINCT operation takes place after the SELECT. When using the DISTINCT keyword, the database will discard rows with duplicate values from the remaining rows left after the filtering and aggregations took place.
UNION keyword
The UNION keyword combines the result sets of two queries into one result set. Most databases will allow you to choose between UNION DISTINCT (which will discard duplicate rows from the combined result set) or UNION ALL (which just combines the result sets without applying any duplication check).
You can apply sorting (ORDER BY) and limiting (LIMIT) on the UNION’s result set, the same way you can apply it on a regular query.
ORDER BY clause
Sorting takes place once the database has the entire result set ready (after filtering, grouping, duplication removal). Once we have that, the database can now sort the result set using columns, selected aliases, or aggregation functions, even if they aren’t part of the selected data. The only exception is when using the DISTINCT keyword, which prevents sorting by a non-selected column, as in that case the result set’s order will be undefined.
You can choose to sort the data using a descending (DESC) order or an ascending (ASC) order. The order can be unique for each of the order parts, so the following is valid: ORDER BY firstname ASC, age DESC
LIMIT and OFFSET
In most use cases (excluding a few like reporting), we would want to discard all rows but the first X rows of the query’s result. The LIMIT clause, which is executed after sorting, allows us to do just that. In addition, you can choose which row to start fetching the data from and how many to exclude, using a combination of the LIMIT and OFFSET keywords. The following example will fetch 50 rows starting row #100: LIMIT 50 OFFSET 100
via Planet MySQL
SQL Order of Operations – SQL Query Order of Execution
Kavanaugh Accusers’ Official High School Yearbooks Detail Sex, Drunkenness & Racism

USA – -(AmmoLand.com)- Christine Blasey Ford, the accuser of Supreme Court nominee Bret Kavanaugh of a pool party groping, own High School yearbooks list in great detail rampant drinking & guns, promiscuity, racism, and sexual predation by the class of 82, 83 and 1984. The years “Chrissy”, as Blasey Ford is referred to, attended the all-girl school of Holton-Arms.
The yearbook title is SCRIBE. The relevant issues are SCRIBE 82, SCRIBE 83 and SCRIBE 84, corresponding to Blaseys’s sophomore, junior and senior years when she and her classmates (and Kavanaugh) were 15-17-year-old juveniles.
You can read an in-depth dissection of the yearbooks on the website Cult Of The 1st Amendment, but the shocking thing is how this detailed description of partying and disrespect could be the featured content of school approved and financed yearbook.
From the report “They [the yearbooks] are a testament to the incredible power these girls had over their teachers, parents and the boys of Georgetown Prep, Landon and other schools in the area. In the pages below, [see link above] you will see multiple photos and references to binge drinking and the accompanying joy of not being able to remember any of it.”
While Blasey Ford is only mentioned by name and in photos a few times, the implications are that in such a small group how we are to believe that she was not caught up in the wild predatory social party scenes?
Binge Drinking & Male Strippers:
Scribe 84 is the yearbook for her senior year. Her name was Christine Blasey in high school, often referred to as “Chrissy.” In the image below, Blasey is pictured at a Halloween party in her junior year. The caption on the right says:
“Lastly one cannot fail to mention the climax of the junior social scene, the party. Striving to extend our educational experience beyond the confines of the classroom, we played such intellectually stimulating games as Quarters, Mexican Dice and everyone’s favorite, Pass-Out, which usually resulted from the aforementioned two.”

Specifically relevant to the accusations at hand is one section of the yearbook articles that report a regularly occurring pool party:
“10th grade seems to have been a ritual initiation into the “Holton party scene”. Another sophomore girl [named Martha, last name redacted, but we assume to be Martha Mispireta Shannon a fellow class mate, if it is her she could be a witness] threw multiple all night benders, the highlight of which featured an [adult?] male erotic dancer in gold g-string:”

This info may help Christine Blasey Ford remember the exact details of events or provide info for a line of questioning for Senators trying to get to the facts.
Read the entire report at Cult Of The 1st Amendment.
The post Kavanaugh Accusers’ Official High School Yearbooks Detail Sex, Drunkenness & Racism appeared first on AmmoLand.com.
via AmmoLand.com
Kavanaugh Accusers’ Official High School Yearbooks Detail Sex, Drunkenness & Racism
Here’s What You Can Do With Apple’s New iOS 12 Parental Controls
Parents, to curb your kid’s phone usage, you may no longer need to hold their chargers hostage, yell out nightly countdowns (“Three more minutes!”) or draft up elaborate tech contracts that you’ll look at exactly once. At least, if you’re on Apple devices. The new iOS 12 parental controls are here, and they allow you to manage your children’s screen time—set app time limits, block off chunks of “downtime” and track their daily habits—all from your own phone. Here’s what you can do, and how to do it.
How to access the Screen Time feature for your child using your own device:
- Make sure both of your devices are on iOS 12.
- Set up Family Sharing if you haven’t already.
- Go to Settings > Screen Time.
- Scroll down to the names of those in your Family Sharing plan. Choose the child for which you’d like to set up parental controls.
- Enter a four-digit Screen Time passcode. Choose one that you can remember and your kid can’t guess. You’ll need it to approve requests for more screen time.
Now, here’s a look at what you can do with Screen Time.
Lock Your Kid Out of Their Phone During Family Dinner or Bedtime
The feature: Downtime
How it works: Remotely schedule a block of time in which your kid’s device cannot be used, such as during family dinner or his little sister’s flute recital. During this stretch, an icon will appear on all his apps indicating that they are not allowed to be used. (Phone, Messages, FaceTime, Alarm and some other functions will still work by default, but you can shut those down, too, if you wish.) If there are apps that you do want your kid to have access to during the scheduled downtime—say, bedtime meditations or white noise—you can make them Aways Allowed.
Tip: It might help to talk about your limits with other parents in your neighborhood. If you all plan to block your kids out of their apps at the same time, perhaps they can—gasp—call each other on the phone or even hang out IRL.
Put Time Limits on Fortnite (or Any App)
The feature: App Limits
How it works: Set a specific amount of time that your kid can be on certain apps each day. You can create limits for either specific categories, such as Social Networking or Gaming, or all apps. (It’s a little frustrating, however, as you don’t get to determine which apps go in which categories.) A warning will appear five minutes before the time is up, preventing screams of shock and despair. Once the allotted limit has been reached, your child can send you a request for more time, and you can either approve it or not.
See How Your Kid Is Really Spending Her Time On Her Phone
The feature: Activity Reports
How it works: On your own device, you can check out daily and weekly activity reports showing you how much time your kid is spending in each app (or across categories of apps), along with the number of notifications he’s receiving and how often he’s picking up his phone. It’s a way to know if he’s sneaking in games during third-period math or playing Roblox when he’s supposed to be in his room reading.
The reports can also be a good place to start a conversation with your kids about screen time, especially if you’re tracking your own phone usage. (I am, and it’s slightly horrifying.) You can ask your children how much time they think they’re spending on their phones, and then compare that to the actual data. As Tommy Sobel, the founder and CEO of Brick, writes: “Most people use their phones twice as much as they think they do, so seeing your actual minutes spent can be an incredibly powerful impetus to get real with yourself and get motivated about the need to take control of your phone habits.”
Block Content and Turn Off In-App Purchases and Location Services
The feature: Content & Privacy Restrictions
How it works: We’ve long been able to limit kids’ access to music, movies and other content on Apple devices, but with iOS 12, we can now do all of this remotely. Under iTunes and App Store Purchases, you can choose whether your child may install new apps, delete apps or make in-app purchases. Under Content Restrictions, you can set content ratings for books, music, TV shows, movies and apps. (I like how specific you can get—for instance, you may want to block “explicit” TV shows while giving your kid unfiltered access to books.) If you don’t want any app to know your kid’s location, you can indicate that, too.
As your kids get older and show that they can use their phones responsibly, you’ll want adjust their Screen Time settings in a way that makes sense. Let it be an ongoing conversation. If you need some talking points, check out our age-by-age guide to setting smartphone limits for your kids.
via Gizmodo
Here’s What You Can Do With Apple’s New iOS 12 Parental Controls
MySQL and Memory: a love story (part 1)

As you may know, sometimes MySQL can be memory-hungry. Of course having data in memory is always better than disk… RAM is still much faster than any SSD disk.
This is the reason why we recommended to have the working set as much as possible in memory (I assume you are using InnoDB of course).
Also this why you don’t want to use Swap for MySQL, but don’t forget that a slow MySQL is always better than no MySQL at all, so don’t forget to setup a Swap partition but try to avoid using it. In fact, I saw many people just removing the Swap partition… and then OOM Killer did its job… and mysqld
is often its first victim.
MySQL allocates buffers and caches to improve performance of database operations. That process is explained in details in the manual.
In this article series, I will provide you some information to check MySQL’s memory consumption and what configuration settings or actions can be made to understand and control the memory usage of MySQL.
We will start the series by the Operating System.
Operating System
In the OS level, there are some commands we can use to understand MySQL’s memory usage.
Memory Usage
You can check mysqld
‘s memory usage from the command line:
# ps -eo size,pid,user,command --sort -size | grep [m]ysqld \ | awk '{ hr=$1/1024 ; printf("%13.2f Mb ",hr) } { for ( x=4 ; x<=NF ; x++ ) { printf("%s ",$x) } print "" }' \ |cut -d "" -f2 | cut -d "-" -f1 1841.10 Mb /usr/sbin/mysqld 0.46 Mb /bin/sh /usr/bin/mysqld_safe
top can also be used to verify this.
For top 3.2:
# top -ba -n1 -p $(pidof mysqld) | grep PID -A 1 PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1752 mysql 20 0 1943m 664m 15m S 0.0 11.1 19:55.13 mysqld # top -ba -n1 -m -p $(pidof mysqld) | grep PID -A 1 PID USER PR NI USED RES SHR S %CPU %MEM TIME+ COMMAND 1752 mysql 20 0 664m 664m 15m S 2.0 11.1 19:55.17 mysqld
For more recent top, you can use top -b -o %MEM -n1 -p $(pidof mysqld) | grep PID -A 1
VIRT represents the total amount of virtual memory used by mysql. It includes all code, data and shared libraries plus pages that have eventually been swapped out.
USED reports the sum of process rss (resident set size, the portion of memory occupied by a process that is held in RAM) and swap total count.
We will see later what we can check from MySQL client.
SWAP
So we see that this can eventually include the swapped pages too. Let’s check if mysqld is using the swap, and the first thing to do is to check is the machine has some information in swap already:
# free -m total used free shared buffers cached Mem: 5965 4433 1532 128 454 2359 -/+ buffers/cache: 1619 4346 Swap: 2045 30 2015
We can see that a little amount of swap is used (30MB), is it by MySQL ? Let’s verify:
# cat /proc/$(pidof mysqld)/status | grep Swap VmSwap: 0 kB
Great, mysqld
si not swapping. In case you really want to know which processes have swapped, run the following command:
for i in $(ls -d /proc/[0-9]*) do out=$(grep Swap $i/status 2>/dev/null) if [ "x$(echo $out | awk '{print $2}')" != "x0" ] && [ "x$(echo $out | awk '{print $2}')" != "x" ] then echo "$(ps -p $(echo $i | cut -d'/' -f3) \ | tail -n 1 | awk '{print $4'}): $(echo $out | awk '{print $2 $3}')" fi done
Of course the pages in the swap could have been there for a long time already and never been used since… to be sure, I recommend to use vmstat
and verify the columns si and so (a trending system is highly recommended):
# vmstat 1 10 procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu----- r b swpd free buff cache si so bi bo in cs us sy id wa st 0 0 31252 1391672 505840 2523844 0 0 2 57 5 2 3 1 96 0 0 1 0 31252 1392664 505840 2523844 0 0 0 328 358 437 6 1 92 1 0 0 0 31252 1390820 505856 2523932 0 0 0 2024 1312 2818 28 3 67 2 0 0 0 31252 1391440 505860 2523980 0 0 0 596 484 931 1 1 98 1 0 0 0 31252 1391440 505860 2523980 0 0 0 1964 500 970 0 1 96 3 0 0 0 31252 1391440 505860 2523980 0 0 0 72 255 392 0 0 98 2 0 0 0 31252 1391440 505860 2523980 0 0 0 0 222 376 0 0 99 0 0 0 0 31252 1391440 505908 2524096 0 0 0 3592 1468 2095 34 6 52 9 0 0 0 31252 1391688 505928 2524092 0 0 0 1356 709 1179 12 1 85 2 0 0 0 31252 1390696 505928 2524092 0 0 0 152 350 950 4 6 90 1 0
On this server, we can see that mysqld
is not using the swap, but if it was the case and some free RAM was still available, what could have been done ?
If this was the case, you must check 2 direct causes:
- swappiness
- numa
Swappiness
The swappiness parameter controls the tendency of the kernel to move processes out of physical memory and put them onto the swap disk partition. As I explained earlier, disks are much slower than RAM, therefore this leads to slower response times for system and applications if processes are too aggressively moved out of memory. A high swappiness value means that the kernel will be more apt to unmap mapped pages. A low swappiness value means the opposite, the kernel will be less apt to unmap mapped pages. This means that the higher is the swappiness value, the more the system will swap !
The default value (60) is too high for a dedicated MySQL Server and should be reduced. Pay attention that with older Linux kernels (prior 2.6.32), 0 meant that the kernel should avoid swapping processes out of physical memory for as long as possible. Now the same value totally avoid swap to be used. I recommend to set it to 1 or 5.
# sysctl -w vn.swappinness=1
Numa
For servers having multiple NUMA cores, the recommendation is to set the NUMA mode to interleaved which balances memory allocation to all nodes. MySQL 8.0 supports NUMA for InnoDB. You just need to enable it in your configuration: innodb_numa_interleave = 1
To check if you have multiple NUMA nodes, you can use numactl -H
These are two different output:
# numactl -H available: 1 nodes (0) node 0 cpus: 0 1 2 3 4 5 6 7 node 0 size: 64379 MB node 0 free: 2637 MB node distances: node 0 0: 10 |
# numactl -H available: 4 nodes (0-3) node 0 cpus: 0 2 4 6 node 0 size: 8182 MB node 0 free: 221 MB node 1 cpus: 8 10 12 14 node 1 size: 8192 MB node 1 free: 49 MB node 2 cpus: 9 11 13 15 node 2 size: 8192 MB node 2 free: 4234 MB node 3 cpus: 1 3 5 7 node 3 size: 8192 MB node 3 free: 5454 MB node distances: node 0 1 2 3 0: 10 16 16 16 1: 16 10 16 16 2: 16 16 10 16 3: 16 16 16 10 |
We can see that when there are multiple NUMA nodes (right column), by default the memory is not spread equally between all those nodes. This can lead to more swapping. Check these two nice articles from Jeremy Cole explaining this behavior:
- http://blog.jcole.us/2010/09/28/mysql-swap-insanity-and-the-numa-architecture/
- http://blog.jcole.us/2012/04/16/a-brief-update-on-numa-and-mysql/
Filesystem Cache
Another point we can check from the OS is the filesystem cache.
By default, Linux will use the filesystem cache for all I/O accesses (this is one of the reason why using MyISAM is not recommended, as this storage engine relies on the FS cache and can lead in loosing data as Linux sync those writes up to every 10sec). Of course as you are using InnoDB, with O_DIRECT as innodb_flush_method
, MySQL will bypass the filesystem cache (InnoDB has already enough optimized caches anyway and one extra is not necessary). InnoDB will then not use any FS Cache Memory for the data files (*.ibd).
But there are of course other files used in MySQL that will still use the FS Cache. Let’s check this example:
# ~fred/dbsake fincore binlog.000017 binlog.000017: total_pages=120841 cached=50556 percent=41.84 # ls -lh binlog.000017 -rw-r----- 1 mysql mysql 473M Sep 18 07:17 binlog.000017 # free -m total used free shared buffers cached Mem: 5965 4608 1356 128 435 2456 -/+ buffers/cache: 1716 4249 Swap: 2045 30 2015 # ~fred/dbsake uncache binlog.000017 Uncached binlog.000017 # free -m total used free shared buffers cached Mem: 5965 4413 1552 128 435 2259 -/+ buffers/cache: 1718 4247 Swap: 2045 30 2015
Some explanations. I started checking how much of one binary log was present in the filesystem cache (using dbsake fincore), and we could see that 42% of 473M were using the RAM as FS cache. Then I forced an unmap of those pages in the cache (using fincore uncache) and finally, you could see that we freed +/- 195MB of RAM.
You could be surprised to see which logs or datafiles are using the FS cache (making a file copy for example). I really encourage you to verify this
The next article will be about what can be seen from MySQL’s side and what are the best configuration practices.