Profile

Cover photo
Hayden James
Lives in Las Vegas
94 followers|71,158 views
AboutPosts+1's

Stream

Hayden James

Hints, Tips & Tricks  - 
 
Best cache plugin avoids use of .htaccess rules as per Apache docs, caches to RAM using APC, APCu, memcached or Nginx Memcached module = super-fast WordPress...
1
Add a comment...

Hayden James

Discussion  - 
 
How large is your MySQL query_cache_size?
1
Hayden James's profile photoSkylar Mckindley's profile photoSergio Diaz's profile photo
3 comments
 
On my old server, I had it at 1GB.
Add a comment...

Hayden James

Shared publicly  - 
 
 
The Raspberry Pi Case Designed by Apple: Modding the Might Mouse Case for the RasPi #piday #raspberrypi @Raspberry_Pi
http://adafru.it/b97223

The Raspberry Pi Case Designed by Apple: Modding the Might Mouse Case for the RasPi:

…The Magic Mouse is a superb device. It’s slick. It’s smooth. It’s beautifully built. In fact, even the packaging is beautifully built – and out of better quality plastics than most other manufacturers use for their actual mice. And therein lies the problem. The shipping container is a beautiful piece of gleaming, transparent, polycarbonate. What is one supposed to do with it? Keep the mouse in it? The trouble is that the mouse doesn’t work so well in its box. Actually, it doesn’t work at all – it’s impossible to click and it utterly fails to move the cursor around. Throwing it away seems a little wasteful too. The box is lovely.

The box is also just about the right size for a Raspberry Pi. In fact, the size match is so perfect that its hard to believe that no one else has considered the Magic Mouse box to be the ideal Pi case. I Googled about a bit, and got no hits – so either I really have had an original idea, or everyone else is staying very quiet about this most cunning of cunning plans.

Read More
http://adafru.it/b97223

#piday   #raspberrypi   #apple  
1
Carlos Vasquez's profile photo
 
very cool
Add a comment...

Hayden James

Hardware  - 
 
Back in January I ordered my first Raspberry Pi (Model B revision 2). I soon realized that there’s a host of options to choose from for the required accessories needed to get started. I’ve spent months of research and testing to ensure that I don’t waste time having to replace accessories till I find the best ones. So in this post I’ll provide you with some tips for choosing quality Raspberry Pi accessories. I’ll be as brief as possible since the objective is to save both time and money.

Before continuing you may want to read: What Is The True Cost Of Running a Raspberry Pi?

What to buy…

Raspberry Pi Power Supply (Micro USB)

The Raspberry Pi is powered by 5v micro USB. The Raspberry Pi foundation recommends a 1.2A (1200mA) power supply. This is a safe suggestion because on forums and blogs you’ll notice some users with popular 750mA, 850mA and 1000mA power supplies having issues with random resets and freezing. Don’t fall for the popular cheap chargers especially if lower than 1200mA. Of course, how much current (mA) the Raspberry Pi requires depends on what you plug into it. Also, note that many cheap power supplies deliver less amperage than advertised. To avoid frustration, my recommendation is to go with a minimum of a 1.5A power supply. Currently I use 1.8A and 2A power supplies.

Raspberry Pi SDHC card (SD Card)

There are a lot of Raspberry starter kits being sold around the web and I’ve found that the vast majority of them include class 4 SD cards. Yuck! If you are interested in performance, you’ll want to go with a class 10 or at the minimum a class 6 SD card. Keep in mind how you will be transferring data from you PC to the SD card (eg. you may need an SD card reader) and this takes longer as well with slower SD cards. If you plan on messing around with multiple Linux distros on your RPi then make sure to have multiple cards so you can swap them without having to reformat. Lastly if you’re installing NOOBS then a minimum of 8GB of storage is recommended. Otherwise 4GB is usually fine for most projects. My cards are 4GB, 8GB  and 32GB. I once used a 1GB class 4 SD card (had it laying around) with Openelec and found it to be slower. I found the same performance issue with Arch Linux ARM on a 4GB class 4 sd card vs faster class 10.

Raspberry Pi Enclosure (Protective Case)

A case isn’t necessary, but if you handle your Pi a lot or want to protect it, then buy a case with good ventilation. Hot air rises so vents at the top of the case and to let cool air in some vents on the bottom. Personally, I like clear cases because its almost like not having a case, in that you can still see the RPi board in all its beauty. You can also make you own case.

