Internet Hosting Statistics

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

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

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

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

Ready Boost not for MySQL

January 31st, 2010

2 posts ago, i showed you why having MySQL data on a flash thumb drive no matter how fast will not give you good database performance, But what about Windows ReadyBoost

I have already tested ReadyBoost to validate my theory before presenting it here, The answer is that ReadyBoost will NOT help with MySQL DBs, The reason is that ReadyBoost probes for file size and will only work on small files, large files such as your MySQL MYI or MYD files are skipped automatically.

How you can know this is correct, or how i probed to check that ReadyBoost will not work, i installed the flash drive on a Windows7 Machine, a good SANDISK 16GB extreme, i set it up for ready boost, and i watched the Blue Light that blinks when there is reading or writing, from the minute i executed the script that should talk to MySQL to the end of that execution and the ones that came after it, the blue LED did not blink, and so i know for fact it does not work with MySQL.

An exception would be if you had very very little data (The MySQL data files are very small), but in that case MySQL would have them cached in advance, so there would probably be very little to gain

I think web servers could make use of readyboos for those photos and similar small files, but then again this is just a theory.

MySQL Windows VS MySQL on Linux

January 29th, 2010

Comming across Robin Schumacher’s “MySQL on Windows? Absolutely!” i have some stuff to say

First, I absolutly LOVE windows on my Desktop, and i LOVE Linux on my servers, and i have nothing against windows servers or Linux Desktops, i like Operating systems that get the Job done faster and with least effort, so what suits a job suits me, having never used a mac, i would jump to a mac if they tell me it can help you develop application X faster, why not, but the article here http://dev.mysql.com/tech-resources/articles/mysql_on_windows.html does not seem to make sense to me. Here is why

In the comparison of number of downloads, it clearly reads that windows has 600K downloads VS linux that has 200K downloads, but are you serious ?

On Linux, MySQL is hardly if ever downloaded from mysql.com , while on Windows it is always downloaded from MySQL.COM and therefore i beg an explanation on why you say this statistic tells anything, Also, most developers are like me, they use the Windows edition for development on there development PCs, and then deploy the actual application on a Linux server.

For example, on a debian system i would simply issue

apt-get install mysql-client mysql-server

this will get MySQL binaries from Debian, not from MySQL, and therefore making the statistic not available to you.

Then the article talks about how insignificant the differences between the Linux and Windows edition is, to tell you the truth, this is not the case at least for me, here are SOME examples

Most of my applications can not make good use of RAID because RAID does not help with disk seek time (And therefore latency), My answer to this is usually separating tables to more than 1 hard disk , and although having databases moved to other hard drives is supported in windows by creating a text file, moving individual tables on windows is not, On linux, i simply create a symbolic link to the MYD file, and one to the MYI file, i can even split a single table to 2 hard drives with the indexes on 1 drive and the actual data on the other.

Clustering anyone ??

For a longer list check out http://dev.mysql.com/doc/refman/5.0/en/windows-vs-unix.html , this is certainly is inferior to the Linux counterpart for something like a shared hosting environment (See number of open files and connection timeouts etc..)

Now to add more to that, Linux is a free OS, you install and upgrade it for free, and MySQL is also free, if your business uses many many MySQL servers, your savings on Windows Server licenses can be significant.

The bottom line is, when a company like Oracle (Since it has acquired SUN) gets hold of an open source database engine, you can rest assured objectivity will still be there only when it supports the paying product.

Thanks for listening.

USB flash not for database

January 28th, 2010

SSD disks such as the 128GB supertalent SATA drive are good for DB applications no doubt, but USB flash disks are not, i experimented with MySQL with an operation that probably has seek issues (Latency)

So i have a database under processing where the problem is supposed to be “Latency and seek time”, so i went and got the SanDisk 16GB extreme that is supposed to be 20MB/s read and 18MB/s write, and surely, like all flash drives, no latency.

The performance was very very slow, it is probably a problem with USB or the USB controllers that work that flash memory.

Anyway, if you want to work a database from a USB flash disk, save those $85 (What i paid for the flash disk), you are better off with a SATA hard disk or even an ATA 133. but nothing USB.

Legion Red Band trailer

January 22nd, 2010

