ICT Academy of Tamil Nadu A Consortium of Government of India, Government of Tamil Nadu and CII ISO 9001 : 2008 Certified Shri V Narayanasamy, Hon’ble Minister of State for Planning and Parliamentary Affairs, Government of India releasing the First issue of ICT Connect Magazine during the CII Connect 2010 Conference Nov 2010 / Volume 1 - Issue 2 Not for sale
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
ICT Academy of Tamil NaduA Consortium of Government of India, Government of Tamil Nadu and CII
ISO 9001 : 2008 Certified
Shri V Narayanasamy, Hon’ble Minister of State for Planning and Parliamentary Affairs,
Government of India releasing the First issue of ICT Connect Magazine during the CII Connect 2010 Conference
Nov 2010 / Volume 1 - Issue 2Not for sale
C O N T E N T
Nov 2010
Disclaimer : The text and other material on ICTConnect magazine are the views and opinions of the specific author and are not statements of advice, opinions, or
information of ICTConnect or ICT Academy of Tamil Nadu. All trademarks and/or registered trademarks are the property of their respective companies and / or owners.
Nothing may be reprinted in whole or in par t without written permission from the publisher. Individuals are authorized to
photocopy items only for personal use and not for commercial use.
ICTConnect
A Quarterly Magazine from ICT Academy of Tamil Nadu
Complete Protection of data, are all part of SLA Governing
the offering.
New Upgrades to software will also be done automatically
without any user intervention. No down time and high
reliability
Increased reliability stems from the fact that the cloud
runs on systems that are extremely reliable and provide
various forms of redundancy. If a storage server on the cloud
fails due to hardware or software issues, the service provider
needs only to shift the load over to other servers or bring up a
backup server in its place. If it is occurred at an users premises
with installed software a simple issue can turn to hours of
technical support over the phone, costly downtime, and
unhappy users and customers.
Scale up or down at will
In a cloud computing environment, Enterprises can
subscribe & have storage capacity scaled up or down
depending on their requirements. Service providers need only
to add servers or shift load from one server to another to
accommodate for the additional use of space. The same goes
for software application use.
Reduce cost – move marginal costs from CAPEX to OPEX
There is no need to invest in terms of hardware and
software licenses. The cost now shifts to OPEX (Operating
Expenses) because of the need to pay nominal subscription
fee on a periodic basis. Additional IT staff head count and the
salary paid out to them will be reduced.
Environmentally friendly
This model leads to a better Carbon foot print across
the globe because the need for number of sophisticated
hardware that consumes lots of energy deployed will be
reduced, as more and more enterprises disinvest on data
centers and move to the SAAS platform.
Access anytime, anywhere, pay-as-you use!
Through this model, software and related services are
rendered through the internet, which means “anytime
anywhere” availability without location constraints.
Seamless version upgrades to hosted software
Cloud computing provides a common platform for all
enterprises accessing the software or services to work on the
most-recent / up to date / modern technology. The users will
only experience new or better functionality as hardware &
software are upgraded with newer versions.
magazine
7ICT CONNECT MAGAZINE
CLOUD COMPUTING SERVICES & Offerings
Cloud computing provides a common platform for all
enterprises accessing the software or services to work on the
most-recent / up to date / modern technology. The users will
only experience new or better functionality as hardware &
software are upgraded with newer versions.
Saas (Software as a Service)
An application accessed through a browser by
thousands of customers using a multitenant architecture.
Salesforce.com is the best example for a SAAS based solution
Infrastructure services
This is a model by which Storage and virtual servers are
available on rental / demand. Usually it begins as a non
mission critical need. Amazon.com, Sun, IBM are providers
of Utility computing services.
Application integration services
Web service providers offer APIs that enable
developers to exploit functionality over the Internet, rather
than delivering full-blown applications. They range from
providers offering discrete business services -- such as Strike
Iron and Xignite -- to the full range of APIs offered by Google
Maps, ADP payroll processing, the U.S. Postal Service,
Bloomberg, and even conventional credit card processing
services.
Platform as a service
This service delivers software development
environments on demand to programmers, who build their
applications that run on the service provider's Infrastructure
and delivered to users via the Internet. Prime examples
include Salesforce.com's Force.com,
Managed services
This is an old form of cloud computing, where in the
IT department of the enterprise plays a crucial role. Services
such as a virus scanning service for e-mail or an application
monitoring service (which Mercury, among others, provides)
are already there in town.
Examples are SecureWorks, IBM, and Verizon
About the author
Suresh Jagannathan is currently working as Solutions Architect
in TAKE Solutions. He has over 7 years of Supply Chain Management
practice with Organizations like P&G, TTK-LIG, IFF & 7 years of
SCM IT Products experience as Specialist & Solutions Architect.
IT Crossword - 11 2
4 53
6 7 8 9 10
11 12
13 14 15 16
17
Across
1 Early personal computers from Apple
4 "Select an object by pressing the mouse button "
6 Plug and play
9 Widely used operating system
11 A unit of digital information in computing
13 Measuring the speed of the computer
16 Reduces or enlarges objects on the screen
17 Digital to analog and vise versa
Down
2 One dot on the screen
3 Not only humans, computer too get infected
5 "Main chip of the computer(3)"
7 Indiscriminate, unsolicited bulk messages
8 last name of computers(7)
10 One or the other but not both
12 Vector graphics printing device
14 Objects on the desktop
15 Space where the computer does its processingDifficulty Level
magazine
ICT CONNECT MAGAZINE8
ICTACT Student Certification Program
According to the NASSCOM-McKinsey report, The
ICT Industry in India could face an employee shortage of 3.5
million by 2020. This is due to the Employability ratio of the
graduates, which is found to be low. (For e.g 10 to 15 percent
of graduates for business services and 26% of engineers for
technology services are employable). This issue is mainly due
to huge skill gap between the industry requirements and
academia output.
ICTACT bridges this gap through structured training
programs for higher education spectrum by associating with
corporate bodies like Cognizant Technology Solutions, Tata
Consultancy Services, Microsoft Corporation, Intel,
Hexaware Technologies, Oracle, National Instruments,
Cadence, etc.
ICTACT has trained around 2700 faculty members
from 650 colleges across the state on the latest technologies.
ICTACT has launched “Students Certification Programs” on
various technologies and tools. The course curricula have
been meticulously designed with the research outputs to meet
the industry requirements. The members of the Board of
Studies are drawn from the leading industry and academia.
Currently, two courses, namely, “Certificate in Web
Application Development using Java Technology” and
“Certificate in Web Application Development using .Net
Technology” have been launched for the students. These
programs have been designed to make the students
understand and use the latest technology effectively. These
courses are delivered with real-time examples and exercises
which would enable the students to learn / write increasingly
sophisticated J2EE / ASP.Net programs.
The course consists of training and hands-on learning
for 60 hours followed by Project work. Students are required
to undergo Project work as the partial fulfillment of the
course, which would be in accordance with the Project
Specifications provided by ICTACT as per the industry
standards.
Students are assessed by ICTACT and the question
pattern would focus on higher order thinking skills (HOTS)
like applications of technology and analysis.
Students profile including their personal details,
academic details and grades scored in the Student
Certification Program will be shared with the industry
through ICTACT Portal.
Key Take-away from the Course
Industry relevant content for students
Pedagogical Tools for the faculty members including
Training materials
Case Studies
Exercises with Solutions
Industry relevant Project Specifications
Assessment
Certification
Certified students profile will be shared with the
industry through ICTACT portal.
magazine
Position : Process Executive Voice / Data
Eligibility : UG/PG degree in Arts, Science, Commerce, Business Administration,
Hotel Management, CS or IT (pass outs from the 2009 or 2010 batch) / Engineering
OR MCA graduate pass outs from the 2008 or 2009 batch / Diploma Holders in the 10+2+3 pattern.
Experience : 0-6 Months
Location : Chennai
Fifth Generation Technologies Private Ltd
Position : Entry Level EngineersEligibility : Preferably B.E Computer Science Engineering /? Engineering Degree in E.C.E & E.E.E will also be consideredLocation : Chennai
Position : Transaction Process Executives / Junior Analysts (Day Shifts)Eligibility : 2009 & 2010 Graduates with minimum 60% marksLocation : Chennai
For more details on the jobs visit & register at
www.ictact.in
Position : Trainee, Lead Process ExecutiveEligibility : 2010 / 2009 Pass outs MBA – Marketing, MA – English Literature, BA – English literature - Good Communication skills and knowledge on ComputersLocation : ChennaiSalary : 2.2 L Per Annum
9ICT CONNECT MAGAZINE
For more details please visit www.ictact.in
JOBS CORNER
Skill Requirement – Spoken Communication
Adarsh R PookatProject Manager
Hexaware Technologies
One of the important gaps found among the campus /
off-campus recruits is lack of proper communication skill.
This is a critical area that needs utmost attention to be given to
the importance of communication, needless to say in IT
industry. Though one may be technically sound, it is the
communication skill that showcases the technical capability.
Being a part of the recruitment panel, it is
disheartening to see that youngsters do not understand the
importance of spoken communication, and are not taking it
serious. This is evident when they participate in
group discussion, attend an interview or write an essay.
Spoken English – A requirement:
Of various types of communication, this article will
concentrate only on spoken communication (English).
The following are some of the common mistakes that
need immediate attention:
Proper grammar
A grammatically correct sentence is very important in
spoken communication. The following are some of the
common examples:
Is / was; has / had; come / came
Wrong: He was coming to me now.
Right : He is coming to me now.
Present : He has ten pencils.
Past : He had ten pencils.
Proper pronunciation
Pronunciation is another area where we need to work
on. The general tendency is to pronounce using native
language.
E.g.
‘Hurt’ is pronounced as ‘huRT’ with stress on R and T.
The ‘R’ is silent.
‘Simple’ is pronounced as ‘simble’
Proper language usage
Wrong Plural / Singular usage:
E.g.
Using the word ‘peoples’ to refer to a group of people.
‘People’ actually refers to a group. Some tend to use ‘staffs’ to
refer to set of office staff as plural. It must be noted that ‘staff ’
itself is plural / singular based on the sentence usage.
Influence of Native language:
E.g.
Wrong : He fast runs.
Right : He runs fast.
Usage of Odd phrases
Examples for antiquated and old words / phrases like,
He is a good / bad fellow.
I want to bring to your kind attention…
Where are you stationed?
These were brought into India by the Imperial British;
some 200 years later even they have forgotten these words
while we continue to use them.
Usage of “Indian-Specific” words (especially to native
speakers)
I had curd-rice with brinjal for lunch.
Is it veg or non-veg?
I come to office by two-wheeler.
These are words we have adopted into English, and
take for granted that everyone knows them. Well, don’t be
surprised, they don’t!
Usage of phrases directly translated from the speaker’
native tongue
What is your good name?
Aditya sir and Narayanan sir are not available.
I will not do this and all…
Just because Hindi or Tamil requires certain respect
phrases or adjectives doesn’t mean its equivalent English
sentence needs to have this as well.
magazine
ICT CONNECT MAGAZINE10
Suggestions for improvement:
The following are some suggestions that every
individual should start early in life:
Converse in English whenever possible.
Read good newspapers, magazines, novels, etc.
Listen to good news channel.
Participate in elocution competition.
Present papers.
Conduct mock group discussion.
Use full and proper sentence in emails, sms whenever
possible.
Ask friends to correct if they find you are going wrong
somewhere.
Also, “don’t be afraid to watch a Hollywood
blockbuster with your friends – the best way to improve
pronunciation is to listen to native speakers”.
Conclusion :
Communication is an important skill that one has to
develop to prove oneself in the IT industry. Very good spoken
English, doubtless to say, gives one a definite lead over others
(not that one needn’t be technically sound!) and helps in career
growth. So it is imperative that everyone take this seriously and
work towards improving the communication.
Adarsh R Pookat is currently working as Project Manager in
Hexaware Technologies. He has over 10 years of experience in Airlines
Practice (Cargo and Passenger Reservations).
A Cup of Tea
magazine
11ICT CONNECT MAGAZINE
Emergence of Rural BPO in Tamil Nadu
The Government of Tamil Nadu, through a wide range
of initiatives has already attracted the IT Industry and in
particular the BPO segment to be firmly entrenched in the
State. However, the BPO industry presence is limited to
Chennai, its surrounding areas and a few select urban
locations such as Madurai and Coimbatore. For a deeper
penetration of the BPO industry in the state, the Government
of Tamil Nadu released a specific policy which would attract
the industry to venture into the rural locations in the state.
The Honourable Chief Minister of Tamil Nadu, Thiru
Dr. M. Karunanidhi released the rural BPO policy on 15th
October 2010. This policy is applicable to rural locations and
is to be identified as a unit that is located at Panchayat level.
The IT department, Government of Tamil Nadu, plays the
role of a facilitator in receiving enquiries from the BPO
industry and simultaneously help to find interested
institutions both educational and otherwise, who would have
the inclination to partner with BPO units. Such institutions
would assist in providing infrastructure such as floor Space,
power, connectivity etc., for hosting such relevant activities
for BPO Units. The business arrangement between the
industry and the infrastructure provider will be on terms
conducive to both and will be negotiated mutually by both the
parties. The educational institutions in particular, will benefit
with such arrangements as the Industry and Academic
interaction will help the students in providing exposure and
experience for entrepreneurship and future careers. It is of
vital importance to remember that globally the presence of
industrial units in close proximity and partnership with
premier academic institutions has led to a boom with regards
to the growth in the industry and economy. In promoting this
Rural BPO Policy, it was necessary to inculcate a different
promotional style that would ensure participation of BPO
industry and academia. ICT Academy of Tamil Nadu is a
special project vehicle that has helped to strengthen Academia
– Industry - Government efforts that are of concern to all the
stakeholders. ICT Academy is an educational service provider
that caters to the needs of the Higher Education sector in the
state of Tamil Nadu. ICT Academy would monitor and
facilitate the rural BPO initiatives in association with ELCOT.
During the policy launch, in the first phase, eight
educational institutions signed MoU with five BPO
Companies to set up rural BPO facilities in their campus. The
Educational institutions include VMKV Engineering College
Salem, KSR College of Engineering Tiruchengode, Jayam
Engineering College Dharmapuri, Muthayammal
Engineering College Rasipuram, Sona College of Technology
Salem, Velammal Engineering College Madurai, Happy Valley
Institute of Management Coimbatore and the GRG
Memorial Tribal Higher Secondary School Masinagudi, The
Nilgiris. The BPO Companies include SoftPro iTechnology
Mrs. Nandhini Rangaswamy, Founder Trustee of GRG Memorial Tribal Higher Secondary School - Masinagudi, and Mr. V. Chandrashekar CIO of Standard Chartered Bank exchanging MoU’s on setting up rural BPO in Nilgiri District, inthe presence of Honorable Chief Minister of Tamil Nadu.
Dr. Kanagaraj, Founder, Happy Valley Institute of Management - Coimbatore and Mr. Karthikeyan MD of GKM Management Services Pvt Ltd exchanging MoU’s on setting up rural BPO in Coimbatore District, in the presence of HonorableChief Minister of Tamil Nadu.
Mr. P. S. Raghavan CEO of Sundram BPO Services and Mr. Muthuramalingam Chairman, Velammal College of Engineering exchanging the MoU onsetting up rural BPO.
- MaduraiMr. Valliappa, Chairman of Sona College of Technology - Salem and Mr. M. Krishnan Sr. VP of Vee Technologies exchanging MoU’s on setting up rural BPO in Salem District, in the presence of Honorable Chief Minister of Tamil Nadu.
Mr. Arun Chinnaraju Founder of Softpro iTechnology Partners exchanging MoU with Mrs. Parvathi Ramesh, Trustee of Jayam College of Engineering & Technology - Dharmapuri and Dr. Madheshwaran, Prinicipal MuthyammalEngineering College -Rasipuram.
Mr. Arun Chinnaraju Founder of Softpro iTechnology Partners exchanging MoU with Dr. Nagappan Principal, VMKV Engineering College - Salem and Mr. Srinivasan, Seceratary, KSR Group of Colleges - Tiruchengodu on setting up ofrural BPO
magazine
13ICT CONNECT MAGAZINE
Evolving Best Practices in Engaging
Colleges and Students
Harpreet S. GroverCo-Founder and CEO
Cocubes.com
“Where internet has not penetrated, mobile has.
Surprisingly in our 2 year relationships with over 1000
colleges, more than 90% students had either and 70% had
both,” says Harpreet Grover, Co-founder & CEO,
Cocubes.com
A decade ago when a friend used to go to US, we would
end up catching up again only after a year. Today when our
friends go abroad; we keep in touch through chats, share
photographs, talk using Skype or just read updates on social
networking sites. We stay in touch!
Similarly, when I joined college long time back, our
hostel had 3 computers and we used an STD booth to call
home. By the time we graduated, it was difficult to find 3
rooms without computers and everyone had a mobile. Times
have changed. People (particularly students and colleges) now
have access to internet and mobile, and more importantly use
it day in and day out.
This fundamental change has to be the backbone on
which the newer initiatives being taken by the government and
other bodies can achieve its objectives at scale.
Let us Take a Look at the Disconnect
While this is a fundamental shift that has taken place,
engagement methodologies with college and students have
remained the same and are now in disconnect with the current
crop of youth. In the last few years of growth one has not had
the time to reflect and change. However, the downturn came
as an opportunity in disguise to address this disconnect.
Most firms in India still send posters and senior management
to colleges to share presentations during a 15 minute slot.
While some large firms invested heavily in building more
connection points by signing MoU’s, these relationships have
had minor impact in their measurable ability to engage college
and students.
Some Firms have been Taking the Lead
Wells Fargo India’s Fuelling Assertive College Talent
(FACT) program, started in 2008 as an innovative technology
based campus recruitment process. They did not visit campus
but selected campuses, but had a specially designed web-based
quiz contest which tested the applicants’ awareness of Wells
Fargo in the first round.
A TCS youth survey done across 12 Indian cities with
14,000 candidates says why go visit a college to recruit and
spend money when one can hire employees by the click of a
mouse. S Ramadorai of TCS, said, “We have to completely
digitize hiring practices, not from campuses anymore but
through interactions on the web.”
Social networking sites have been touted as a place to
do the same. According to a survey by hiring solutions
provider TMP Worldwide and Targetjobs, 70 per cent of
surveyed students did not want businesses to use sites like
Twitter or Face book to ‘sell’ jobs to them as they believe
“employers should not exploit social media for their own
benefit. The report, which was based on the study of
penultimate and final year students, also found that 42 per cent
of students do think social media is the ideal platform to
communicate employer brand. So there is a need that still
needs to be addressed.
At CoCubes.com we have been working with
Cognizant to engage students through the placement office
(www.cocubes.com/cognizant)
What is required to deliver sustainable value at scale?
While multiple models have been evolved by
companies, I believe that for any of these models to work on
scale and deliver sustainable value, two conditions would need
to be met. Firstly, the only way to work in promoting learning,
career guidance, and skill development to the student is
through the placement office and not directly with an
individual student. Secondly, given the internet/mobile access
to student technology has to form the backbone of the
initiative. Thirdly, the message that is to be communicated has
to be consistent and needs to have metrics in place to measure
impact of your initiative. Building such a metric is a onetime
activity which goes a long way to make sure our efforts are in
the right direction. A simple example being that if we spend 10
minutes on posting an article on ‘career guidance’ and are able
to measure the exact number of students across multiple
colleges who spent time on reading the article, we can have
an assessment of the impact that is being created.
magazine
15ICT CONNECT MAGAZINE
Conclusion
A technology centered strategy to engage colleges and the youth within them will not only help reduce operational cost by
over 30% but also increase engagement and branding to unprecedented levels. This approach has to be through the ecosystem
that has thrived for years: that is through the college. All these factors combined together would help support the growth of the
ecosystem and help us scale for growth in the upturn economy.
Harpreet is the Co-Founder & CEO of Cocubes.com envisions bringing a paradigm shift in the Indian campus recruitment scenario by using
technology to drive efficiency. He has previously worked with Inductis, a management consulting firm, advising Fortune 500 clients in the financial services
domain by using data analytics. Harpreet graduated from IIT Bombay with a dual degree. Beyond work he is a published photographer, poet and an
amateur mountaineer
Entry Level Training [C, Data Structures, C++, OOPS, SE, OS, DBMS etc.]
Technology Training [ .NET, JAVA, LAMP, SQL, TESTING and More]
BPO Training Program [ Voice & Accent , Non Voice, Tech Support]
Language and Soft Skill Training
magazine
ICT CONNECT MAGAZINE16
Expertise in
Writing High Performance .NET Code
Milind P HanchinmaniSr. Application Engineer
Intel
Use proper synchronization primitives: There are
multiple synchronization primitives that are provided by
.NET Framework. These vary from fewer features (very fast)
to many features (very slow). It is important to use this
correctly to get optimal performance. Synchoronization
primitives can be defined as:
a. Monitor or lock : Provides a mechanism that
synchronizes access to objects
b. Interlocked: Provides atomic access to variables that
are shared by multiple threads.
For example : for any atomic ++ or –- operations consider
using Interlocked class
c. Mutex: Synchronization primitives that can be used
fo r in t e r p roces s s ynchron iza t ion . T hey a re
considerably slower; use it when you absolutely need it.
d. Reader Writer Lock : Lock that supports single
writer and multiple readers. If you have a scenario where you
read your data frequently but update only once in a while,
consider using this as it supports multiple readers.
e. Reader Writer Lock Slim : Similar to Reader Writer
Lock but simplified rules for recursion and for upgrading and
downgrading lock state. It also avoids many cases of potential
deadlock and has improved performance. Using this is
recommended.
f. Semaphore : Limits # of threads that can access a
resource or pool of resources concurrently. Use it only when
you need to control pool of resources.
e) Never use Thread. Suspend and Thread. Resume to
synchronize activities. The suspend and resume operation
doesn’t happen immediately as CLR has to make sure the
execution control is in safe point. This can lead to race
conditions or deadlock(1)
f) Never use Thread. Abort to abort another thread:
(1)
g) Don’t lock “this” and “type” of an object: Locking
this pointer is a bad idea as this can have correctness issue as it
is visible. Similarly, locking type of an object is a bad idea as
these objects are the same across application domains and so
thus we lock all instances of objects across app domains in a
process.
//Wrong //Correct
lock (this) { public class foo {
do something ; Object sync_obj = new
Object();
} lock(sync_obj) {
Do something
}
//Wrong //Correct
lock(typeof(foo)) public class foo {
{ private static Object
sync_obj = new Object();
Do something; lock (sync_obj) {
Do something;
} }
h) Consider using [ThreadStatic] to eliminate or reduce
lock contention: If you can have a data as part of thread local
storage (per thread) rather than sharing and after the threads
have completed the jobs, you can process the combined effect.
Consider using this to reduce lock contention.
I) Acquire and release lock in the same order:
Otherwise you can cause deadlock condition
Thread1 Thread2
lock(obj_A) { lock(obj_B) {
lock(obj_B) { lock(obj_A) {
Do something; Do something ;
} }
}
j) All collections in .NET are not thread safe. Some
concurrently. Need to call “Synchronized” method for
making it thread safe for updates
ArrayList myAr = new ArrayList();
ArrayList mySyncAr = ArrayList.Synchronized
(myAr); //use mySyncAr
k) Enumerating through collections is also “not”
thread safe even though it is synchronized. If another thread
modifiesthe underlying collection then an exception will be
thrown.
Automatic Memory Management (Garbage Collection)
Automatic memory management, aka GC is one of the
most important features provided by .NET Framework. GC
manages the allocation and reclaiming of memory in your
application. When ever you call “new” to create a new object,
GC will allocate memory from managed heap as long as space
is available and once it runs out of memory it triggers
Continued from the pervious issue...
magazine
17ICT CONNECT MAGAZINE
collection, reclaim memory so that it can start allocating again.
We will go into some detail about GC algorithms, how they
work, different GC flavors, and how you can write a GC
friendly code.
.NET GC is a generational and mark and compact
algorithm. We have 3 generations (Gen0, 1 and 2). .NET GC
assumes that most of the objects you create die young, so only
a part of your entire manage help can be collected (which is
much faster) than collecting the entire manage heap. GC first
marks the root objects (to find out those who are alive) and
then compacts the heap (moving all live objects to a part of the
heap which forms older generation(s). Always, allocations
happen in Gen0 heap. The initial gen0 heap is some fraction
of the last level cache. The idea is to have gen0 fit in the cache
to avoid cache misses.
.NET GC Flavors:
Workstation GC (WKS)
Server GC (SVR)
Note : Selecting appropriate GC flavor is essential for
optimal performance of your application
Workstation (WKS) GC: WKS GC has 2 variants.
Concurrent GC (on) which is the default and can be turned
off. Concurrent GC (on) will have less pause time, increasing
the UI responsiveness. GC stops the application threads for a
shorter duration when absolutely necessary. If you have a
throughput kind of application (console app non UI) then
turning off concurrent GC might get you better performance.
In your application configuration file (ex: foo.exe.config), you
can add following [2]
<configuration>
<runtime>
<gcConcurrent enabled="false"/>
</runtime>
</configuration>
WKS GC has 1 heap per process and it has 1 GC thread
per process. WKS GC is the default even on multiprocessor
systems for any non ASP.NET application. ASP.NET
automatically chooses SVR GC if you are on a multi processor
system.
Server (SVR) GC : As the name suggests, SVR GC is
optimized for server based applications (better scalability). It
has 1 GC heap per Processor and 1 GC thread per 1 GC heap.
For example, if you are on a 4 processor system, you will have
4 heaps and 4 GC threads operating on each of those heaps. A
process can create objects in multiple heaps (for load
balancing the allocation on heaps) and as mentioned above it
is not the default. To enable Server GC, add the following in
application configuration files.
<configuration> [2]
<runtime>
<gcServer enabled="true"/>
</runtime>
</configuration>
Tips for selecting appropriate GC :
For all server throughput related applications,
consider selecting Server GC
ASP.NET web applications on >1 proc machine
automatically selects SVR GC. However if you want to run
web garden scenario, then consider using WKS GC as the
memory foot print might be really high as a result of multiple
w3wp processes. SVR GC assumes it is the king and so will try
to grab as many resources as possible. So if you have multiple
processes running SVR GC, there can be degradation in
performance and also an increase usage of system resources.
In order to enable ASP.NET using WKS GC, add the
following configuration to the Aspnet.config file. This is in the
same directory as Aspnet_isapi.dll.
<configuration>
<runtime>
<gcServer enabled="false"/>
<gcConcurrent enabled="false"/>
</runtime>
</configuration>
If you have a client – UI application which requires UI
responsiveness, consider selecting WKS GC with Concurrent
enabled
If you have Console application (no UI but throughput
app) then consider turning off concurrent GC for better
performance.
If you want lesser resource utilization in a system
(memory etc) then consider using WKS GC.
Note : When you ask for Server GC on a UP machine, you get
WKS GC with concurrent off. CLR assumes that since you are
asking SVR GC, you are more interested in throughput than
UI responsiveness and so automatically turn off concurrent
GC.
Tips for writing GC Friendly code :
a. Never Call GC.Collect from your code: .NET GC is
magazine
ICT CONNECT MAGAZINE18
a dynamically tuning GC. At every collection it collects
information such as survivor rate, and tunes its internal GC
tuning parameters so the next GC is more effective than its
b. Create objects that die young: .NET GC is
optimized on the premises that most of objects allocated
are temporary and die young so they can be collected in
gen0 which is cheap. (2)
c. Don’t allocate too many objects: One little line of
code could trigger a lot of allocations. Most of the time, it is an
allocation that triggers a collection. Keep an eye on what you
allocate particularly in loops (2)
d. Don’t allocate too many almost long-life objects:
Objects that are neither temporary nor long lived end up in
Gen2 and die. This puts pressure on gen2 heap and you may
end up doing full collections which is expensive.(2)
e. Don’t allocate too many temporary large objects:
Large objects (>85K size) are allocated on a separate large
objects heap which is never compacted (it is expensive to
move many large objects during compaction). This could put
pressure on large object heap, resulting in your doing full
collections, also expensive.(2)
f. Dispose and Finalize: Implement these only when
needed. Make sure you call these when an exception occurs (to
avoid a memory leak). Also make sure you implement finalize
only when you have an un managed resource and keep the
code very simple. (2)
previous GC. Unlike Java, .NET GC doesn’t expose many
tuning parameters for the developer. So when you call
GC.Collect in your code, it collects those parameters. Since
you induced GC the next GC will not be as productive. Also, if
GC.Collect is executing not just once but many times (lets say
before you start expensive time consuming work and so you
need more memory) then GC will not be productive at all. But
there is an exception. If you know that you opened a custom
form and made some configuration changes and you know
that you are not going to need that form any time sooner, you
can go ahead and call GC.Collect() so all the long live objects
in Gen2 are now dead. It is recommended to use the following
code (starting from Orcas build). Here even though GC.
Collect is called on gen2, GC will decide if it is helpful if it
collects (2nd parameter – Optimized). This is not available in
VS2005 and older versions.
using System;
class Program
{
static void Main(String[] args) {
GC.Collect(2,
GCCollectionMode.Optimized);
}
}
Tips for improving manage code performance :
We covered threading and GC and now we cover the general VM, code generation and basic ASP.NET and ADO.NET tipsfor writing better code
a. Avoid unnecessary boxing [1]int i = 123;object o = i; (Implicit boxing) //box keywordint j = (int)o; //unbox keywordWhen ever we box, a new object is created on the
managed heap and the value is copied in it. If we are doing this frequently, then we will create lot of objects (affect GC) andalso the extra code we execute for boxing and unboxing.
b. Consider using strong typed arrays or generics(Visual Studio 2005 onwards)
Foo myFoo = new Foo();myArrayList.Add(myFoo);Foo myFoo = (Foo) myArrayList[i]; //castclass
keywordCollection classes take generic “object” as a parameter.
Type casting is required when retrieving objects(your type) from the collection classes. This requires an expensive run time type check by looking at method table of that object. If your object is inherited then this may require traversing one level up which is again expensive. You can avoid this by using generics (similar to C++ template) as shown below which doesn’t require run time type check as it is known at thecompile time.
List<Foo> myList = new List<Foo>();Foo myfoo = myList[i]; //no check reqdc. Throw fewer exceptions: Throwing exceptions can
be expensive as stalk walk is required etc for managing the frames. Don’t use exceptions as a control flow in yourapplication
}d. Use StringBuilder for complex string manipulation:
Whenever you modify a string (such as append etc), it will create a new string leaving the first one to be collected. Consider using a StringBuilder if you have > 5-7 string
manipulations.
magazine
19ICT CONNECT MAGAZINE
e. Don’t use too many Reflection API’s: Reflection
API’s depend on the metadata embedded in assemblies. Thus
parsing and searching this information is very expensive.
f. Don’t make functions unnecessarily virtual or
synchronized: JIT might disable some optimizations and so
the generated code might not be optimal
g. Don’t write big functions: JIT might disable
optimizations for faster compile (JIT) time.
h. Avoid calling small functions inside loop: Consider
inlining yourself (incase JIT has not done it). Any mistake in
the loop is magnified.
i. Prefer arrays to collections unless you need that
additional functionality that collection classes provide [1]
j. Use jagged arrays instead of multi dimensional arrays
since the former has some special MSIL optimizations for
faster array access [1]
k. Smaller working set produces better performance
and so consider using ngen for shared pages
l. Don’t make too many Pinvoke calls (chatty calls) and
do less work in unmanaged code: The overhead of transitions
(managed to unmanaged and back) can negate performance
speedup or even hurt.
Ngen : Ngen.exe (shipped with CLR) invokes JIT compiler
on MSIL to create native code and stores it in the disk. Once
the native image is created, runtime uses this image
automatically each times it runs the assembly. Using native
image will eliminate compiling on the fly using JIT compiler at
runtime thus reducing application startup time.
Ngen.exe can help improving application performance by,
Reducing the application startup time – Consider using
ngen.exe for improving startup time of your winform based
application. Always measure with and without ngening of
your application.
By reducing the total memory consumed by application
that use shared assemblies (which are loaded in to different
application domains)
Interop : When you build applications in managed code,
some times it is necessary to call unmanaged libraries such as
calling a COM component. In some cases, you want to use
unmanaged code for some performance related reasons as
well (such as calling 3rd party highly optimized libraries). CLR
provides several ways to do this.
Using Pinvoke (Platform Invoke) – Allows calling of
Windows DLL’s, Win32 API’s or custom dll’s from managed
code (1)
Using MC++ (IJW) – For users for MC++ to call
standard DLL’s (1)
COM Interop – Manage languages to call COM
components through COM interfaces. (1)
magazine
To be Continued in the next Edition
CALL FOR PAPERSICT Academy of Tamil Nadu publishes peer-reviewed international journals. With the objective of creating Indian-based
Journals of International quality and to build up local research content, ICTACT upholds a quality platform and welcomes Scientists,
Researchers, Academicians and Engineers to submit their original research papers which is neither published nor currently under
review by other journals or conferences.
Papers should emphasize original results relating to the theory and/or applications of the respective areas. Review articles,
focusing on multidisciplinary views are also welcome. The Journal will highlight the continued growth and new challenges in both basic
research and application development. ICTACT publishes the following peer-reviewed International Journals on Quarterly basis
ICTACT JOURNAL ON COMMUNICATION TECHNOLOGY (IJCT)
ICTACT JOURNAL ON SOFT COMPUTING (IJSC)
ICTACT JOURNAL ON IMAGE AND VIDEO PROCESSING (IJIVP
ICTACT Journals can also be subscribed at highly subsidized cost for the benefit of the Institutions and Researchers.
Subscription Details :
Subscriptions are payable in advance by Demand Draft in favor of “ICT Academy of Tamil Nadu”, payable at Chennai.
Note: There is no Publication cost for the authors
For further details, visit us at www.ictact.in/journal.htm