USB Wi-Fi dongle or Network Cable

Be careful there are a TON of cheap Wifi dongles that offer poor signal strength, random connection drops and/or requires manual installation of drivers. Thus why I’ll recommend some specific dongles. The LB-Link long Range WiFi USB Antenna (LB Link) and the TP-LINK TL-WN725N Wireless N Nano USB Adapter (TP-Link). The LB-Link cost about twice as much as the TP-Link since its features a long antenna. You can read more about them here… Download Arch Linux Raspberry Pi WiFi Access Point Image.

The fact that your RPi comes with not one, but two USB ports may seem cool at first, but soon you’ll realize that 2 ports are sometimes not enough. If you require network access, to help free up a spare USB port you can use a network cable instead.

Wired or Wireless Keyboard

Chances are you already have a keyboard sitting around in your garage, or in a closet along with an old computer. If not, then invest in a wireless keyboard with built in trackpad. I really like the Logitech Wireless Touch Keyboard K400 and Microsoft’s All-in-One Media Keyboard. I used an old wired Microsoft keyboard for months before going wireless. If you prefer smaller wireless keyboards check out Rii and Favi.

Choose wisely, everyone has very different preferences and this in most cases will your most used accessory. I started with the smaller Rii and Favi keyboards, they are nice for travel but slow to work with due to size. I would recommend the Logitech K400 for a compromise between size and usability or the Microsoft keyboard for all out usability. There are also other options so pay attention to the layout of keys and compare to your preferences.

HDMI Cable

Everything else is useless if you can’t see what’s going on. You can use the video-out connection if you like, but the HDMI port makes using the Pi a blast. Still, unless you are using the Pi for 1080p movies or live TV then just buy the cheapest HDMI cable you can find.

Cut and pasted from: http://haydenjames.io/what-to-buy-raspberry-pi/

#raspberrypi   #starterkits   #whattobuy  
8
2
Eric Barlow's profile photocornell kortenhoeven's profile photoHayden James's profile photoThorsten Beck's profile photo
3 comments
 
thanks. Yes, I have both Rii and Favi. Favi I like more the Rii has this click-back feeling and noise that just slows input down. But I use the larger Logitech wireless keyboard w/trackpad almost exclusively now.
Add a comment...

Hayden James

Tutorials/Guides  - 
 
Raspberry Pi - Safe overclocking settings. (Tested on 8 boards now):

arm_freq=1000
core_freq=500
sdram_freq=500
over_voltage=6
boot_delay=0
disable_splash=1

Benchmark here: http://haydenjames.io/raspberry-pi-safe-overclocking-settings/
13
2
Alexandar Aritonovic's profile photoHayden James's profile photoJeremy Glasgow's profile photoThorsten Wilmer's profile photo
3 comments
 
The extremely overclock setting updated. Make sure to read the details or just use the settings above in G+
Add a comment...
In his circles
140 people
Have him in circles
94 people
Shane Francis's profile photo
KD EfficacyWeb's profile photo
Hrishikesh Patel's profile photo
Major Hayden's profile photo

Hayden James

DBMS [MySql,NoSql,Postgres]  - 
 
MySQL Query Cache Size and Performance (cut and paste of entire blog post)

One of the most misconfigured MySQL performance features, is the query cache. Just last week I was optimizing a web server with 32 gigabytes of RAM where the existing config had MySQL’s query cache size set to 4 gigabytes. The thought behind it seemed to be that more is better and that since the server had free RAM available, setting the query cache very large meant that the cache wouldn’t be pruned constantly, thus increasing performance… THAT’S WRONG!

This is an extremely common misconception and understandable so, because query cache sizing depends a lot on your database size, database query types, ratio of database reads vs writes, database traffic, hardware, etc.

Set MySQL query_cache_size to no more than around 200MB!

A MySQL query cache size of 200 megabytes may even be too large! The key is to start very small (maybe 20mb), then increase in small increments while trying to keep a high ratio of query cache hits and also a low amount of query cache low memory prunes. All of this without setting MySQL’s query cache size too large. Why? Because, a query_cache_size of 4 gigabytes is a good example of how query caching can hurt performance when trying to scale with the increased number of cacheable queries. Too large query cache sizes will lead to significant performance degradation because of overhead required to manage the cache. Cacheable queries have to take out an exclusive lock on MySQL’s query cache. In addition, any insert, update, delete, or other modifications to a table causes any relevant entries in the query cache to be flushed. This happens even when there’s free query cache space available. As a result, the larger the query cache, the more system time will be used for these flushes, until cache management eventually negates all benefits of MySQL query caching and instead begin to eat away at database performance.

