Dhanaraj M

Wednesday Jul 02, 2008

Tips - Vnode Page Mapping for AMD64 machines

VPM has been part of SNV code and this is going to be out with S10U6 release.
Some important tips here..

VPM - enable/disable:

The VPM is enabled by default for amd64 machines. In order to disable VPM
(use seg_map), set "kpm_desired = 0" in /etc/system.
("vpm_enable = 0" does not reflect anything - Refer: 6431013)

Performance tips:

1. The default value of maxcontig is 128. Setting a higher value of maxcontig gives
a better performance.

2. The default value of UFS_HW is 16MB. This value can also be tuned (increased) to
achieve a better performance. However, increasing ufs_HW much higher can result in
disk saturation. (The optimum value can be determined by running performance tests
and the optimum value varies between different systems and disk speeds)

Saturday Feb 16, 2008

A Nice Article about Love (by Swami Vivekananda)

I once had a friend who grew to be very close to me. Once when we were sitting at the edge of a swimming pool, she filled the palm of her hand with some water and held it before me, and said this: "You see this water carefully contained on my hand? It symbolizes Love."

This was how I saw it: As long as you keep your hand caringly open and allow it to remain there, it will always be there. However, if you attempt to close your fingers round it and try to posses it, it will spill through the first cracks it finds.


This is the greatest mistake that people do when they meet love...they try to posses it, they demand, they expect... and just like the water spilling out of your hand, love will retrieve from you .


For love is meant to be free, you cannot change its nature. If there are people you love, allow them to be free beings.

# Give and don't expect
# Advise, but don't order
# Ask, but never demand

It might sound simple, but it is a lesson that may take a lifetime to truly practice. It is the secret to true love. To truly practice it, you must sincerely feel no expectations from those who you love, and yet an unconditional caring."

Friday Feb 15, 2008

pgAdmin3 - Failed to start (BadAlloc problem)

Recently I heard from the customer that pgadmin fails to start with the information..

     BadAlloc (insufficient resources for operation)

	(Details: serial 172 error_code 11 request_code 131 minor_code 5)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)

I root-caused the problem. The summary is here..

There has been a Xserver fix integrated which affects both Xsun/Xorg (sprac/x86). It was integrated into SNV_79a & S10U5-05.
Hence, 119050-36 (sparc) & 119060-35 (x86) bad patches cause the Badalloc problem.

This is fixed in SNV_84 & S10U5-09. Another solution is to upgrade to the recent 119059-40 (sparc) & 119060-40 (x86) patch level or the above.

Another workaround for X86:

1. To work around the described issues for the Xorg(1) server, the affected X Server extensions may be disabled.

    $ /usr/X11/bin/Xorg -extension MIT-SHM

2. The X Server extensions may also be disabled by editing the xorg.conf(4) file. For example, to disable the MIT-SHM extension, the following lines may be added to the xorg.conf(4) file:

    Section "Extensions" Option "MIT-SHM" "disable"  EndSection

Saturday Dec 22, 2007

pgAdmin3 integrated into Solaris

pgAdmin III is the most popular and feature rich open source administration and development platform for PostgreSQL. This has been integrated into Solaris. This is part of OpenSolaris/Solaris from SXDE (Solaris) b79 and S10U5. Alternatively, the Solaris packages for Sparc and Intel machines can be downloaded using Solaris package download link (including the recent release of pgAdmin III v1.8.0).

Tuesday Nov 27, 2007

Common issues/solutions during Solaris installation on Laptops

This blog will help to resolve issues during Solaris installation on Laptops.

