Archive for February, 2010

Internet Hosting Statistics

Saturday, February 27th, 2010

It seems we are off to a good start with the data being processed continously, and the most important functions implemented on the website, We should be displaying very valuable data very soon.

Now, the name will probably be Stats Infinity, Stats short for Statistics, and Infinity to tell the world we intend to save historical data forever, and we intend to make history of a server, a domain, or an IP address available at all times.

We have just started today, so not much is displayed yet, we will be starting by displaying nameserver data, then mail server data, Web, then any other relations.

We will also have aggrigate statistics of almost everything we can think of.

For example, you can already find out how many domain names actually use godaddy’s nameservers by simple checking statistics about domains that point to the nameservers under DOMAINCONTROL.COM

Please let us know of your comments and suggestions, we would be very grateful

32bit gone forever

Thursday, February 11th, 2010

i remember when Windows 95 came out, the miracle of 32bit computing, the number 4GBs of RAM was so huge that i never thought we would get there, why in the world would anyone want to have 4GBs of ram on a computer, seemed like infinity at the time. (Yes i know MS released 32 bit before 95 with Win32s and NT but i am talking about ordinary desktops)

Anyway, these days, when an application works 32bit only, i know in advance the application is no longer maintained, With Virtualization, Database, RamDisks and other things, 32bit is long gone (At least to me), the 2 to the power 32 = 4GB are hardly good for a modern computer with a computer geek behind it, 2 to the power 64 = , (In reality, the 52/48 bit physical address is more than enough so it is not realy 64bit). seems more like it, and seems like something that will not be obsolete in the comming 20 years (Unless new technology introduces new kinds of ram where we get ram in Terrabytes)

Anyway, Microsoft’s 32 bit emulator seems to be working fine, but not for device drivers, the reason for that is that the driver is lower than the emulator (Closer to the hardware and does not pass by the emulator), This is not a problem as far as i can see as any modern hardware supporting 64bit computing should have 64bit drivers, PCI cards that do not support 64bit are common, but then again, the 32bit drivers should work for those.

Anyway, thanks to AMD i now have a 28GB Ram Hard Disk (Virtual), and when i want to analyze Database data, disk seek time is not longer an issue to me, seek time simply does not exist in RAM.

how to mount a ram hard disk in Linux

Monday, February 1st, 2010

In this post, i will show you how to create a very fast, 0 latency hard drive from the extra gigabyte or 2 on your system

1- You need to change the boot options to allow this…

Since i use debian lenny, my boot options look like this in /boot/grub/menu.lst

title        Debian GNU/Linux, kernel 2.6.26-2-686
root        (hd0,1)
kernel        /boot/vmlinuz-2.6.26-2-686 root=/dev/sda2 ro quiet
initrd        /boot/initrd.img-2.6.26-2-686

We need to append ramdisk_size=1572864 if we wanted a 1.5GB RAM drive, make sure you have 1.5GB EXTRA on your system, let’s say you must have a minimum of 2GB for the system to run using the 512MB you are leaving the system with

title        Debian 1.5GB Ramdisk, kernel 2.6.26-2-686
root        (hd0,1)
kernel        /boot/vmlinuz-2.6.26-2-686 root=/dev/sda2 ro quiet ramdisk_size=1572864
initrd        /boot/initrd.img-2.6.26-2-686

You are done for now, if you want to format and use it do this

/sbin/mkfs.ext2 /dev/ram0

Remember that you need to format as ext2 and not ext3, i have seen people format the hard drive as EXT3, why would you ever need Journaling on a RAM disk that is already volatile (Deleted when you reboot)

mkdir /ramdisk
mount /dev/ram0 /ramdisk

You can now get creative and format or load a disk image at boot time, in any case, the RAM is only allocated to the disk when you use it, but you really don’t need to know that to use your new RAM hard disk

NOTE: I chose to explain RAM disk because later on i will show you what advantages we can get from having a block level device, you can surely do this without modifying boot options by simply using tempfs or RAMFS that give you an instant ram disk, but it is not a block level device in that case

Testing Speed

So, you want to see how fast it is, but for that we need a data source that can push this thing to the maximum, the answer is /dev/zero that responds with a stream of zeros, so let us write a 1.3GB file to our new volatile hard disk

dd if=/dev/zero of=/ramdisk/pathtoimage.img bs=1M count=1300

On my computer, this took about 4.54006 seconds.

installing Debian Lenny extra steps

Monday, February 1st, 2010

This is how i install Debian lenny at the office on all computers

NOTE: (192.168.2.133) has apt-cacher, my PC 192.168.2.106 has a php script that responds with the caller’s IP

1- Put the Lenny Mini-CD into the computer
2- Follow instructions, when asked about a proxy, the address is http://192.168.2.133:3142/
3-Once done, run

apt-get update

apt-get install ssh openssh-server

4- Finding out our Network IP address, you can simply issue the command

ifconfig

The above will give us the IP address of this pc

5- Now we can go back to the Windows PC and start WinSCP and PUTTY to edit files and do stuff, i use sourceedit as the editor because i want to save any edited file as linux text (Line break is different)

6- connect via putty and WinSCP to the computer so we can edit some files…

7- Fix /etc/apt/sources.list to have the apt-cacher … and comment out the CD

so deb “http://ftp.us.debian.org/debian/ lenny main” becomes “deb http://192.168.2.133:3142/ftp.us.debian.org/debian/ lenny main”

The above lines save internet bandwidth by caching the files on the network

8- Now, we want the PC to request the same IP every time so that we always know how to connect to it.

edit /etc/network/interfaces,

——————————
initially it looks like this
——————————

auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet dhcp

——————————-
But we want it to look like this
——————————–

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet static
address 192.168.2.112
netmask 255.255.255.0
gateway 192.168.2.1

auto eth0

———————————–

—-DONE—

And now we are probably set to connect to this PC every time (Static Network IP), and to use aptitude without waiting for ages to download the packages from the internet