Thursday, March 31, 2016

Tuning a Google Compute Engine (GAE) Micro Instance for WordPress

Google Compute Engines click to deploy Wordpress deployment has recently added the ability to deploy to a micro instance stacked with a whopping 512k ram. Yep, this is less than cell phones from like 10 years ago... but for people like me who want to host blogs without all the costs (I mean who doesn't... ), I decided to tune out this GCE Wordpress install. Infact after a great tune up, the site is able to do 10k or so traffic easily a day. For 5$ a month, not too shabby...

First things first if you haven't already signed up for google's free trial, give it a try, When you have made an account, click on over to "Cloud Launcher" in the menu. I am sure google will change this several 100 times after I write this blog, so in general look for google's click to deploy solution.

As of this writing the click to deploy solution has 3 different options for Wordpress and 6 different options in different categories:






Click on the single site icons until you find the click to deploy for a micro instance. The price should be somewhere around 5$ a month.

Google changes the setup frequently so I won't walk through much of this. Select the correct disk type you would like, I prefer at time of writing the SSD persistant disk, the speed seems a little better. But of course this changes frequently. Also make sure to click the allow http and https traffic for the site.

Now at this point, google spins up a VM with pretty standard configurations. Sadly too standard, and the instance won't run stable for very long after you setup WordPress. It loves to run out of memory, so lets start configuring this first.

First thing to attack is our main memory hog, Apache. Apache loves to launch multiple processes and sit in RAM waiting to be called. Lets limit these down to needed processes only, and if you need to configure the tuning some, that is ok.

Configure your apache2.conf with the following information:


<IfModule mpm_prefork_module>
    StartServers          1
    MinSpareServers       1
    MaxSpareServers       3
    MaxClients           10
    MaxRequestsPerChild 3000
</IfModule>
 
<IfModule mpm_worker_module>
    StartServers          1
    MinSpareThreads       5
    MaxSpareThreads      15 
    ThreadLimit          25
    ThreadsPerChild       5
    MaxClients           25
    MaxRequestsPerChild 200
</IfModule>

Also make sure to adjust the KeepAliveTimeout to 10 or 15.

UPDATE:

So we ran for a week or so on this, seemed to work for awhile and then finally it failed again. Don't worry! We have quite a few options we are just going 1 by 1 to determine what is most needed and what is just extra tuning. Next up, lets limit Innodb memory allocation. Our error clearly states SQL has requested unavailable memory, so lets go ahead and change that.

Lets go ahead and tune innodb's memory usage.

Open my.cnf  and add this line: innodb_buffer_pool_size = 64M

Save it and back up the system, and lets see if that finishes the job.




















Installing Wordpress Templates on Google Compute/App Engine

It was quite maddening to discover after using Google App Engine's one click deployment solution, I didn't have an easy way to upload files. I was used to using the App Engine's app appcfg.py tool to upload to App Engine itself, but Google Compute is an VM, and needs to be accessed via one of several different ways.


So adding the Template to Wordpress actually wasn't terribly difficult once i figured out how to connect to the VM. For me the easiest was to connect via GCloud, using the compute command. I could then SSH into the server and determine where I was, and where I needed to upload.

At the time of writing, the Wordpress install has the template folder located in wp-content. The full path /www/htrml/wp-content/themes .



Saturday, April 3, 2010

Better than Apple IPad?¿ - Meet the Onkyo NX Netbook/Netpad






(This video was edited with windows 7 video editor on this PC.)


This review manifested from something a little different than most reviews or posts within this blog, which is normally reserved for rantings on my home PC. I recently picked up this Onkyo and I don't actually intend on buying an Apple IPad. My main goal was to get the smallest PC I could find that wouldn't drive me to drop kick it after typing a short email. I backpack various countries & book rooms day before or day of visiting, and I wanted something I could carry thats as lightweight as possible, but usable. 


After checking out an array of different products on the market I must confess when getting into the 7 inch screen size, you really don't have many choices for a large keyboard. Most keyboards are "mini" with much smaller keys. The market is also been dominated by Asus and their Eee Pc's. Unfortunatly they run 8.9" and larger and don't have alot of the features the Onkyo NX or Kojinsha(discontinued) sport. Items such as Touchscreen, GPS, and non solid state HD's are to name a few differences.


A few weeks ago Apple announced here the Ipads specs. The display is 9 inches, a pretty large screen, though they say it will run 10 hrs on a battery. It got me thinking of other ways this Onkyo NX beats the Ipad even before it makes it to market. Below, a few items off the top of my head:
  • Keyboard as well as touch screen
  • Win 7
  • Flash works!
  • Open (in the sense I can run Ubuntu if I wanted to, and as much as you can say Windows is "open" in comparision to Apple)
  • Micro Flash Card 
  • 80 gb hd
  • Multi task ALL apps (Ipad will most likely multi task only native apps)
Now not to be unbiased, below the ups for the Ipad (that has so far been released) in comparison:
  • Battery Life (supposedly 7 hours more)
  • Mobile 3g
  • Larger Screen 
  • Do not know about the proc, the theory is that it will be (or equivalent to) its 1GHZ A4 making it slower than the current ATOM 1.33

Wednesday, February 24, 2010

Sapphire Review on New Egg

I posted about the sapphire adapter from below on Newegg. After a week they disapproved my review?? I guess they didn't want to admit its just repackaged junk. Only hype reviews allowed:

New Egg Sale Link

Wednesday, February 10, 2010

Sapphire Display Port to DVI-D Dual Link Adapter Model 100915

Here is really what SUCKS about the below setup. And I mean a capital SUCKS on this POS. First, let me explain why you need this shit filled waste of space. The 5870, or I think most of the ATI 5000 series use a "display port" as one of the connectors for the screen. So they have moved 1 of the connectors to a "display port" connector, and 2 of the others are dvi-d connectors. For some reason they can't fit 3 dvi-d connectors into the card.

Now the fun part. Find a decent monitor (not a Dell pos that burns out after a year) using Display Ports. Suprise!!! THERE ARE NONE! Because NO ONE GIVES A SHIT. Display ports aren't the standard today and anything we push into DVI is going to be max for our monitors right now. It's like jumping on the hybrid car bandwagon, in 1985...

Anyways the real fun begins when you get to shop for a Dvi to Display port adapter. Not a problem right? Well the adapter has to be powered, something about the display port adapter setting the clock signal into the adapter. So you can't get the 10$ plug changer for this one. You need a Active display port adapter, one that stays powered on by USB.

Now prior to Dec 09, the only company to make these were these guys. Dell sells one here and you can see the reviews are less than flattering. Who wants the "loose your mouse in a garbled mess" every once and awhile...

Dells Display Adapter

So I read that Sapphire, a maker of Radeon cards released they were going to have the "solution" to the DVI to Display port adapter issue. Sounds awesome! A company finally stepping in and filling the void. After about a months wait, this appeared at Newegg:

New Eggs Sapphire Display Port

So I order it in anticipation. I know it looks almost the exact same as the dell one, but hey, maybe thats just a coincidence right?

I get it and lo an behold, its just had a sapphire sticker stuck over the original manufacturer. What a bunch of crap. And of course the issues in the Dell one, are the exact same issues I get with this one. I currently have a CPU fan on it and when it gets too hot, I turn the PC off for a bit. Awesome job Sapphire, Fuck you too.

Saturday, February 6, 2010

Battlefield Bad Company 2 Beta on Eyefinity

Well it didn't take me long to put together what I needed to play some awesome games. First up this is Battlefield Bad Company 2 Beta. All 3 screens are running at 1920 and are NEC's attached to a Radeon 5870. In addition to the 2 screens below I bought a NEC 2490WUXI-SK screen running in the middle. Let me show you the game in all its glory and then I will post my thoughts on adapters and problems I had with the setup.

Here is the Battlefield Bad Company 2 Beta