Monday, January 28, 2013

My First Full Marathon

The remaining distance changed from kms to meters..1000 mts to go. A sudden adrenaline surge had me running again in elation after having been waking for nearly 9 km. But this rush could not last for even 200 mts and I again started crawling. As I approached finish, somehow managed to sprint  the last 100 mts (without doping) and achieve my personal milestone of 42:195 km in 5hrs and 17 mins.
 
The finish line area was empty and none seemed to be there to pat my back. Looking back I saw a guy from western navy command approaching the finish line. I did not want him to have same empty feeling and immediately turned back to congratulate him. We just hugged each other as we both could relate to the pain and glory when mind finally had overpowered the body in mind vs body game.
 
The bruises in the body, the pain in the shoulders and back lasted more than the emotional high gained from the marathon. The after week was devoted to caressing the body joints and eating as much calories as I could without feeling guilty about it.
 
So at the end of it what did i gain? Health, yes that is a big gain considering i was suffering from high BP just a year back. My heart rate has now slowed down from average 80 BPM to 70 BPM which means I have lessened my stress levels. But apart from it nothing more to share as I believe completing a marathon is miniscule feat compare to lot of activities we work towards in our daily life. Don’t believe me, try once  focusing 8 hrs in office for a productive work. I don’t remember if I could achieve this feat in my more than a decade experience in the industry.
 
We all are a running our own marathons daily, be it simple thing like managing to reach the office through heavy rush hour traffic, our wives stressful routine in managing the family back home, our elderly parents health related issues, our kids daily routine with of school home work etc without they even realizing that this still is the best part of their life. And just as the hug from the unknown man at the finish line made me feel good about the entire marathon experience, a simple gesture  like a hug or pat to our daily marathoners at the finish line will go a long way to make them the IRON MAN of ultramarathon called LIFE.

Monday, November 01, 2010

Measuring the scalibility of applications on CPU cores

Often we may be required to access the scalability of the application i.e. how well the application behaves with the increase in number of processors, memory, network bandwidth etc available to it.

Traditionally for example we may have done this by running on a 2 core machine and then run the same application on a 4 core machine with roughly same processor speed and same OS version.

But this method does not give a reliable estimate of scalability as there is lot of other parameters which change when we move between to physical machines.


We can use a muti-chip machine to access the scalability of an application. E.g. on a 2 chip Quad core machine (total 8 cores) we can test the application scalability on a single chip first (4 cores), by disable the all cores on other chip and then test the performance again on both the chips by enabling the already disabled cores i.e on all 8 cores.


Invoke the following commands through “root” user

To disable the cpu core:
echo -n "0">/sys/devices/system/cpu/cpu1/online

To enable the cpu cores use
echo -n "1">/sys/devices/system/cpu/cpu1/online


This way we can get to know how well the application scales using a single hardware box.

However we need to take care of things like which CPU cores to be disabled and which not, by knowing the processor layout of the hardware box under consideration which we catch up next time.

Sunday, August 15, 2010

Moving to 64 bit Computing

The 64 bit architectures history dates back to 1970's on RISC based Servers but is relatively new to x86 (32 bit) architecture space.
Intel shipped it first 64 bit processor (x86-64) in form of pricey Itanium Servers but Itanium did not live up to its hype. However it was when AMD introduced cheaper 64 bit Opteron processor for servers and Athlon 64 for workstations and desktop that 64 bit computing finally arrived to large arena. It is only then the 64 bit processors started gaining operating system support to exploit their functionality.

Most of the legacy applications which exist today or even ones which some developers are developing are 32 bit applications. Even though we have 64 bit operating system support on 64 bit hardware, there does not seem to be an urgency in dev community to port their 32 bit applications to 64 bit computing. The main reason which the developers may cite:

  • My application is not memory hungry and will fit in within 4 GB of virtual address space.
  • I do not use 64 bit data types (long, longlong, double etc),
  • Since i use none of the 64 bit features, why unnecessarily burden my 32 bit application with 64 bit overhead.

Apart from the concerns which developers have, one disadvantage of 64-bit architectures relative to 32-bit architectures is that the same data occupies more space in memory due to swollen pointers . In 32 bit the pointer is 32 bit in size while as in 64 bit the pointer is 64 bit in size. This increases the memory requirements of a given process and can have implications for efficient processor cache utilization.

