Getting to Yes -- As Quickly as Possible

Posted on Fri 29 March 2019 in go • Tagged with devops, performanceLeave a comment

There was a great discussion a year ago about how fast gnu's version of "yes" is. If you're unfamiliar, yes outputs y indefinitely.

yes |head -5
y
y
y
y
y

The key takeaway was that write is expensive and writing page-aligned buffers is much faster. The is true across languages, so let's see how to do it properly in go.

If you're shocked or impressed by the results, let's see you do it in your language -- post your results in the comments.

First, our benchmark C code from last-year's post.

/* yes.c - iteration 4 */
#define LEN 2
#define TOTAL …
Continue reading

Opsworks before-migrate.rb

Posted on Tue 09 June 2015 in aws • Tagged with chef, opsworks, aws, devopsLeave a comment

Opsworks is a convenient, powerful and free service provided by AWS to simplify the management of EC2 nodes.  The real power of the system is exposed through customizing various stages of the instance lifecycle by creating custom-tailored chef-solo recipes.

While Amazon provides a powerful deployment layer for PHP applications, it stops short once the PHP code has been checked out of git.  For Laravel or other composer apps, you’ll have to customize your deployment.  The most elegant and straightforward method is through custom deployment hooks.  Here’s how to build a before_migration.rb script to build a Laravel app …

Continue reading