About Us  |  Blog  |  Hosting Partners  |  Legal  |  Portal Login

The Planet Blog

 

Archive for the ‘Tech Stuff’ Category

Matthew BoehmOften, developers and administrators come across situations in which the only apparent solutions are overly complex and require significant effort to implement. Most of the time this happens because they don’t know something else – and usually something easier – exists.

This practice was evident in a recent case where a customer didn’t know it was possible to do table joins inside an UPDATE statement.

Here’s an example of a task he was faced with: You have a user table and a user_subscription table; the former contains information about each user, while the latter contains start and end dates for particular subscription products for each user. You want to extend the access period for each user that lives in the UK using product #5.

A common way of tackling this is to create a temporary table and populate it with all of the userIds from the user table that has the country = 'UK' property, then update the subscription table specifying only those userIds in the temporary table:

CREATE TEMPORARY TABLE ukUsers (userId INT(11));
INSERT INTO ukUsers SELECT userId FROM user WHERE country = 'UK';
UPDATE user_subscription 
  SET expireDate = DATE_ADD(expireDate, INTERVAL 3 DAY)
  WHERE userId IN (SELECT * FROM ukUsers) AND productId = 5;

While the code outlined above gets the job done, it could be better written. Let’s see how the SELECT statement could be used to retrieve the user information (i.e. get all UK users with subscription to product #5):

SELECT u.firstName, u.lastName
FROM user u LEFT JOIN user_subscription s USING(userId)
WHERE u.region = 'UK' AND s.productId = 5;

Now, let’s translate the above get into an UPDATE statement:

UPDATE user u LEFT JOIN user_subscription s USING(userId)
SET s.expireDate = DATE_ADD(s.expireDate, INTERVAL 3 DAY)
WHERE u.region = 'UK' AND s.productId = 5;

It’s as simple as that! We no longer need the temporary table, and it saves us a couple of extra SQL commands.

For more information on MySQL UPDATE syntax, visit: http://dev.mysql.com/doc/refman/5.1/en/update.html

-Matthew

Chris ValderramaAfter reading our last few posts, you know all about “the cloud” now, right? Well, yes and no. You know about the cloud in a general sense, but when it comes to current applications of the cloud, we need to drill down a little deeper.

The hosting industry is abuzz about cloud computing and cloud storage. Based on some completely fictional research*, 7 out of 10 hosting customers do not differentiate between the two. *The numbers may be fictional, but based on my experience working with customers, the sentiment is entirely true.

Virtualization and Abstraction

Before we get ahead of ourselves, let’s take a quick trip down memory lane … back to the days of virtualization. Why? Because the work put into developing virtualization has been a springboard for cloud technologies – specifically with regard to abstraction, the ability to present computational power and/or storage space without theoretical limits. Through abstraction, a single physical server can be divided into several distinct virtual servers, which function as independent physical servers that have their own dedicated resources.

Cloud computing and cloud storage take the principle of abstraction and tweak it. Instead of taking one physical server and creating several independent virtual servers, the development of the cloud takes multiple physical servers and creates virtual servers that freely move between physical machines as though they were all a single server. Naturally, that’s attractive to a hosting customer.

Cloud Computing

Cloud computing allows access to theoretically limitless computational resources. A user can scale from one Web server and one database server, to five Web servers and three database servers on the fly, with no upfront capital expenditure. Cloud computing essentially makes one large virtualized server that spans the entire available hardware infrastructure. Instead of having 20 servers with 4GHz of processor power each, the cloud shows 80GHz of processor power.

Cloud computing customers purchase a part of that cloud computing platform, and if no other customers are using resources on a given installation, that customer has the can use all 80GHz of process power one minute and scale back to almost nothing the next minute. The technology is in its infancy, but it’s helping to redefine the concept of a server: It’s not a black-and-white matter of physical resources anymore.

While the hardware abstraction is impressive, the greatest potential benefit of cloud computing is its use in Software as a Service (SaaS). It’s revolutionary to have an office application that scales from 10 users to 10,000 users and also available to anyone or any device with a network connection.

Cloud Storage

Cloud storage can be an amalgam of SaaS and HaaS (Hardware as a Service): Straightforward user interfaces combined with a solid hardware storage infrastructure. Because a cloud storage installation is dedicated to access, protection and serving data, the key component is hard disk space. Being able to pay for the space that meets your specific needs at a given time has significant advantages over a traditional solution like building out a storage area network in your local office. Your storage can be available to all of your satellite offices in London, Asmara and Santiago. Moreover, your company isn’t responsible for repairing file systems, replacing drives, or dealing with Nick Burns (your company’s computer guy). Brilliant!

We’ve launched a very successful cloud storage solution, and if you’re interested in seeing what the cloud can do for you, you can sign up for our Storage Cloud Test. On the cloud computing side, our team has been evaluating the most powerful, reliable and cost-efficient cloud computing solutions, and we plan on launching a computing platform as dominant as the storage platform in the near future.

Cloud computing and cloud storage have come a long way in the past year or two, and with the hosting industry’s focus on the development and enhancement of the platforms, the sky is the limit for the clouds.

Pun intended.

- Chris

Kevin HazardLast week, Bruce Eric Anderson visited our H2 Data Center in Houston with a team of colleagues from Dell to check out the unboxing and installation of a new rack of Dell’s PowerEdge710 servers, which feature Intel’s Nehalem processor. As any great evangelist would do, he posted an article about his visit on Dell’s “Inside Enterprise IT” Blog, including a video from inside H2 with The Planet’s General Manager of Dedicated Hosting Urvish Vashi.

Urvish explains the wide array of product and service options available at The Planet and how our close relationship with Dell helps us meet our customers’ needs. Check out the video below to get a sneak peek of the install of the new Dual Xeon 5530 computing powerhouses.

All of the server geeks in the audience are probably drooling right now.

-Kevin

Kevin HazardDo you remember how you felt as the school year came to a close and summer peaked over the horizon?

For me, it was a strange combination of exhilaration, anxiousness and terror. The catalyst for those emotions was always a singular nemesis: the report card.

Being a bit of a nerd (please keep the commentary about this to a minimum, thank you), my report card was generally regarded as my life’s unequivocal barometer of success. My two or three months of summer could be made or broken by that piece of paper, and I have to admit that I didn’t always do well:

Transcript
Yes, that is an A-. No, it is not a typo. An entire class boiled down into a single grade. How arbitrary and unfair can you get? … The other three grades were clearly thoughtful and accurate. What’s was the International Finance professor’s problem?!

No, I’m not actually that vain.

That’s an actual excerpt from my college transcript, and the grades weren’t arbitrary … I worked hard and prepared for class day-in and day-out, so my benchmark validated the time and effort I invested in each class … even International Finance.

It turns out grades are often directly correlated with preparation, and they can be extremely useful in personal development and business development if you ask the right questions.

Over the past few months, The Planet has been working with Microsoft, SmallBizTechnology.com, Nine Lives Media Inc., SMB Nation, Small Business Trends, HostSearch, Yankee Group and Georgia’s Kennesaw State University to put together a survey tool aimed at asking the right questions to small- and medium-sized businesses.

Welcome to the ITEI

The Information Technology Effectiveness Index (ITEI) is a survey that evaluates the effectiveness of an SMB IT infrastructure.

The vast majority of research from analyst firms focuses on large enterprise-type organizations with deep pockets and vast IT resources to support their businesses. In contrast, SMBs are largely ignored, despite the fact they drive our economy.

After taking the survey, you immediately receive your grade, along with prescriptive guidance and recommendations on how you can improve your IT effectiveness.

ITEI Grade

With questions about everything from business continuity and disaster recovery to change management and budgeting, the ITEI is has been built to provide relevant, helpful feedback and best practices to the SMB market.

As we gain critical mass, you can receive research on how they compete against others in your peer groups and in comparison with other types of SMB companies. We will run the survey throughout 2009, issuing periodic news on what we learn. In December, the partnership will issue an annual report about the state-of-the-state of IT effectiveness.

The survey is 12 questions long and only takes about 10 minutes to complete. So what are you waiting for?

Go get your ITEI grade!

-Kevin

Phil JacksonToday, February 13, 2009, at exactly 5:31:30 p.m. CST, Unix users around the world will celebrate a momentous occasion: 1234567890 seconds will have passed since Unix time began at midnight UTC on January 1, 1970.

The relevance of this may be lost to some readers, but I assure you there is a very valid reason to celebrate such a seemingly inconsequential event. Many programs — including Operating Systems — measure time on this scale. And as you have all deduced, there will be only one time in the history of the 4byte epoch clock where we can see the sequence 1234567890. It’s party time!

I am holding out for 2147483647, when we will probably have to give up the system many of us hold dear … as it will let us down. In the year 2038, we will reach the maximum number possible in 32bits. As the time rolls toward that significant value, we’ll need to be prepared for it to run around and desert us. It’s like Y2K all over again … be VERY afraid, and brace for a possible Code Kermit.

If you want to count down the seconds until 1234567890 or just keep track of the current Unix time, you should check out this online Unix Epoch Clock.

-Phil

P.S. If you’re looking for a way to celebrate 1234567890, they just released the 1,234,567,890th Friday the 13th movie today.

George Govantes“What counters are important when troubleshooting SQL Server with Windows’ Perfmon (Performance Monitor)?”

As a database administrator architect, I can’t tell you how many times I’ve gotten that question from Windows administrators and new database administrators, and it’s a pretty daunting question to answer. When a SQL instance is installed on a server, there may be more than a thousand new performance counters added to Perfmon and to the Performance Monitor section of the Reliability and Performance Monitor in Windows 2008, so where does one start?

When it comes to performance tuning and troubleshooting, SQL Server has not changed much over the years. In a nutshell, it is all about CPU, memory and I/O. To reduce the time it takes to determine the bottleneck in a given environment, we should isolate the counters to these specific areas.

Of the many performance counters that can be selected when troubleshooting a SQL Server, these key indicators can help to quickly isolate bottlenecks and direct your investigation to the appropriate resources for corrective action:

At the Operating System Level

CPU Counter

Server Work Queues > Queue Lengths
Description: Queue Length is the current length of the server work queue for this CPU.
Value: A sustained queue length greater than twice the number of CPU cores might indicate processor congestion.

Memory Counter

Memory > Pages/Sec
Description: A page fault occurs when the operating system (OS) cannot find the requested information in its physical memory, forcing the OS to seek the information at the disk level. A soft page fault is when a page is found elsewhere in the physical memory, and a hard fault requires disk access. Most processors can handle large numbers of soft faults without significant consequence. However, hard faults, which require disk access, can cause significant delays.
Value: This value should stay below 20-25 pages per second.

I/O Counters

Physical Disk > Average Read Queue Length
Physical Disk > Average Write Queue Length
Description: Avg. Disk Queue Length is the average number of read or write requests that were queued for the selected disk during the sample interval.
Value: The value for this counter should always be under 2. This is the most reliable counter to use when the SQL instance is using external SAN storage for its databases.

Determining Application Resource Usage

Process Counter:

From Perfmon, select “Process” then select the application in question – in this case, sqlservr.
SQL Perfmon
This will add all of the operating system counters associated with the application.
SQL Perfmon
For SQL Server, the counters usually reflect information about the internal operations of the SQL instance that may not show up as a problem at the operating system level. For example, a customer might call to report that the server hangs for several moments throughout the day, but there are no errors in the application or system logs, and the OS Performance counters show all counters within normal limits.

These SQL performance counters can provide deeper insight into how the database engine is working against the customer’s application to help in your investigation.

SQL Server

SQL Server: General Statistics > User Connections
Description: Number of users connected to the system.
Value: This number will vary between applications on a given server.

SQL Server

SQL Server: Locks > Lock Waits/Sec
Description: Number of lock requests that could not be satisfied immediately and required the caller to wait before being granted the lock.
Value: This number should be near 0. If the value is greater than 0 for a sustained period, the “system hanging” as described by the customer is most likely due to locking and blocking issues within the database.

SQL Server

SQL Server: Buffer Manager > Buffer cache hit ratio
Description: The percentage of database pages that were found in physical memory. SQL Server stores information inside of 8KB data pages.
Value: The buffer pool cache hit ratio should be 100%. Values below 90% indicate that SQL Server is experiencing memory pressure.

SQL Server

SQL Server: Buffer Manager > Page life expectancy
Description: The number of seconds that a database page remains in physical memory.
Value: Values under 300 seconds indicate that the SQL instance is experiencing memory pressure.

SQL Server

SQL Server: Buffer Manager > Page reads/sec
SQL Server: Buffer Manager > Page writes/sec
Description: These values show the number of database reads and writes requested.
Value: Values for these counters will vary between database applications, but this information is useful when determining if SQL Server is the primary application using the disk. If the Buffer Manager page read-writes are low but disk-queue lengths are high, there might be a disk bottleneck. If the Page read-writes are higher than normal, a memory shortage is likely to exist.

SQL Troubleshooting Summary Chart

Counter Preferred Value
Server Work Queues > Queue Lengths < 2 per processor
Memory > Pages /Sec < 20 page faults per second per processor
Physical Disk > Average Read Queue Length
Physical Disk > Average Write Queue Length
< 2 x the number of spindles
SQL Server: General Statistics > User Connections Varies
SQL Server: Locks > Lock Waits/Sec < 500MS
SQL Server: Buffer Manager > Buffer cache hit ratio > 95
SQL Server: Buffer Manager > Page life expectancy > 300
SQL Server: Buffer Manager > Page reads/sec Value should be used to confirm I/O or memory bottlenecks
SQL Server: Buffer Manager > Page writes/sec Value should be used to confirm I/O or memory bottlenecks

The performance counter suggested may not help resolve complex situations that involve application-level performance issues, but in my experience, it is a great starting point.

-George

Todd MitchellThe Planet has five core values. We are quizzed about them at companywide meetings, and they permeate our daily operations. I recently came across a passage when rereading “The Art of War” that may serve as a secondary set of core values for the team that handles The Planet’s new Alpha Professional Managed Dedicated Servers offering:

Now there are five matters to which a general must pay strict heed. The first of these is administration; the second, preparedness; the third, determination; the fourth, prudence; and the fifth, economy.
Wu Ch’i (430 – 381 BC)

Each one of the elements Wu mentions can be interpreted differently depending on the situation. Given that I work with the team that recently launched Alpha Professional, I can’t help but draw parallels. If you missed our press release on January 12, let me recap this new service offering:

Staffed around the clock (24×7) by dedicated and certified (RHCE, MCSE, CCNA) system administrators, The Planet has created a new business-class service offering that our clients have been asking for. The Alpha Professional feature set includes:

  • First-call resolution: When you need a certified team of experts to take personal ownership of support incidents for your most important servers, Alpha Professional is ready to respond. You make one call, and the issue is resolved.
  • One-hour hardware replacement Service Level Agreement (SLA): The Planet’s one-hour hardware replacement SLA provides you with peace of mind. If your server or any of its hardware components fail, we will replace them within one hour.
  • Managed Backup: If you require a restore or you’d like to modify your backup scheduling, our team is available to assist you around the clock. Twenty GBs of high-availability redundant storage is included with Alpha Professional, and plug-ins for MySQL, Microsoft SQL, Exchange and SharePoint are available at no additional cost.
  • Server Monitoring and Reaction: Our team of monitoring engineers is constantly on standby, watching for service notifications from your server. If a critical fault is detected any time of day, they immediately jump into action to resolve the service issue. In the event the service issue is lasting longer than anticipated, our team will reach out to your designated contact(s) to provide updates and guidance on a correct course of action and ETA on a resolution.

The Alpha Professional service package is available on virtual and private racks or on a per-server basis at $125 per server per month, so you can buy the service for the servers that are critical to your business. Other hosting providers require this kind of coverage on your entire installation, but we understand that you might not need us to monitor or run regular backups on your sandbox environments or your development servers, so you shouldn’t be required to add the service to those servers if it doesn’t fit your needs.

Managed Dedicated Servers or Managed Hosting?

So now we have Alpha Professional Managed Dedicated Servers and Managed Hosting. They are two very distinct offerings linked by the generic-yet-fitting-in-both-cases term “managed” in their names. Managed Dedicated Servers is focused on your infrastructure. Managed Hosting is focused on your environment.

Managed Dedicated Servers ensure the uptime of your critical hosting infrastructure — including servers, firewalls, load balancers, etc. — and we allow you to manage everything from the operating system up.

Managed Hosting is a complete soup-to-nuts service offering in which your dedicated team has an intimate knowledge of your applications and databases. The Planet’s team will maintain a continuous conversation with you to tweak your systems, scale your installation and plan for the future. If you have database issues or you find your application is loading slowly, the Managed Hosting team will work through these issues with you. For a complete side-by-side breakdown of features by service type, visit http://www.theplanet.com/hosting-services/.

If you haven’t done so already, you can find complete information on Alpha Professional Managed Dedicated Servers at http://www.theplanet.com/managed-dedicated-server/.

-Todd

 
 

Dedicated Servers

Managed Hosting

Colocation

Business Solutions

Why The Planet?

Contact Us