So you have written a PHP web application which is being used heavily enough that it needs to be optimized. Good for you!PHP Performance Optimization with Memcached

Memcached is just the tool for you. It is very easy to install and use and it will drastically speed up most PHP code that can be optimized with caching.

Caching simply means taking a piece of data that can be serialized (an SQL query for example) which is resource intensive and does not change extremely often, and storing the resulting data (as opposed to the query) in memory. Any time a matching query is attempted, the result does not need to be fetched from the database and is instead served directly from memory, drastically reducing the load on the server and latency for the resulting query data to be returned. We will cover a couple ways to avoid returning stale data later in this article.

Exactly what can be optimized with caching is a topic unto itself which I will not delve deeply into here. In general, any heavily used PHP code should at least be benchmarked (both before and after enabling memcached) to see exactly how much it will speed up your code.

I will say that I have seen drastic performance improvement with SQL query intensive code such as social network sites, forums, etc.  If your code makes many SQL queries (and let’s face it, what dynamic website doesn’t?), then it is definitely worth trying memcache to see what kind of gains you can achieve. Next, we will see how easy it is to install and use memcached…

Continue reading »

Why CSF?

Install and Configure CSF Firewall on CentOSCSF is a handy, automated firewall script for securing your server against internet based attacks.

CSF can automatically block IP addresses which are trying to gain access to a server providing a first line of defense against internet attacks. This takes a significant workload off the server admin allowing him/her to be able to focus on further securing the server(s) rather than simply maintaining.

Continue reading »

This guide was originally written by Rick Blundell and was formerly hosted at NetflowGuide.com

The purpose of this guide is to promote the education and use of Cisco’s Netflow Technology. Netflow allows network engineers and hobbyists to accurately and efficiently export network statistics for evaluation and report generation. A well written Netflow capture and scanner system permits one to analyze current network usage and plan for necessary network growth.

Netflow Example

Netflow Technology is currently employed at universities, datacenters, and office networks.

What is Netflow  useful for?

  • Bandwidth accounting
  • Accessing network consumption by subnet/host/protocol/service
  • Bandwidth billing
  • RRDTool database backend
  • Directly Integrates wtih Cisco Netflow Technology
  • Can be used with any netflow export device

What can questions can Netflow answer?

  • What are the top 10 bandwidth consumers?
  • How many Gigabytes did IP xx.xx.xxx.xxx use in the last 30 days?
  • How much IRC and Filesharing traffic is on our network?
  • Is IP xx.xx.xxx.xxx sending an unusually high amount of packets?
  • What are our maximum and average bandwidth users?
  • Is our network large enough to support our traffic?

Continue reading »

NAT is short for Network Address Translation

As a network consultant, I design and implement computer networks of all sizes for clients on a regular basis. All too often, the clients request that their servers utilize a NAT setup.

I always ask why they think they need NAT, and I am always surprised at the answer. Either the client has been told (by someone, at some time in the past) that NAT “is just better” for some reason, or they cite “security” concerns. This always makes me chuckle as NAT was never intended to provide security.

The fact is, NAT can actually make public facing servers LESS secure in a couple ways.

Continue reading »

© 2011 AdminCheats Suffusion theme by Sayontan Sinha