Archive for September, 2012

iOS6 HTML5 updates.

Posted on September 26th, 2012 in iOS, iPhone | No Comments »

Here’s a great writeup on the new HTML5 improvements that rolled out for iOS6:
http://www.mobilexweb.com/blog/iphone-5-ios-6-html5-developers

The biggest improvements is native file upload support for web apps (no more need for Phonegap?) as well as remote webkit debugging.

htop: a better version of unix top

Posted on September 13th, 2012 in unix | No Comments »

I just discovered htop a more colorful version of top. It loads faster and visually shows you how each CPU core is doing. Love it.

To install on the Mac

sudo port install htop

To install on Amazon EC2

64 bit:

wget http://pkgs.repoforge.org/htop/htop-0.9-1.el5.rf.x86_64.rpm
sudo rpm -Uvh htop-0.9-1.el5.rf.x86_64.rpm
rm htop-0.9-1.el5.rf.x86_64.rpm

32bit:

wget http://pkgs.repoforge.org/htop/htop-0.9-1.el5.rf.i386.rpm
sudo rpm -Uvh htop-0.9-1.el5.rf.i386.rpm
rm htop-0.9-1.el5.rf.i386.rpm

Related links:
How to install htop in RHEL Centos or Fedora
Comparison between htop and top

Optimizing Apache’s memory footprint by removing unused modules

Posted on September 12th, 2012 in Apache | No Comments »

Apache is a robust and customizable web server which unfortunately comes with the kitchen sink preinstalled. While load-testing our corporate WordPress blog with Apache Benchmark and Unix top, I saw that each Apache process takes about 235 megs!

I used this Apache mod description page to comment out all the unused modules Apache comes preinstalled with like WebDAV and LDAP. Was able to reduce Apache’s footprint down 28% to 169mb. Here is a quick list of commented out modules, some may actually be useful for you, so look them up before you use my list. Happy trimming!:

LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule authn_file_module modules/mod_authn_file.so
#LoadModule authn_alias_module modules/mod_authn_alias.so
#LoadModule authn_anon_module modules/mod_authn_anon.so
#LoadModule authn_dbm_module modules/mod_authn_dbm.so
#LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
#LoadModule authz_owner_module modules/mod_authz_owner.so
#LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
#LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_default_module modules/mod_authz_default.so
#LoadModule ldap_module modules/mod_ldap.so
#LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
#LoadModule logio_module modules/mod_logio.so
#LoadModule env_module modules/mod_env.so
#LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
#LoadModule usertrack_module modules/mod_usertrack.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
#LoadModule dav_module modules/mod_dav.so
#LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
#LoadModule info_module modules/mod_info.so
#LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule actions_module modules/mod_actions.so
#LoadModule speling_module modules/mod_speling.so
#LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
#LoadModule substitute_module modules/mod_substitute.so
LoadModule rewrite_module modules/mod_rewrite.so
#LoadModule proxy_module modules/mod_proxy.so
#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
#LoadModule proxy_http_module modules/mod_proxy_http.so
#LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule cache_module modules/mod_cache.so
#LoadModule suexec_module modules/mod_suexec.so
LoadModule disk_cache_module modules/mod_disk_cache.so
#LoadModule cgi_module modules/mod_cgi.so
LoadModule version_module modules/mod_version.so
#LoadModule rpaf_module modules/mod_rpaf-2.0.so