While the concerns of a developer may me valid in some cases, let us look at the advantages which 64 bit has to offer over 32 bit:
  1. System architecture on Intel x86 (32-bit architecture) limits virtual memory space to 4 GB, This is not present in 64-bit architectures, which can use 4 GB of memory and more.
  2. Memory-mapped files with sizes more than 4Gb are becoming more difficult to implement in 32-bit architectures. However on a 64 bit architecture this is not an issue.
  3. Floating-point operations in 64 bit are implemented using a register-oriented instruction set, rather than the stack-based approach supported by x86.
  4. In 64 bit architectures (x86-64), the set of general-purpose registers is expanded from 8 in 32 bit (x86) to 16. Hence much of the program state is held in registers rather than on the stack effectively increasing the performance. Some procedures do not need to access the stack at all.

The last two points are very important form the performance perspective and should give you enough reasons to recompile your 32 bit application in 64 bit. Lot of applications when recompiled in 64 bit are often better than its counter part in 32 bit like latency performance tests. The difference is markedly visible in CPU intensive applications (throughput applications).

So there should be an urgency in porting 32 bit application (x86) to 64 bit platforms (x86-64) quickly to gain upon the performance benefit which the 64 bit computing has to offer.

Wednesday, July 21, 2010

Resurrection

I have woken up from deep slumber after nearly 6 years. Lot has changed in between. I manged to clear my grad studies, started my professional carrier and also got married. In my current role i am a devoted family man at home and a Product Performance Analyst at office.

In between I was pondering about to start writing my mind out, but for past two years I had been so occupied with my professional interests that i hardly give myself a chance to think outside the professional box .

I got inspired by my boss who is very passionate about providing computer education to the 80% of our masses who do not understand english . I also wanted to share my experiences gained by goggling. Also this blog will serve as a repository for those useful information.

I plan to write some about the technical stuff mostly performance related which i encounter as and when. I do not plan to follow any order will write random stuff. So i do not expect faithful followers but random googlers, bingers etc to hit this blog.

My goal for this blog is at least 20+ posts in one year.

Tuesday, July 13, 2004

weRwinners

In this bloodbath happening between the email service providers we are the real winners. As far as i am concerned i gained a lot from it. My local disk storage space offerd to me is meagre 300 mb. But thankx to those sites i dont have to again forge new excuses to my administrator for getting more space.

Google has been the frontrunner in this race, both in terms of technology and the innovation. Google has mainly gained the advantage by being first in the market of search engine. So it has always been one step ahead of its competitors.
But did we realise why Google's Gmail came so late in the flourishing market of the email service. May be google had not precieved as the things would change so quickly in the comming years. It was happy in gaining supremacy in its search engine business. In the past year or so lot of developments have taken place.

1)Yahoo whose search engine was powered by Google till 2003 has purchased "Inktomi" a search engine technology provider which specilizes in algorithimic web technology . The Inktomi's search technology powers Amazon.com and Wallmart to name a few.Thus Yahoo is starting branding itself as destination for search.

2)Another development in search engine technology is the development of Microsoft's new Longhorn operating system. Longhorn monitors all of your activities Every file, every image, word document, mp3 etc and the information collected from these could make your search more enjoyable while you are browsing. Microsoft plans to ship its own search engine along with this operation system. And looking at the cult following of windows,just like the window explorer which has made most of the other browsers a history, same may be applied to the search engines existing now.

3)Upcomming search engines have learned from the mistakes of the Google, for example "mooter.com". It arranges the search results far more logically them what Goolge does. It has lot more added features along with that.

All the above and lot more other issues have forced Google to explore other areas of business to survive on the web. And inorder to maintain and increase its loyal base Gmail entry in email business has been one among them. And when Gmail offerd 1 GB space others too fell in line. Rediffmail is also offering whooping 1 GB space along with provisions of sending 10 mb file attachments.

This war for providing email storage has been a gift for us. Let us hope some more developments would take place and shower us with some more features.

But google is not giving space so easily. We may have to sacrifice our privacy. Google will be scanning our emails.The advertisers registered with Google would then use key words our private e-mail - and post the advertisemnts accordingly, for example if message mentions something related to computer, you may get advertisemts from the hareware companies.This has resulted the Gmail to get into a legal tangle with some senator of California.So it is better not to put the critical messages on Gmail. I am dumping my files on Gmail for storage purposes only.

But as long as we are getting the goodies I don't give a damm to it!!!