Tuesday, July 24, 2007

AMD vs intel

Hi freinds,
These are few things I read from the various sources. However any comments appreciated.

I have both AMD desktop and Intel core2 duo laptop & so i have the exprenence of both these processor. anyway, I am not a hardware expert & only working in software side but I got some argument which i like to share with you.

1. Multithreading :
question : People says AMD is not better than intel in case of multithreading why?

2. Gamming.
Why do one prefer AMD over Intel?
ans : AMD socket-939 CPUs have internal Dual Channel Memory controller which is synchronous with the CPU-FSB. Since the controller in located inside, its highly optimized and has less latency. Less latency improves speed. There are some instructions sets called 3D-Now in AMD that improves graphic-calculations. AMD finishes most of CPU-instructions performed Intel in fewer clock cycles. Thats why AMD labels a 2.0 Ghz CPU as 3200+, because it can perform as good as a n Intel CPU running at 3.2Ghz. These are some of the reasons why gamers prefer AMD than Intel

3. HTT technology
what is this ? observed only in AMD how does Intel attain this ?
ans : HTT mean hyper threading tech
4. Quantispeed

Tuesday, May 8, 2007

Some CVS command you never like to forget.

1. Checkout the repository for particular dated tree
Use -D "yyyy-mm-dd" to checkout/update the code based as per the date yyyymmdd. Note that the changes committed on yyyymmdd will not be included.
for example :
cvs -d 'repository'checkout -d 'basename' -D "yyyy-mm-dd" 'basename'

2) Update the code in the current tree with repect to paritcular date.
cd
'folder_path'
cvs update -D "yyyy-mm-dd"

3) To retrieve a file based on the version.
cvs update -r1.7 build.xml

4) To checkout particular folder /file.
cvs -d
'repository' checkout -d 'file/folder_path'

5) to checkout particular folder form particular tree.
cvs -d 'repository' checkout -d 'file/folder_path' -D "yyyy-mm-dd" 'file/folder_path'

6) To cross check. Thing you did are correct or not?
less CVS/Entries
& look at the tag enties .

Tuesday, May 1, 2007

Silly question with Unix

Handling large files:
1. Suppose you have very large files and it is zipped. Now you want to track some particular line. You cannot use simply the head and tail. for example i have one files wiht 59023435 lines. Now my simulator failed and reported some problem is there in line number 23694538. How do you access this line ?

Ans : Take the help of one liner awk.
vikrant@alu.hyd /u/vikrant/data/alu/2007/04/10> zcat 20070410.gz | wc -l
59023435
vikrant@alu.hyd /u/vikrant/data/2007/04/10> zcat 20070410.gz | gawk '{if(NR >23694535 && NR < 23694540) print;}'
NOD,S1Q,20070410,113621557,113621557,50012308,BXP,128,,B,118.22,0,
NOD,S1Q,20070410,113621557,113621557,50012308,BXP,128,,B,118.16,100,
NOD,S1Q,20070410,113621557,113621557,50012308,BXP,128,,B,118.15,700, --->23694538th line
NOD,S1Q,20070410,113621557,113621557,50002349,AHO,128,,A,12.25,400,


Monday, April 16, 2007

Some very silly question faced in day today life.

1. How to visualize the memory utilization in clusters ?
Ans : There is one usual way to use top and see the running process memory utilization.

2. Suppose one program takes lots of memory and one decided to put that onto the cluster.But he/she wants to see that the program should not exceeds the memory limits. so that one wants to visualize the memory used by the program and also the free memory.

Ans : one can use
prstat -p # see the RSS/Size of the process
If you want to look at system memory consumption, you could try running
vmstat or sar

3. Suppose you have a big process and you don't want it to run in the home as it affect your other process. So what could be solution ?
Ans : the solution will be run it into the cluster.

