Showing entries 23453 to 23462 of 44119
« 10 Newer Entries | 10 Older Entries »
DevOps at dealnews.com

I was telling someone how we roll changes to production at dealnews and they seemed really amazed by it. I have never really thought it was that impressive. It just made sense. It has kind of happened organically here over the years. Anyhow, I thought I would share.

Version Control

So, to start with, everything is in SVN. PHP code, Apache configs, DNS and even the scripts we use to deploy code. That is huge. We even have a misc directory in SVN where we put any useful scripts we use on our laptops for managing our code base. Everyone can share that way. Everyone can see what changed when. We can roll things back, branch if we need to, etc. I don't know how anyone lives with out. We did way back when. It was bad. People were stepping on each other. It was a mess. We quickly decided it did not work.

For our PHP code, we have trunk and a production branch. There are also a couple of …

[Read more]
Securich debut at the yearly O’Reilly MySQL Conference & Expo

If you are attending this year’s O’Reilly MySQL Conference & Expo, it is with great pleasure that I invite you to attend my presentation featuring Securich, the MySQL user administration and security plugin. It is a user friendly tool which will help make user management and general database security much more versatile and fun than ever before.

The session will be held at 10:50am on Wednesday 14th April 2010 at BallRoom A.

http://en.oreilly.com/mysql2010/public/schedule/detail/13351

So come on over and `grant all on *.*` no more :)

Hasta luego mez amis
Haben eine sichere fahrt

Netapp ONTAP deswizzle drizzle dizzee rascal singing snapmirror

We noticed some performance issues on one of our Netapp Filers and during my investigation I noticed a few things that happen under the covers and I wanted to share them with you.

Netapp SnapMirror is an asynchronous method of mirroring files from one location to another. At my company we use it to replicate property images from one datacentre to another. I've always wondered what happens to the replica as SnapMirror is a block copy though obviously the destination may be different therefore it needs to do something 'smart' to correct the differences between the two filers.

The 'smart'ness is what is causing performance problems - so lets go through them.

Here is some of the output of a 'statit' on the SnapMirror replica. The filer is idle - its not doing any traffic and its not snapmirroring.

nas02*> statit -e

Hostname: nas02 ID: xxxx Memory: 16376 MB
NetApp …

[Read more]
Creating a MySQL dump using a CRON job

MySQL database dumps can be automated via a CRON job, without providing a password, to achieve the same follow these steps

Edit you my.cnf and make the following entries

[mysqldump]

User=root

Password=secret

Save and exit the my.cnf file

Now write the following script to the CRON job

#! /bin/sh

mysqldump –u root –all-databases –routines

>/var/lib/mysqldump/mysql.dump

Automating the database dumps without using the password will make the maintenance easier.

-Death


[Read more]
In the world of NoSQL-Hands on Mongodb-1

I’m hearing a lot of “NoSQL” these days. To really understand how (and) does it works, I decided to give a try on MongoDB. MongoDB (hu*mongo*us) is an open source, scalable, high-performance, schema-free, document-oriented database written in the C++ programming language. MongoDB is not a Relational Database Management System. The database manages collections of JSON […]

fadvise – may be not what you expect

I often hear suggestion to use fadvise system call to avoid caching in OS cache.
We recently made patch for tar, which supposes to create archive without polluting OS cache, as like in case with backup, you do not really expect any benefits from caching.

However working on the patch, I noticed, that fadvise with FADV_DONTNEED, does not really do what I expected (I used this call as it is often suggested for this purpose). In fact it does not prevent caching, it only releases already cached data.

And if we do man fadvise, it says exactly:
FADV_DONTNEED
Do not expect access in the near future. Subsequent access of pages in this range will succeed, but will
result either in reloading of the memory contents from the underlying mapped file or zero-fill-in-demand
pages for mappings without an underlying file.

So it is …

[Read more]
Photos of Om’s iPad

Om, of course, got the iPad a day early. He did an unboxing post. See also: Raanan’s post on the making of the WordPress iPad app.

Weirdly, every site I visited looked great, except this one. What’s the dealio?

Here are some photos of the iPad and its excited users:

[Read more]
Multiple attributes in a EAV table: GROUP BY vs. NOT EXISTS

Answering questions asked on the site.

Andrew Stillard asks:

I have a store which will hold around 50,000 products in a products table. Each product will have 14 options, giving 700,000 options in total. These are held in an options table which is joined via the product id.

Users search for products based on the options via an Advanced Search menu.

The users need to be able to select multiple options upon which to query. I would normally use a JOIN if it was just the one option to select upon, but because its a variable number i thought it would be best to loop through the WHERE EXISTS statement.

The issue i have currently is that the query is taking a minimum of 18 seconds (And that was a query when the tables only had a fraction of the total products in).
If you can help us speed this up, or suggest an …

[Read more]
MySQL Workbench 5.2.17 Beta 7 Available

We are proud to announce Beta 7 (5.2.17).
As you will see, for Beta 7 we focused on UI and usability.

This Beta includes:

  • Fixes for 69 bugs.
    • P1 -4, P2 – 21 , P3 – 41 and P4 – 3.
  • New Windows UI components
  • New “look” for windows version
  • Modern style tab-controls
  • New UI, toolbars and sidebar-placements
  • Easier to use
  • Improved look and feel
  • Distinct User Snippets
  • Pre-Loaded DML and DDL Snippet Libraries
  • SQL Editor
    • All DDL Statements for changes are available.
    • Results menu bar
  • In Output
    • added Details Pane for Action and Message

And there’s more, so check it out and see for yourself.

For more on these new features check out …

[Read more]
Insert data into a VARCHAR field using NDB API: a solution

You are using MySQL Cluster and crazy enough to digest NDB API? Sick of SQL? Here's a treat: a function to make C/C++ strings ready for inserting into a VARCHAR field. The special thing about them is that the length is prefixed in the first 2 bytes.

void make_ndb_varchar(char *buffer, char *str)
{
  int len = strlen(str);
  int hlen = (len > 255) ? 2 : 1;
  buffer[0] = len & 0xff;
  if( len > 255 )
    buffer[1] = (len / 256);
  strcpy(buffer+hlen, str);
}

Yes, you can use memcpy. Whatever floats your boat.

Lets use this function for a table t1, defined as follows (note: latin1!):

CREATE TABLE t1 (
  id INT UNSIGNED NOT NULL,
  vc VARCHAR(128),
  vclong VARCHAR(1280),
  PRIMARY KEY (id)
  ) ENGINE=NDB DEFAULT CHARSET=latin1

Here is part of the code, simplified for this post:

char vc[128+1]; // Size of 'vc', +1 for length …
[Read more]
Showing entries 23453 to 23462 of 44119
« 10 Newer Entries | 10 Older Entries »