Even with a nicely tuned query cache, there’s still around 10% to 15% overhead required to maintain it. So your query cache hit rate percentage ((Qcache_hits / (Qcache_hits + Qcache_inserts + Qcache_not_cached))*100) should be as close to 100% as possible. That being the percentage of queries served by cache instead of being re-executed by the database repeatedly. Of course, anything below 10% or 20% means your query cache is probably doing more harm to performance than good. Usually I’ll keep query cache disabled if hit rate is below 50%.

So again, why is it recommended to keep MySQL’s query_cache_size small? Well, here’s what MySQL’s reference manual says about sizing the query cache:

“Be cautious about sizing the query cache excessively large, which increases the overhead required to maintain the cache, possibly beyond the benefit of enabling it. Sizes in tens of megabytes are usually beneficial. Sizes in the hundreds of megabytes might not be.“

Now, due to all the variations of MySQL setups, hardware specs and the fact that databases are all different in demand, query types, etc etc, you will have to play around with your config and use this 200mb recommendation as a guideline to finding your query_cache_size sweet-spot. A MySQL query cache size of 200 megabytes may be fast on one server and begin to slow things down on another. As such, you’ll need to investigate, set your slow query logging to 1 second or setup full query logging for a few minutes or hours (depending on how busy your database is) and see how much time is spent in the query cache.

Query caching can give significant performance improvements when used correctly and/or in conjunction with Memcached or Redis cache. As mentioned, the key is, when you start tuning your MySQL query cache size, start small. You should also adjust your “query_cache_limit” because the default of 1 megabyte may be too large and allow your cache to fill up fast causing crippling query cache prunes! Yes, sizing the query cache too small can also be a performance killer. This is the case especially if you have thousands of query cache prunes being performed. Also, have a look at adjusting the “query_cache_min_res_unit” tuning parameter to combat cache fragmentation and reduce prunes if that’s an issue. Many times you won’t be able to store all cacheable queries in the query cache, but you can still make good use of it. Test, test, test!

With regards to performance of PHP web applications, with WordPress for example, I’m using caching plugins on the blogs I manage that help to reduce the # of queries that make it through to query cache. Next I will be writing about what I think are the best WordPress caching plugins which work well in this regard. Subscribe here.

MySQL Query Cache config & Monitoring

Here’s my query cache config used to host this blog (This server also hosts a few other small to medium WordPress blogs. In total server about 2 million page views per month):

query_cache_type = 1
query_cache_limit = 256K
query_cache_min_res_unit = 2k
query_cache_size = 80M
To make sure MySQL Query Cache is enabled use:

mysql> SHOW VARIABLES LIKE 'have_query_cache';
To monitor query cache stats use:

mysql> SHOW STATUS LIKE 'Qcache%';
If you are not sure what to do with the stats returned, I recommend using mysqltuner.pl. This script will help you to avoid the most obvious MySQL performance pitfalls (including query cache sizing) and get you to where at least your database isn’t poorly configured.
4
1
Wolfgang Demeter's profile photo
Add a comment...

Hayden James

Training/Tutorials/HOWTO  - 
 
Why its not ok to set your MySQL query_cache_size to 1GB, 2GB, etc, and how this KILLS database performance... #mysql   #database   #linux
4
Add a comment...

Hayden James

Shared publicly  - 
 
 
Doing rpi solar power testing. Turns on so that is something.
2
Add a comment...
 
 
Back in January I ordered my first Raspberry Pi (Model B revision 2). I soon realized that there’s a host of options to choose from for the required accessories needed to get started. I’ve spent months of research and testing to ensure that I don’t waste time having to replace accessories till I find the best ones. So in this post I’ll provide you with some tips for choosing quality Raspberry Pi accessories. I’ll be as brief as possible since the objective is to save both time and money.

Before continuing you may want to read: What Is The True Cost Of Running a Raspberry Pi?

What to buy…

Raspberry Pi Power Supply (Micro USB)