4. Now the actual question , suppose you have a process which requires some 14 GB from scratch. How do you handle such situation in the clusters ? (problem : if it doen't reserve space then sometimes the jobs runout of the space and the generated output files are not proper.)

Ans : One can use the command sqsub to the process manager. and this will submitt an executable script to the particular cluster only if it found the desired amount of space.

Thursday, April 12, 2007

Handling jar files

Following commands needs to be executed for various purposes in managing Jar files.
  1. jar cf jar-file inputfiles: It is used to create new JAR.
  2. jar tf jar-file: It is used to view all the files of the JAR.
  3. jar xf jar-file: It is used to extract the JAR.
  4. java -jar app.jar: It is used to run a JAR if the manifest file is present in the JAR. This manifest file contains the information of the file having main method.
Code to find the contents in the jar file:
    import java.io.IOException;
    import java.util.Enumeration;
    import java.util.jar.JarFile;
    import java.util.zip.ZipEntry;

    public class ExtractJar {
        public static void main(String args[]){
       JarFile jarfile = null;
       try {
           jarfile = new JarFile("test1.jar");
       } catch (IOException e) {
          e.printStackTrace();
       }
       Enumeration entries = jarfile.entries();
       while (entries.hasMoreElements()){
          ZipEntry entry = (ZipEntry)entries.nextElement();
          System.out.println(entry.getName());
          }
       }
      }

Sunday, February 25, 2007

SUNTech 2007, Hyderabad

SunTech 2007
_________________________________________
Day1:
21st Feb 2007


This was the first day of "SUNTech 2007,A World wide developer conference" . The day started with registration followed by a Sun keynote session given by Rich Green , Executive Vice President, Software Sun Microsystems, Inc. He discussed about the Web2.0 technologies, Sun tool strategy (like Sun Studio ,Java Studio. He also discuss about OpenSolaris,Resource of source code. He discuss about the achievements and necessity of SUN & Java. After which they have given a nice demo on the ongoing projects in SUN. This includes :
  1. Song search : They showed if a mp3 music is given then they can search the equivalent mp3 files. They also showed how to find the pitch of the music and seach the mp3 files whose for given pitch of the music
  2. AJAX : They showed they made a GUI interface to give the name of the city they can search it in google map
  3. Optimazation: With the help of SunStudio12, they showed how java is better choice than other OOPS languages. This demo also includes, how JIT is working with java code
  4. f3 API: This was wonderful demo. This API help to write visual element quickly
  5. Creating 3D Pictures with AJAX and GlassFish : This needs EJB3.0 and WEB2. In this demo they created some 3-D picture and added other properties like rotation, music to it.
  6. Robotics: In this demo they showed three different toys they are chase each other. This was flop in first attemped, but look good in next attempt.

After the keynote session I visited to different stalls and ask them about there products. I observed that the people associated with solaris had done a good work. They developed BELENIX (A live CD for solaris). This was fully developed by the sun people working in India (developed by mohit goush and group). I also visited to other stall, like NetBeans. They explained me how easy to developed a ME program with help of NetBeans5.0. I asked them did they have any plugin of Wireless ToolKit for eclipse and if no, can i get the source code of WTK. After than I went to Hardware side where they expalined me about SX86 machines and it effect, which i didn't understand much.

Attended Seminars
  1. 1st session: Java EE5 and GlassFish: A plunge into the Aquarium

    In this seminar they explained about new features in JEE5 ,technical 3 tier architecutre of GlassFish. They discuss about the EJB3.0 and how it reduce the need for XML deployment descriptors,dependency injection to eliminate hava naming and JNDI API. They also discuss about new POJO based persistance API for OR mappings ,component-based web application with web2.0. In this session included the demos of current and the future technologies with GlassFish project community.

    - Other interesting seminar which was parallelly going with this was "Differnce in jdk5 and jdk6" . In which they discuss about the new API introduced introduced in jdk6. They showed that Java SE 6 has a greater level of maturity, quality, stability, compatibility, scalability, and security of Java implementation.Java SE 6 has many new features, enhancements, and improvements, such as better GUI performance and better handling of the behavior of GUI applications, plus improvements and new features in server-side core and Java core.

    • Jdk6 comes with the idea of splash screens : Before Java SE 6, you could use Swing or Abstract Window Toolkit (AWT) to create splash screens in Java technology applications. However, before the splash screen can pop up, the application has to load and initialize the Java Virtual Machine (JVM)*, AWT, usually Swing, and perhaps some application-dependent libraries. The resulting delay of several seconds has made use of a Java technology-based splash screen less than desirable. Java SE 6 provides a solution that allows the application to show the splash screen much earlier, even before the virtual machine starts. Now, a Java application launcher is able to decode an image and display it in a simple nondecorated window
    • System Tray : Java SE 6 lets you access the system tray in Java technology with the help of two separate classes in the java.awt package: SystemTray and TrayIcon. These classes give you the ability to add graphics, pop-up menus, and floating tip functionality to the system tray.
    • Jdk6 comes with the idea that iterator is error-prone so not to use it : Comments
      • It occurs 3 times per loop

  2. 2nd session : Building High Performance Applications on MultiCore Systems using Sun Studio Compilers and Tools

    -

  3. 3rd session: Managing distributed solaris Environments using the N1 service provising system

    -

  4. 4th session : How to develop Solaris Parallel Applications

    -

  5. 5th session : Codecamp: Anything and Everything performance Tuning, Maximize Application performance with Sun Studio 11 performance Analyzer

    -

________________________________________________________
Day2 : 22nd Feb 2007
This was the Second day of "SUNTech 2007,A World wide developer conference" . The day started with registration followed by a keynote session on Solaris. Jim Huges CTO of solaris was taking about OS futures in the main hall. The hall was full packed. Jim Spoke about the Horizantal Scaling, Vertical scaling challenges in the coming future and what operating systems should do to address this.



Attended Seminars
  1. 1st session: Writing Highly Availabe application using Sun Cluster

    This was a good seminar by Madan. There was lot of questions and session was quite interactive.

  2. 2nd session: AMD Technical Session

    Manoj from AMD had presented this lecture and tell what approches made by AMD to become a leading 64 bit microprocessor manufacture. He told about

  3. 3rd session: DTrace :

    Dtrace : DTrace or Dynamic tracing is a comprehensive dyamic tracing framwork for solaris OS (version supported are 10 and above). Dtrace consists of multiple elements, which are built into the solaris 10 kernal: the D language, the dtrace commands, the providers and some DTrace-related libraries, and the DTrace framework. The scripts are written in D langauge. The scripts are started with dtrace command. This command will check and compile the script into an intermediate language that is interpreted by dtrace virtual machine embedded inside the kernal.

  4. 4th session: ZFS : The last word in file system

    I felt Sanjeev's presentation on ZFS was the best. He was able to make audiance understand the problems with the existing filesystem model and How ZFS is addressing them in a completely new approach. FS, the dynamic new file system in Sun's Solaris 10 Operating System (Solaris OS).ZFS is supported on both SPARC and x86 platforms. More important, ZFS is endian-neutral. You can easily move disks from a SPARC server to an x86 server.

    1. Simple administration : ZFS automates and consolidates complicated storage administration concepts, reducing administrative overhead by 80 percent.
    2. Provable data integrity : ZFS protects all data with 64-bit checksums that detect and correct silent data corruption.
    3. Unlimited scalability : As the world's first 128-bit file system, ZFS offers 16 billion billion times the capacity of 32- or 64-bit systems.
    4. Blazing performance : ZFS is based on a transactional object model that removes most of the traditional constraints on the order of issuing I/Os, which results in huge performance gains.
  5. 5th session: Virtulization
This is very intereresting concept and basically useful for system adminstrators. The basic idea of it is to create partition (not only locally or harddisk) and achieve isolation.
It means one want to use all the resources but cannot modify others file.

6. 6th session: OPenSolaris

Moinak spoke about the Belenix and the experience he went thru while creating Belenix. After the talk, there were some very lively discussion on Belenix and its futures, Opensolaris and the plans etc.

___________________________________________________________
3rd day : 23rd Feb 2007
This was the Third day of "SUNTech 2007,A World wide developer conference" . The day started with registration for the addition seminar. I choosed it for OpenSolaris.

Attended Seminars
  1. 1st session : Virtualization

    -We already have one seminar on virtualization but this seminar was better than the earlier one, they told us how to create logical virtualization, though few lines of code. A developer who don't have SU permission can create a logical partion (within he partition) provides he have 10-15 GB free space. This seminar was nice as it deals with some demo coding.

  2. 2nd session : Solaris Containers

    -This was also interesting they showed us how to use solaris containers to take full use of resource with sacrificing it isolation.

  3. 3rd session : Advance Security

    - This is basically for system adminstrators. I didn't get much in this seminar.

  4. 4th session : OpenGrok

    - This one was one of my favourite seminar. In this Sridhar told why one needs OpenGrok and how to use it. He explain the need of Ctags in it. How to run it without tomcat or any web server. People asked him about the difference between the Doxygen (C++ documentation tool) and OpenGrok. The reason given by him was quite convincing , He told that Doxygen only support C++ while OpenGrok support Java,C++,C ,perl and some more language, He also clear our confusion not to think OpenGrok as a documentation tool. OpenGrok doesn't show anything in UML format. But he also assured us that even if your repository is not in your partition , you can view it. He explained all his ideas with example of tomcat code.

__________________________________________________________________________

My Comments :
I found the seminar was eductional ,creative,interesting and beneficial.
___________________________________________________________