I have no idea if Legion (The movie) is coming to Jordan, it is out today in America, with the new law (few years) tightening the limits on Blasphemy, this movie could be Illegal, i am not sure yet, but from what i understand of the law talking about it could be illegal.

If indeed this movie does not make it to theaters because of it’s clear hinting and aim, i am going to Egypt to see it (Or wherever it is playing).

Anyway, here are my thoughts on the movie if i understand right (Although sharing my thoughts could be illegal as well from what i understand from the law), here is what i think.

I think the AIM of this is, when you are in the theater, if you are like me, you always want the good guy to win right, the guy that fights for the Human race and for the week etc….

Well, what if he who wants to end the human race is God (Remember Noah, yeah that kind of mass godly murder ?) and a rebel angel decides to save the human race ? which side would you be on ? i would certainly want the angel (Micheal in this case) to win.

I couldn’t help notice how similar this thing is to God’s secret army, (or The Prophecy in America), but that one is pure entertainment, this one actually makes a point.

In god’s secret army, if i recall right, more angels decide to follow Lucifer’s footsteps and rebel against god, so god sends his angel’s to earth to deal with the outlaw angels, Then some humans get in the way, and angels didn’t really care for humans, they only wanted to get the Job done

Anyway, in this Legion, things are different, here is what i make of the trailer, the green band and the red band are very similar.

1- It’s a horror movie, remember….

2- Inspiration from the terminator.
A girl is pregnant with the one who can save the race, someone needs to protect her and him

3- Micheal is on the Human’s side, Agains’t god’s will

* Some note worthy quotes from the actual movie trailer (The only one that exists up to now)

- The last time god lost faith in man, he sent the flood, This time, he sent angels

- Micheal: I knew he was going to send you Gabriel, you were always eager to please him
Gabriel: Unlike you

In the Red Band trailer.

The trailer starts with an ice cream bus playing the ice cream music reading “Frosty treats”, the bus stops, A thin guy comes out (An angel as you will see later), then his arms extend and he gives the impression of an angry predator that starts to move forward on all 4, where the trailer jumps to the next seen where a voice speaks about a prophecy her mother told her

When i was a little girl, my mother spoke of a prophecy, of a time where all the world would be covered in darkness and the fate of mankind would be decided, one night i had the courage to ask my mother why god had changed, why he was so mad at his children, she said, i guess he just got tiered of all the bullshit

In the red band trailer, Although we see a man with wings (Maybe god, but the wings look like those of Gabriel from later in the trailer), and unlike the green trailer, NO voice says “The last time god lost faith in man, he sent the flood, This time, he sent angels”, Only the green one says that, this one, Micheal drops to a street on earth, And it seems, cuts his angel wings with a knife, and a strange ring around his neck tightens then breaks.

A police car goes by somewhere, a burning cross opening in the wall, and Micheal exiting it with a couple of bags as a police patrol stops him, the police man asks him to put his hands on his head, and he says there isin’t much time, the police man attacks him (But fails againt the angel), and a spirit enteres into the second police man, the spirit says “What are you doing micheal ? Micheal replies, i’m following my own orders now, Then you will die along with the child the spirit responds, and the second police man shioots at micheal, micheal shoots back and then says “It Started”"

A police car moves across the street and all the lights go off as the car goes.

Now the scene goes to a diner in a gas station where someone turns the TV on and a “This is not a test” appears, EBS… then an old lady that is in the diner (In the other trailer you see her entering) says “Oh you don’t have to worry about that, It’l all be over soon.

the old lady (In both trailers talks to a pregnant waitress):
Old Lady: How far along are you
Waitress : Ah Just about there
Old Lady : But the baby
Waitress : I got it under control
Old Lady: But it’s gonna burn
Waitress: What did you just say ?
Old Lady : I said your fucken baby’s gonna burn

Waiter: How, How
Someone: I don’t know who the hell you think you are, But i’d like you to appologize right now

Then the old lady bites the man in the neck and he falls to the ground, then the old lady says “Your all gonna fucken die”, and starts climbing the walls to the ceiling, one man with a rifel, and another yelling shoot her, he does, and the old lady drops to the floor.

Somebody’s commin.
A police car approaches, and one of the guys says “Now What”, The police car stops in a very wiggly fashion due to speed, and Micheal comes out of the police car