The Raspberry Pi is powered by 5v micro USB. The Raspberry Pi foundation recommends a 1.2A (1200mA) power supply. This is a safe suggestion because on forums and blogs you’ll notice some users with popular 750mA, 850mA and 1000mA power supplies having issues with random resets and freezing. Don’t fall for the popular cheap chargers especially if lower than 1200mA. Of course, how much current (mA) the Raspberry Pi requires depends on what you plug into it. Also, note that many cheap power supplies deliver less amperage than advertised. To avoid frustration, my recommendation is to go with a minimum of a 1.5A power supply. Currently I use 1.8A and 2A power supplies.

Raspberry Pi SDHC card (SD Card)

There are a lot of Raspberry starter kits being sold around the web and I’ve found that the vast majority of them include class 4 SD cards. Yuck! If you are interested in performance, you’ll want to go with a class 10 or at the minimum a class 6 SD card. Keep in mind how you will be transferring data from you PC to the SD card (eg. you may need an SD card reader) and this takes longer as well with slower SD cards. If you plan on messing around with multiple Linux distros on your RPi then make sure to have multiple cards so you can swap them without having to reformat. Lastly if you’re installing NOOBS then a minimum of 8GB of storage is recommended. Otherwise 4GB is usually fine for most projects. My cards are 4GB, 8GB  and 32GB. I once used a 1GB class 4 SD card (had it laying around) with Openelec and found it to be slower. I found the same performance issue with Arch Linux ARM on a 4GB class 4 sd card vs faster class 10.

Raspberry Pi Enclosure (Protective Case)

A case isn’t necessary, but if you handle your Pi a lot or want to protect it, then buy a case with good ventilation. Hot air rises so vents at the top of the case and to let cool air in some vents on the bottom. Personally, I like clear cases because its almost like not having a case, in that you can still see the RPi board in all its beauty. You can also make you own case.

USB Wi-Fi dongle or Network Cable

Be careful there are a TON of cheap Wifi dongles that offer poor signal strength, random connection drops and/or requires manual installation of drivers. Thus why I’ll recommend some specific dongles. The LB-Link long Range WiFi USB Antenna (LB Link) and the TP-LINK TL-WN725N Wireless N Nano USB Adapter (TP-Link). The LB-Link cost about twice as much as the TP-Link since its features a long antenna. You can read more about them here… Download Arch Linux Raspberry Pi WiFi Access Point Image.

The fact that your RPi comes with not one, but two USB ports may seem cool at first, but soon you’ll realize that 2 ports are sometimes not enough. If you require network access, to help free up a spare USB port you can use a network cable instead.

Wired or Wireless Keyboard

Chances are you already have a keyboard sitting around in your garage, or in a closet along with an old computer. If not, then invest in a wireless keyboard with built in trackpad. I really like the Logitech Wireless Touch Keyboard K400 and Microsoft’s All-in-One Media Keyboard. I used an old wired Microsoft keyboard for months before going wireless. If you prefer smaller wireless keyboards check out Rii and Favi.

Choose wisely, everyone has very different preferences and this in most cases will your most used accessory. I started with the smaller Rii and Favi keyboards, they are nice for travel but slow to work with due to size. I would recommend the Logitech K400 for a compromise between size and usability or the Microsoft keyboard for all out usability. There are also other options so pay attention to the layout of keys and compare to your preferences.

HDMI Cable

Everything else is useless if you can’t see what’s going on. You can use the video-out connection if you like, but the HDMI port makes using the Pi a blast. Still, unless you are using the Pi for 1080p movies or live TV then just buy the cheapest HDMI cable you can find.

Cut and pasted from: http://haydenjames.io/what-to-buy-raspberry-pi/

#raspberrypi   #starterkits   #whattobuy  
1
Add a comment...

Hayden James

Shared publicly  - 
 
 
This is not a joke. It really looks like Windows XP and uses Trinity DE, a KDE fork
Q4OS 0.5.11, a desktop operating system designed to offer a classic style user interface and bearing an uncanny resemblance to Windows XP, has been re...
1
Add a comment...
 
If you don’t want to spend hours comparing printers, have a look 6 recommended Linux compatible printers…

Brother HL-2270DW Compact Laser Printer with Wireless. –  $100
Brother DCP7065DN Monochrome Laser Multi-Function Printer & Copier. –  $120
Epson WorkForce WF-3540 Wireless All-in-One Color Inkjet Printer, Copier, Scanner. – $150
HP DJ 3520 e-All-In-One Wireless Printer – $80
HP Envy 4500 Wireless Color Photo Printer with Scanner and Copier – $80
HP LaserJet Pro 200 color M251nwCF147A#BGJ  – $180