1. Partitioning the hard disk
    - Any software (Belenix/Gparted/etc) can be used
    - If the windows drive is not accepting to make partitions, then windows drive might have errors. You might need to run "chkdsk /f" from the cmd line (or Boot into Recovery-mode and run CHKDSK
    - The type of Solaris partition must be "unallocated"
    - Goto cmd line & make that partition as Solaris partition (fdisk -l.... etc)
    - If any other drives need to be shared across the Solaris partition, the partition type to be assigned is "Fat 32"

2. Installing SXDE
    - If the RAM size is >= 1GB, choose Solaris-Express from the menu
    - Otherwise choose "Solaris"  and "Text and Console session" in the first and second menu respectively

3. Network detection - issue
    - After the installation, if the network is not detected, then perform this "svcadm enable nwam"

4. Mount other drives using vfstab
    -Add an entry for each of the drives in "/etc/vfstab" file

    Example: 
    #device         device          mount           FS      fsck    mount   mount
    #to mount       to fsck         point           type    pass    at boot options
    /dev/dsk/c1d0p0:1       -       /win_c  pcfs    no      yes     -
    /dev/dsk/c1d0p0:2       -       /win_d  pcfs    no      yes     -

5. Audio driver - issue
    - Download & install this package
    - Download OSS driver

Wednesday Aug 29, 2007

Memory leak problem- An interesting solution

I came across a memory leak problem. It is interesting that Solaris 10 provides a very good mechanism with the help of libumem.so library and mdb debugger to solve this problem. The following steps help to identify memory leaks.

  • $export LD_PRELOAD=libumem.so
  • $export UMEM_DEBUG=default
  • $ mdb  ./myTest
  • > ::sysbp _exit
  • > ::run
  • > ::findleaks

If you find the following error message

  • "mdb: invalid command '::findleaks': unknown dcmd name"

then the workaround is

  • >::load libumem.so

Sunday Jul 22, 2007

Things to keep - QUOTES

Saturday May 26, 2007

OpenGrok setup - source code search and cross reference

This tool is very helpful for the developers to search, cross-reference, and navigate the source code. The following steps will explain how to setup this tool.

1. Download OpenGrok package - OSOLopengrok-0.4.pkg (same for Both sparc/x86)
    > Download link
    > pkgadd -d OSOLopengrok-0.4.pkg

2. Download Exuberant Ctags - ctags-5.6.tar.gz
    > Download link
    > Untar/configure/gmake/gmake install

3. Download  apache-TomCat  - apache-tomcat-6.0.13.zip
    > Download link 

4. Configuration steps
    > cp  /opt/OSOLopengrok/source.war   apache-tomcat-6.0.13/webapps/
    > export JAVA_HOME=/usr/java
    > mkdir INDEX
    > java -jar /opt/OSOLopengrok/opengrok.jar
       - Generate Indexes by giving the source path
    > vi apache-tomcat-6.0.13/webapps/source/WEB-INF/web.xml
        - Assign DATA_ROOT and SRC_ROOT dir variables
    > ./apache-tomcat-6.0.13/bin/startup.sh
    > http://localhost:8080/source/xref/
        - Use the above URL to navigate the source code

5. For changing the source directory
    > ./apache-tomcat-6.0.13/bin/shutdown.sh
    > rm -rf INDEX/*
    > Repeat step-4

6. Whenever the machine is restarted
    > ./apache-tomcat-6.0.13/bin/startup.sh

Wednesday Apr 11, 2007

pgAdmin packages for Solaris available

pgAdmin III is the most popular and feature rich open source administration and development platform for PostgreSQL. The current release is pgAdmin III v1.6.3 and the Solaris packages for Sparc and Intel machines can be downloaded using Solaris package download link.

Tuesday Jan 30, 2007

Why the customers choose Solaris?

Sun Solaris has invented many concepts in the area of Unix/Networks including D-Trace, RPC, doors, etc. I like to mention some of the facts here.

  • Oracle has been one of the best databases which is used by many applications and the performance/features provided are good. It is proved that the Solaris is the best platform for running Oracle
  • Google recently bought Sun hardware and the following are major reasons why Google is happy with the Solaris deployment: Increased security and reliability, better control of IT provisioning and management, and enhanced support for servers.
  • Sun is ranked as number one in the Open Source world, as Sun has been contributing significantly to the community (Solaris and Java are the major contributions)
  • The recently invented Zones/Virtualization helps to run multiple Solaris versions on a single machine and achieve the optimal resource utilization. The advancement of Zones, Branded Zones, helps to run other Unix operating systems (Linux, MAC os) on top of Solaris.
  • Sun specific technologies including ZFS and D-Trace are unique and the similar features are not avaiable in other platforms

Saturday Jan 20, 2007

Exploring other possiblities with D-Trace in PostgreSQL

User-level D-Trace probes in PostgreSQL  is an article written by Robert Lor. This gives a good overview on how to debug/analyse PostgreSQL code using D-Trace (Community help documents). Here, I like to add some points which are not covered already.

D-Trace scripts provide some useful information including processID, thread-local variables, PC location and easy way to analyze the performance issues in terms of time estimation, count. 

Building --enable-dtrace:

The user-level D-Trace probes have been integrated into PostgreSQL-8.2. They work only on Solaris Express (Solaris Nevada build 55 and above). The work-around on Solaris-10 is to remove static from the following functions: StartTransaction(), CommitTranaction(), and AbortTransaction()

Playing with probes:

View the existing probes and their details (provider, module, function, probe name)

> dtrace -l | grep postgres

Add additional arguments into the probes like start-transaction(int, int) and view them in the d-script using the following.

printf("ARG0:%d, ARG1:%d", arg0, arg1); 

New probes can be declared in src/backend/utils/probes.d and they can be inserted at the required location with necessary arguments.

Tracing PostgreSQL code without D-Trace probes:

When the PostgreSQL server is started, the main process waits for the connection-request from the clients. As soon as it receives a client's connection request, the new process is forked and it takes-over the upcoming requests from that particular client. In addition to the main process + N - child/client processes, there are two active processes to write the logs.

To trace the control flow including the user-defined functions and system calls, a script can be written. For tracing at the time of making connection with clients, assign main process ID as processID here (fork_process as  functionName). For tracing  the  query execution  module,  assign process ID of that particular client (pg_parse_query as functionName). Here, functionName plays an important role because the tracing will start only after the control reaches that functionName.

> dtrace -s myScript.d -p <processID>

pid$target::functionName:entry
{ self->trace = 1; }
pid$target::functionName:return
/self->trace/
{ self->trace = 0; }
pid$target:::entry,
pid$target:::return
/self->trace/
{}  

The following script helps to track only user defined functions.

> dtrace -F -s  myScript.d <processID>

pid$1:a.out::entry
{}
pid$1:a.out::return
{}

Friday Jan 12, 2007

Happy Youth Day

Narendranath (Vivekananda) was born on 12th Jan, 1863. Indian youth is celebrating Swami Vivekananda's birth day as National Youth Day.

 

Vivekananda and Sri Ramakrishna: When he was young, he met prominent religious leaders, but could not get a convincing answer from them to his question about the existence of God. This came about, in 1881, the historic meeting of these two great souls, the prophet of modern India and the carrier of his message. He asked Sir Ramakrishna, "have you seen God". He answered, "yes, I have seen him just as I see you here, only more intensely". At last here was one who could assure him from his own experence that God existed. After Sri Ramakrishna passed away, he became the leader for disciples. In his remaining life, he traveled to many countries, in order to spread his master's message.

Messages:

  • He is an atheist who does not believe in himself
  • Education by which the character is formed, strength of mind is increased
  • Karmayoga means, even at the point of the death to help anyone, without asking questions. Be cheated millions of times and never ask a question
  • Never mind these failures, these little backslidings, hold the ideal a thousand times, and if you fail thousand times, make an attempt once more

The ideal of man is to see God in everything

  • It is meditation that brings us nearer to truth than anything else
  • Arise, Awake, and Stop not till the goal is reached

Wednesday Jan 10, 2007

Buddha's Thrice Blessed Day

He was born as the son of King Suddhodana and named Siddhartha, that is, "He who has accomplished his purpose". One day he visited the city and came across an old man, a diseased person, a dead body, and a sannyasin. Being told that the first three were not rare scenes, but the inevitable fate of all living beings. He was very much plunged into deep thoughts. He decided to renounce the world in search of truth. After six years of hard questions, the much desired enlightment dawned upon him. He passed away at the age of eighty on a full moon day, which is known as the Thrice Blessed Day, as on this day he was born and also attained enlightment.


Swami Vivekananda on Buddha:
Buddha is the man who actually carried this teaching of Karma yoga into the perfect practice. He is the ideal karma yogi acting without any motive, and the history of humanity shows him to have been the greatest man ever born, beyond compare, the greatest combination of heart and brain ever existed, the greatest soul power that has been manifested.

Tuesday Jan 09, 2007

Highly Available Data Base (HADB) - Hidden Miracle

Sun has acquired a company called Clustra. HADB is also known as Clustra, which is a highly available data base and developed based on a PhD thesis. This is available in Solaris, Linux, and Windows platforms. Currently Honeycomb (storage product) and App-server are the Sun's internal customers. HADB provides the basic data base features such as DDL/DML SQL queries, optimizing queries, prepared statements. Each node has a mirror node which has the same copy (data) of its original node. Hence, the mirror node takes over the tasks, in case of hardware/software failure of the node. A set of extra nodes can be added in the pool to handle/take-over when both the node and its mirror fail. Hence, the availability is guaranteed always.

I believe that HADB is a suitable data base on the server machines, in order to provide the availability and the service without any disruption

Monday Jan 08, 2007

Autoconf/Automake - Life becomes easy

"Configure/make/make install" is the way to compile and install the packages. However, manually writing the configure and makefile files is not the easy job. This task can be done very easily once the developer knows the basics of automake/autoconf.

configure.in and Makefile.am are the files to be created by the developer. Automake and autoconf should be installed. The main aim of them is to simplify the developer's task and produce the configure and makefile scripts systematically.

./autoconf -> generates configure file from configure.in/configure.ac file
./automake -> generates Makefile.in file from Makefile.am
./configure -> generates Makefile from Makefile.in (This also checks for the necessary packages, compilers, etc and then sets the compilers/flags, install location, include/library locations)

Calendar

Feeds

Search

Links

Navigation

Referrers