He doesen’t look like any police man i ever saw, Even one from LA

Take one more step and i’ll drop you right there, the guy tells the police man, where the police man (Micheal) responds, “You dont know do you ?”

Don’t know what asks the man, and Micheal takes the rifle and points it to the guy and says, there here…

Police cars come all together, with police men acting like the one that the strange spirit was in in the beginning of the trailer

A girl asks, are you here to protect us , and the angel responds with “No Not you, her”, Why me ? “Because your child is the only hope humanity has of surviving”, and the lady says, i don’t even own a car.

Alright Rambo, do you mind tellin us what were fighting ? and Micheal responds with “Angels”

Then a flock of angels (appearing as Humans with wings) appear in the trailer, Gabriel enters the room

Micheal: I knew he was going to send you Gabriel, you were always eager to please him
Gabriel: Unlike you

They just want the child

I don’t even beleiv in god, then the angel responds, “Just found that he doesen’t beleive in you either”

Then someone sets fire to a car direct from the a gasolene pump.

An angel seems to be fighting the Micheal angel with his wings !

Are you saying this is the epocalypse ? I’m saying this is an extermination

Then the girl asks micheal, are we safe now, and the angel responds, NO

And the red banner trailer is done, here take a look at it, but as you can see above, there are some scary part, the one that takes you by surprise is when the old lady at the diner bites the man in the neck, otherwise, i would say it is scary but not extremely.

Since the trailer has been removed from Youtube, you will need to google out “legion red band” and you will clearly get the Red Band trailer links in the google video links area.

Web Statistics

January 20th, 2010

Now that i have the files needed to start digging all over the internet for Statistical data, i would probably need to start with a domain name to display the information at, And i (after buying a bunch of domain names) can not make up my mind yet, but i will let you know as soon as i do

I would like the name to reflect my intention to collect statistics and provide history for every statistic, as i said, i will let you know when i come up with a nice vacant name.

So, a nameserver, what different networks has the nameserver machine moved to over time, What domain names has it served over time, what nameservers a domain has used over it’s lifetime, How many websites (Domains) is this web server serving, How has the number changed from year to year, and other things

While trying to design such a system, it proved to be far more challenging than i thought, the interconnections of everything are a bit complicated (Taking efficiency into account), every host name can have multiple IPs, every IP can have multiple names, an example of a questions that need to be answered before the design would sound like, a website that changed Nameservers but the new NS has the same ip as the old (Same physical serveron same network), has it really changed nameservers, and no this is not like the tree that fell in the woods, they are real questions ?

So the statistics that need to be collected and used are complicated but there are other issues that i must deal with as well to protect the internet and keep it safe

1- Spammers, somehow, the statistics MUST be protected from spammers (And other types of crooks).

2- Scalability, Where the terrabytes of data are stored, and where the processing is done should not be the same as the web server that serves that data, and the web server that serves the text data should not be the same as that that serves the graphics etc… cheaper networks should be used in a way, and more expensive faster networks should be used in a different way, processing intensive operations should be done somewhere, and data fetch and display operations in another, synchronisation should be automatic

So for the above, the following are guidelines i have come up with till now

* A captcha image must appear after x page views where domain names are displayed for any client IP
* Google and other spiders must be able to archive the website and serve relevant usefull pages to there visitors, but must not provide a way for spammers to mine data, meaning, the search engine must NOT cache (Or display cached copies) of the pages where domain names appear

I will keep everyone posted right here on all such issues

For now, i need to go create an open source FAST IP-2-Country system for use with this system, and a way to seek help in building it (Where people report there GEO Location).

Stay tuned for some serious internet statistics.

Changing website URL

January 16th, 2010

It seems google webmaster tools allows you to change your website’s domain name, the only problem i am facing is how do i move the contents of a sub domain into a domain name, and how to move the contents of a domain name to a sub domain.

For the moment, using 301 redirects seems to allow this “Slowly”, but the question is why can it not be done through google webmaster tools.

On a relevant note, for the first 3 days of changing a website from a domain name to another, google has been crawling the 3 thousand page website at a rate of 1000 pages/day which is more or less all the pages of the website.

If you have any thoughts about this google address change thing, please let me know as i am interested in knowing what differences exist between this method and simply redirecting all pages with 301.