*Prices above reflect Amazon pricing, which are subject to change.
6
1
Jeff Owens's profile photoAaron Dennis's profile photoAaron Brown's profile photoAndre Metelo's profile photo
4 comments
 
I love the brother printers, they have linux drivers for every device on their site.  I have a MFC7840 and I did not even need to install the driver for it to recognize and print perfectly over the network.  Scanning and faxing work too, but I never use the fax part.
Add a comment...
People
In his circles
140 people
Have him in circles
94 people
Shane Francis's profile photo
KD EfficacyWeb's profile photo
Hrishikesh Patel's profile photo
Major Hayden's profile photo
Work
Occupation
Linux Systems Administrator
Skills
Linux, web server performance, scaling, security, etc.
Basic Information
Gender
Male
Other names
hydn
Story
Tagline
Linux Systems Administrator | DBA
Introduction
More about me here or via LinkedIn
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Currently
Las Vegas
Previously
Antigua - Miami
Links
Other profiles
Contributor to
Hayden James's +1's are the things they like, agree with, or want to recommend.
WhatsApp Messenger
market.android.com

WhatsApp Messenger is a smartphone messenger available for Android and other smartphones. WhatsApp uses your 3G or WiFi (when available) to

Medico de Bateria
market.android.com

Battery Doctor (Medico de Bateria) Con más de ***150 millones*** de descargas en Android y iOS a nivel mundial. Battery Doctor (Medico de Ba

Spotify Music
market.android.com

Spotify is now free on mobile and tablet. Listen to the right music, wherever you are. With Spotify, you have access to a world of music. Yo

Spotify
market.android.com

Ahora Spotify es gratis para celular y tablet. Escucha la música perfecta donde sea que estés. Con Spotify, tienes acceso a un mundo de músi

Raspberry Pi Safe Overclocking | Hayden James
haydenjames.io

Disclaimer: My recommendations are based on testing done with various configurations on two Raspberry Pi Model B version 2 boards. Both run

Download My Arch Linux Raspberry Pi WiFi Access Point | Hayden James
haydenjames.io

Are you looking into turning your Raspberry Pi into a Wireless router? Then I've created a tiny Arch Linux ARM + create_ap based setup, pack

Gedit replacement - medit | Hayden James
haydenjames.io

If you are not using Gnome then you are probably looking for a good Gedit replacement. Have a look at medit text editor! I'm using xfce4 des

CES 2014 - Biggest CES Ever! | Hayden James
haydenjames.io

CEA announced yesterday that the 2014 CES wrapped up as the largest in show history! A record two million net square feet of exhibit space h

Dropbox
market.android.com

O Dropbox é um serviço gratuito que deixa você levar todos os seus documentos, fotos e vídeos para qualquer lugar. Depois que você instalar

Linux @ CES 2014 - Preview of Linux based Innovation | Hayden James
haydenjames.io

The International CES is a global consumer electronics and consumer technology tradeshow which takes place every January in Las Vegas, Nevad

Sons Of Anarchy
market.android.com

Sons of Anarchy is an adrenalized drama with darkly comedic undertones that explores a notorious outlaw motorcycle club's (MC) desire to pro

Dominoes Online
market.android.com

Dominoes Online is an exciting logic game with attractive interface for all lovers of classic board games. The simple principle of the game

Elysium
market.android.com

In the year 2159, two classes of people exist: the very wealthy, who live on a pristine man-made space station called Elysium, and the rest,

The Lone Ranger (2013)
market.android.com

Johnny Depp and Armie Hammer star in The Lone Ranger, from Jerry Bruckheimer Films and Director Gore Verbinski. It's a wild ride of high-vel

BusyBox Non-Root Pro
market.android.com

Welcome to BusyBox for Non-Rooted Devices by Jared Burrowshttp://www.burrowsapps.com/Find me on Google+: https://plus.google.com/+JaredBurro

BusyBox Non-Root
market.android.com

Welcome to BusyBox for Non-Rooted Devices by Jared Burrowshttp://www.burrowsapps.com/Find me on Google+: https://plus.google.com/+JaredBurro

Flipboard: Tu Revista
market.android.com

Flipboard reúne las noticias del mundo y las novedades sociales en una hermosa revista diseñada para tu teléfono y tableta Android. Una vez