Managed Service Provider

April 30th, 2013

Its 2′O’ clock early morning, just struggling to get my smartphone to see any SMS alerts of server down. Oh gosh!! the worst has happened, my server has been down for more than one hour. It’s going to get my business affected. All my Asian customers won’t be able to reach my site and I’m losing my money every second. Now relax hold on a sec, I’d like to ask whether you reflect this person? If so its high time you start thinking of Managed Services by a professional company.

Managed Services is not limited to single site owner, it can be server owner, hosting company, an enterprise or an organization. The benefits they are getting out of managed service is but the same.

1) Pro-Active support for your apps and site

2) The complex architecture (HA, caching, CDN etc) of the apps running is no longer a head-ache

3) You server admin is not the last word in your IT Department anymore.

4) Upgrade of the technologies is not bothersome

5) 24/7 monitoring and support helps in business continuity

6) Greater feedback and customer satisfaction for the service you are offering

7) Low OPEX and less Security Risks

8) Uptodate with the technologies so that your apps won’t become obsolete over a period of time

9) Flexible contracts and you are not tied up with any particular vendor

10) A sound sleep and plenty of time to spend with your family.

If all the above can be provided by a IT Infrastructure management company then what are you waiting for. Sign up with an offshore team like SparkSupport Infotech and see how it’s going to change your life and business.

VN:F [1.9.6_1107]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.6_1107]
Rating: 0 (from 0 votes)

SPARKSUPPORT STARTS ITS NEW NOC CENTER AT INFOPARK

September 29th, 2012

Kochi, September 27:

SparkSupport Infotech Pvt Ltd., one of the fastest growing IT services provider company, has started its new NOC facility in Leela- Phase2 (SEZ) at Infopark here.

Honorable MLA Hibi Eden inaugurating the office.

Honorable MLA Hibi Eden inaugurating the office.

The new world class facility was inaugurated by honorable MLA Sri. Hibi Eden. With this expansion, SparkSupport now has a state of art infrastructure spread over 3500 Sq.ft and has the capabilities to handle technical support of all levels & complexities. The centre was previously located in D& N Space, Kalamassery.

Front Office!

World Class Work Space

Announcing the new center, Mr. Prem Sai, CEO, SparkSupport said “We are delighted to be opening a new NOC centre at Infopark. This world class facility would open opportunities for us to work with greater set of customers. In addition, it adds more capabilities to our offerings making us an ultimate IT solutions provider for clients”.

Discussion Room 1

Discussion Room 2

 

According to Mr Shijil Shanmughan, Chief Technical Officer, the expansion to the new facility is a part of company’s strategy to upgrade its current infrastructure and expertise to meet global demands & world class service delivery.

SparkSupport is on a constant growth path especially in the Technical Support and Infrastructure Management Space. The current expansion is a result of our strategic decision to target the growing overseas Outsourcing market. Our technology professionals will provide profound & high end technical support to our clients.

The Leela Infopark already houses some renowned Software companies. SparkSupport Infotech provides end to end IT Solutions to organizations around the globe. The company is focussed on Web Applications, Cloud Computing, IT Infrastructure Management , etc. SparkSupport Infotech Pvt Ltd is planning to double its talent pool in the areas of Software Development, Cloud Computing & IT Infrastructure Management. This will be done by the end of the year 2012.

ABOUT SPARKSUPPORT:

SparkSupport is an agile organization with an impeccable record for deploying and managing end-to-end IT services. Being pioneers in managed IT services and Web Application Development, we have helped SME’s to leverage their business by making use of prompt and viable IT solutions. Leveraging our strong expertise will allow you to focus on your core business while we ensure the quality of your IT systems and operations. We provide a broad spectrum of quality IT Services that focus on cost effectiveness and strategic delivery. Our solutions addresses your unique business needs, allowing you to quickly implement scale as your business grows and technology evolves.

VN:F [1.9.6_1107]
Rating: 6.8/10 (4 votes cast)
VN:F [1.9.6_1107]
Rating: +4 (from 6 votes)

How to install Kaltura in CentOS

July 2nd, 2012

Kaltura is the world’s first Open Source Online Video Platform, providing both enterprise level commercial software and services, fully supported and maintained by Kaltura, as well as free open-source community supported solutions, for video publishing, management, syndication and monetization.

Kaltura offering different deployment options according to one’s necessity. The various deployment options are as follows as

  • Kaltura SaaS Edition
  • Kaltura On-Prem Edition
  • Kaltura Community Edition
  • Kaltura Cloud Edition

Kaltura provides different services like Streaming, Transcoding, Advertising, GeoIP, Syndication, Distribution, Security, Monitoring and more. You can easily integrate Kaltura with different Content Management Systems and Learning Management Systems like WordPress, Joomla, Drupal, Moodle, Sakai, Blackboard, Microsoft Sharepoint.

Now let me explain about how to install kaltura in CentOS Here i chose community edition for installtion. Before going to install Kaltura CE 5 you need to satisfy the prerequisites of Hardware and Software Requirements.

Prerequisites

Hardware Specifications

The Hardware requirements should vary according to the expected usage estimations. The minimum requirements to install Kaltura is as follow as

  • 1 GB RAM
  • 2GHz + Dual Core Processor (preferably Multi-Core Intel based)
  • 5 GB Free Hard disk Space [ It depends upon the usage, but 5 GB is enough for the installation ]

Software Specifications

  • Web Server ( Apache )
  • Database Server ( MySQL )
  • Mail Server ( SMTP / Postfix )
  • Application Packages ( Java, PHP )
  • Monitoring ( Xymon – This is optional)

Before going to start installation, just update your repository

yum update

You need to install the following basic required packages in order to continue the installation

yum install vim gcc make rsync

Apache Server Installation

yum install httpd httpd-devel

Open the apache configuration file and enable the modules and the configuration file should be like this

vim /etc/httpd/conf/httpd.conf
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule headers_module modules/mod_headers.so
LoadModule expires_module modules/mod_expires.so
LoadModule filter_module modules/mod_filter.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule env_module modules/mod_env.so
LoadModule proxy_module modules/mod_proxy.so
save and quit the file

You need to enable file_cache module, But unfortunately there is no apache file_cache package in the CentOS default repository. So you need to compile it from source

Download the same version of apache source code

wget http://olex.openlogic.com/content/openlogic/apache/2.2.15/openlogic-apache-2.2.15-all-src-1.zip
unzip openlogic-apache-2.2.15-all-src-1.zip
cd apache-2.2.15-src/modules/cache/
apxs -i -a -c mod_file_cache.c

It will automatically enable the file_cache module in your httpd.conf

cat /etc/httpd/conf/httpd.conf

LoadModule file_cache_module  /usr/lib64/httpd/modules/mod_file_cache.so

Now start the apache server by using the init scripts

/etc/init.d/httpd start

PHP Installation

Kaltura requires some additional php extensions, so you need to install those extensions too. Run the following command  to install php, php-cli and the additional extensions

yum install php php-cli php-devel php-gd php-mbstring php-xml php-pecl-memcache.x86_64 php-pecl-memcached.x86_64 php-mysql php-pecl-apc php-bcmath

Its always wise to create a phpinfo file to check the LAMP Server information

vim /var/www/html/phpinfo.php
<?php
phpinfo();
?>

Now open the /etc/php.ini file and enable the request_option with the value ” CGP ”

vim /etc/php.ini
request_order = "CGP"

Change the date.timezone values to your timezone value

date.timezone = Asia/Delhi
date.default_latitude = 28.40
date.default_longitude = 77.13

Note : All the date.timezone information are avail at http://php.net/manual/en/datetime.configuration.php . Please check it for your timezone values

MySQL Installation

yum install mysql mysql-server mysql-devel

Set MySQL password

/usr/bin/mysqladmin -u root password 'kaltura'

You can login mysql by using the following command

mysql -u root -p

You need to set mysql default character to UTF-8 and also add the following lines in it

lower_case_table_names = 1
thread_stack = 262144
open_files_limit = 20000

Open my.cnf file

vim /etc/my.cnf
[mysqld]
datadir=/var/lib/
mysqlsocket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
character-set-server = utf8
lower_case_table_names = 1
thread_stack = 262144
open_files_limit = 20000
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

[client]

default-character-set = utf8
save and quit the file.

Curl Installation

Kaltura requires curl, run the following command to install curl and its development packages

yum install libcurl-devel perl-WWW-Curl python-pycurl curl.x86_64 libcurl

Memcached Installation

yum install memcached libmemcached libmemcached-devel php-pecl-memcache python-memcached.noarch perl-Cache-Memcached.noarch

ImageMagick Installation

yum install ImageMagick-c++ ImageMagick-c++-devel ImageMagick-devel ImageMagick-perl ImageMagick autotrace

Kaltura requires some additional 32 bit packages in 64 bit host

yum install zlib.i686 glibc.i686 ncurses-libs freetype bzip2-libs

Java Runtime Environment Installation

wget http://download.oracle.com/otn-pub/java/jdk/7u5-b05/jre-7u5-linux-x64.rpm?AuthParam=1341060304_96e260b78fd3b2a30f05f2353152170d
mv jre-7u5-linux-x64.rpm\?AuthParam\=1341060304_96e260b78fd3b2a30f05f2353152170d jre-7u5-linux-x64.rpm
rpm -ivh jre-7u5-linux-x64.rpm

Pentaho data integration

The pentaho data integration package (version 3.2) is required for the analytics module. It should be downloaded and extracted to the/usr/local/pentaho/pdi directory

Create the /usr/local/pentaho/ directory.

mkdir /usr/local/pentaho/

Change to the/usr/local/pentaho/directory.

cd /usr/local/pentaho/

Download the pentaho data-integration package.

wget http://sourceforge.net/projects/pentaho/files/Data%20Integration/3.2.0-stable/pdi-ce-3.2.0-stable.tar.gz/download

Extract the pentaho data-integration package.

tar xvfz pdi-ce-3.2.0-stable.tar.gz -C /usr/local/pentaho

Rename the data-integration root directory into pdi.

mv data-integration pdi

Mail Server

Either you can install postfix or sendmail

yum install postfix

Xymon – Monitoring Tool

Download Xymon from sourceforge

wget http://sourceforge.net/projects/xymon/files/latest/download

Xymon requires rrdtools and pcre. So install those packages before to proceed

yum install rrdtool rrdtool-devel rrdtool-tcl rrdtool-ruby rrdtool-python rrdtool-php rrdtool-perl pcre pcre-static pcre-devel mingw32-pcre.noarch

After completing this installation start the xymon installation. You can install Xymon by simple steps

./configure
make
make install

During the installation it will prompt you many queries, give the proper answer else the installation process will exit and dont forget to disable the selinux

Disable SELinux

vim /etc/sysconfig/selinux
selinux = disabled

Now fireup your browser to www.kaltura.org and download Kaltura CE 5 Eagle

wget http://www.kaltura.org/releases/kalturaCE/29044
tar -xzvf kalturaCE_v5.0.0.tgz
cd kalturaCE_v5.0.0

Run the php installation scripts

php install.php

Thank you for installing Kaltura Video Platform – Community Edition
In order to improve Kaltura Community Edition, we would like your permission to send system data to Kaltura.This information will be used exclusively for improving our software and our service quality. I agree (Y/n)> y

If you wish, please provide your email address so that we can offer you future assistance (leave empty to pass)> mailbox@dummyurl.com

Please provide the following information:

The following apachectl script has been detected: /usr/sbin/apachectl. Do you want to use this script to run your Kaltura application? Leave empty to use or provide a pathname to an alternative apachectl script on your server.> y

The following PHP binary has been detected: /usr/bin/php. Do you want to use this script to run your Kaltura application? Leave empty to use or provide a pathname to an alternative PHP binary on your server.> y

Full target directory path for Kaltura application (leave empty for /opt/kaltura)>

Please enter the domain name/virtual hostname that will be used for the Kaltura server (without http://)> newkaltura.info

Your primary system administrator email address> mailbox@dummyurl.com

The password you want to set for your primary administrator> kaltura

Database host (leave empty for ‘localhost’)>

Database port (leave empty for ’3306′)>

Database username (with create & write privileges)> root

Database password (leave empty for no password)> kaltura

The URL to your xymon/hobbit monitoring location. Xymon is an optional installation. Leave empty to set manually laterExamples:http://www.xymondomain.com/xymon/http://www.xymondomain.com/hobbit/> http://abcdnewkaltura.info

Verifing prerequisites

Checking for leftovers from a previous installation

Installation is now ready to begin. Start installation now? (Y/n)> y

Copying application files to /opt/kalturacurrent working dir is /usr/local/src/kalturaCE_v5.0.0

Copying binaries for linux 64bitReplacing configuration tokens in files

Changing permissions of directories and files

Creating and initializing ‘kaltura’ database

Creating and initializing ‘kaltura_sphinx_log’ database

Creating data warehouse

Creating Dynamic Enums

Configure sphinx

Populate sphinx tables

Changing permissions of directories and files

Creating system symbolic links

Deploying uiconfs in order to configure the application

Creating the uninstaller

Running the generate script

Running the batch manager

Running the sphinx search deamon

Executing sphinx dameon

Executing in background nohup /opt/kaltura/app/plugins/sphinx_search/scripts/watch.daemon.onprem.sh

Executing in background chkconfig sphinx_watch.sh on

Changing permissions of directories and files

postdrop: warning: unable to look up public/pickup: No such file or directory

Post installation email cannot be sent

Installation Completed Successfully.

Your Kaltura Admin Console credentials:

System Admin user: mailbox@dummyurl.com

System Admin password: kaltura

Please keep this information for future use.

To start using Kaltura, please complete the following steps:

1. Add the following line to your /etc/hosts file: 127.0.0.1 newkaltura.info

2. Add the following line to your Apache configurations file (Usually called httpd.conf or apache2.conf): Include /opt/kaltura/app/configurations/apache/my_kaltura.conf

3. Restart apache

4. Browse to your Kaltura start page at: http://newkaltura.info/start

Open your httpd.conf file and add the following line in the appropriate section and restart the apache server

Include /opt/kaltura/app/configurations/apache/my_kaltura.conf

Restart Apache server

/etc/init.d/httpd restart

Now fireup your browser with http://newkaltura.info you will get Kaltura page in your screen as shown below

Kaltura

Happy Streaming with Kaltura :)

VN:F [1.9.6_1107]
Rating: 6.1/10 (12 votes cast)
VN:F [1.9.6_1107]
Rating: +4 (from 4 votes)

Kaltura- An Online Video Solution Platform

June 30th, 2012

Kaltura is the world’s first Open Source Online Video Platform, providing both enterprise level commercial software and services, fully supported and maintained by Kaltura, as well as free open-source community supported solutions, for video publishing, management, syndication and monetization.

Kaltura offering different deployment options according to one’s necessity. The various deployment options are as follows as

  • Kaltura SaaS Edition
  • Kaltura On-Prem Edition
  • Kaltura Community Edition
  • Kaltura Cloud Edition

Kaltura provides different services like Streaming, Transcoding, Advertising, GeoIP, Syndication, Distribution, Security, Monitoring and more. You can easily integrate Kaltura with different Content Management Systems and Learning Management Systems like WordPress, Joomla, Drupal, Moodle, Sakai, Blackboard, Microsoft Sharepoint.

You can install it on your own host and the installation guide is here.

VN:F [1.9.6_1107]
Rating: 7.0/10 (6 votes cast)
VN:F [1.9.6_1107]
Rating: +1 (from 1 vote)

RAID Technology

April 26th, 2012

RAID (Redundant Array of Independent Disks)

Nowadays,several storage virtualization technologies are in use in order to enable better functionality and more advanced features within the storage system. RAID is such a powerful storage virtualization technology defined by David Patterson,Garth A Gibson,and Randy Katz at University of California,Berkeley in 1987.

This blog will make you walk through the various aspects of RAID.

RAID Defined

RAID is the acronym for “Redundant Array of Independent Disks”. RAID combines multiple small, independent disk drives into a single logical unit .This will yield performance exceeding that of one large, independent drive. Such logical units are commonly known as RAID arrays which appear to the computer as a single virtual drive.All the hard disks in RAID array will be accessed in parallel.

Why do we use RAID?

The need for RAID can be described in two points given below:

1,Overall increase in I/O performance: Array of disks accessed in parallel will give more data throughput than a single disk.

2,Provides data redundancy: Provides fault-tolerance by redundantly storing information in various ways.

RAID Implementations

There are two forms of implementation for RAID, hardware and software.

Software RAID:

Software RAID is part of OS,which works on partition level. It runs on the server’s CPU and is directly dependent on server CPU performance and load. It is more suitable for RAID 0 and RAID 1 setup.Its a low cost solution which makes it a perfect buddy for home and small business users. Since it occupies the host system memory and CPU cycles ,it may result in the degradation of server performance,which makes it least recommended for implementing higher order RAID levels which uses parity functions. Another drawback is that It does not support advanced RAID features like Hot Swapping(process of replacing the faulty hard disk without shutting down the server).

Hardware RAID:

It uses dedicated hardware RAID controller to manage the RAID array. Since It runs on Raid controllers CPU,there won’t be any overhead(CPU ,RAM etc). Host CPU can execute applications while the array adapter’s processor simultaneously executes array functions. Hardware RAID controllers interface with the system and hard drives through SCSI or IDE/ATA. RAID controllers can either be integrated with the system motherboard itself(Bus-Based or Controller Card Hardware RAID) or it can be an external dedicated hardware solution(Intelligent, External RAID Controller). Since it provides the highest performance possible,it can be used for mission critical applications.

RAID Levels:

Raid can be classified into six levels based on how the Raid Controller distribute the data in virtual hard disk to the physical disks. Six RAID levels are RAID-0 to RAID-5. Each RAID levels has different disk fault tolerance and trade-offs in features and performance. Among the different RAID levels,only RAID 0, 1, 3 and 5 are commonly used.
Apart from the above mentioned levels,certain combinations like RAID 10,RAID 01 etc are also possible.

RAID-0


Figure 1   RAID- 0 layout

Technique(s) used: Block Level Striping.

Explanation: In RAID 0,the data is broken into block sized units and it is striped across the hard disks. In this example, the first block of data, A0, is written to the first disk, the second block of data, A1, is written to the second disk, the third block of data, B0, is written to the first disk, and so on. Striping data across the disks means that the overall write performance of the disk set is very fast, usually much faster than a single disk. When a read request is received by the RAID controller,it reads both A0 and A1 at the same time since they are on separate disks,doubling the read performance relative to a single disk. Performance is very good but the failure of any one disk in the array results in data loss.

Minimum number of disks needed to setup a RAID-0 array is 2.

The capacity of RAID 0 can be calculated as:

Capacity = n * min(disk sizes)

where n = number of disks in the array.
min(disk sizes) = minimum common capacity across the drives.

Merits:

High I/O performance

De-merits:

No data redundancy.

RAID-1


Figure-2  RAID-1 layout

Technique(s) used : Mirroring

Explanation: It is the first real implementation of RAID which offers Redundancy. RAID 1 uses Mirroring technique to provide redundancy.RAID-1 takes an incoming block of data to one drive and creates a mirror image (copy) of it on a second drive.In this illustration when block A1 is written to disk 0, the same block is also written to disk 1. So the overall write performance of a RAID-1 array is the same as a single disk .The read performance is actually faster for a RAID-1 array relative to a single disk. If one of the drives fails, the other drive still has all the data that existed on the system. This provides a full level of redundancy for the data on the system.

Minimum number of disks needed to setup RAID-1 array is 2.

Storage capacity is only as large as the smallest drive. Capacity of the RAID-1 array can be calculated using

Capacity = min(disk sizes)

where,min(disk sizes) = minimum common capacity across the drives.

Merit:

Provides full redundancy of data and good read performance.

De-Merits:

Limited write performance.

RAID-2

Techniques used: Bit level striping+Hamming code error correction.

Explanation:The basic concept is that,RAID-2 stripes data at the bit level instead of the block level and uses a Hamming Coding for parity computations. In RAID 2,first bit is written on first disk,second bit is written to second disk and so on. Then Hamming Code is calculated for the bits and the resulting bit is stored on a separate disk. This level of RAID is intended for use in drives which do not have built-in error detection. If one of the disks fail the remaining bits of the byte and the associated ECC(Error Correction Codes) bits can be used to reconstruct the data.

RAID-2 is no longer really used,since the hard disks nowadays uses has built-in error correction techniques.

RAID-3


Figure 3  RAID-3 layout

Technique(s) used:Byte level striping + parity.

Explanation: It uses multiple data disks, and a dedicated disk to store parity.A chunk of data is split into bytes. Byte A0 is written to disk 0,byte A1 is written to disk 1,and byte A2 written to disk 2 and so on.Then the parity of bytes A0,A1 and A2 are computed and written to disk 3.Since parity is used, a RAID 3 can withstand a single disk failure without losing data or access to data.Parity is calculated using XOR Operation. A RAID-3 array tolerates the loss of any single drive. Data in the failed drive can be reconstructed by XOR ing the data bytes in the remaining drives in the array without much degradation in performance. Accessing a single block of data requires access to more than one hard disks,so that the spindles should be synchronized.

Minimum number of disks needed to setup RAID-3 array is 3. The three disks has to be identical.

Capacity of the RAID-3 array can be calculated using

Capacity = min(disk sizes) * (n-1)

where, n = number of disks in the array.
min(disk sizes) = minimum common capacity across the drives.

Merit:

1)RAID-3 provides high throughput (both read and write) for large data transfers
2) Disk failures do not significantly slow down throughput.

De-merit:

1) Cannot be implemented using software RAID since it is more resource intensive.
2) Performance is slower for small I/O operations                                                                      3) Controller design is fairly complex.

RAID-4

Figure-4 RAID-4 layout

Technique(s) used: Block level striping +Parity

Description: RAID 4 is quite similar to that of RAID 3. It also uses a dedicated parity disk, but the difference is that, it stripes the data at block level. A chunk of data is splitted into blocks. Block A0 is written to Disk-0,A1 is written to Disk-1 and A2 is written to Disk-2 and so on. The parity of the blocks(Ap) are calculated and stored in the dedicated parity disk. Since the data is striped at the block level ,hard disks can be accessed independently during data read/write. It can tolerate the loss of one drive

Minimum number of disks needed to setup RAID-4 array is 3(Two disks for storing the data and third one for storing parity information) . All the disks should be identical.

Capacity of RAID-4 array can be calculated using:

Capacity = min(disk sizes) * (n-1)

where n = number of disks in the array.
min(disk sizes) = minimum common capacity across the drives.

Merits:

1) Unlike RAID 3, it does not require synchronized spindles.                                                     2) Good read performance since all of the drives are read at the same time.

De-merits:

Write performance is not that good because of the bottleneck of the parity drive.

RAID-5

Figure:5 RAID 5 layout

Technologies used:Striping+Distributed parity

Description: This is the most popular RAID level.It uses block level striping and parity is distributed across all the drives in the array. It offers higher performance than level 1-4.It also provides high storage capacity. Here parity information will also be stored along with the data disks.

Minimum number of disks needed is 3(two disks for storing data and the third one for storing parity information.). All the 3 disks should be identical.

Capacity of the RAID-5 array can be calculated using

Capacity = min(disk sizes) * (n-1)

where n =  number of disks in the array.
min(disk sizes) =  minimum common capacity across the drives.

Merits:

1) Good data redundancy/availability (can tolerate the lose of 1 drive)
2) Very good read performance since all of the drives can be read at the same time.

De-merits:

1) Write performance is adequate (better than RAID-4).
2) Write performance for small I/O is poor.

Conclusion

RAID is a good solution for those who need more transfer performance, redundancy, and storage capacity in their data storage systems. I hope you’ve enjoyed reading this article and maybe even learned more about RAID.

VN:F [1.9.6_1107]
Rating: 8.2/10 (5 votes cast)
VN:F [1.9.6_1107]
Rating: +5 (from 5 votes)

Apache prefork tuning.

April 21st, 2012

Modular structure of apache is one of the reason for its global dominance among webservers.We have the flexibility to adding or droping modules.Before we deal with apache prefork MPM we need to have a basic idea about apache Multi Processing Modules,Multi processing Modules (MPM) are the multiple request (hundreds to kilos) handling ‘department’ of apache.We can compare MPM as ‘valve’ of apache , it accept requests, spawn the child processes according to the inflow of requests and assign the child process for the incoming connections.
Worker and Prefork are two major MPMs used in Linux platform.Both have their own pros and cons. Prefork is a non-threaded MPM while Worker is a threaded MPM. i.e prefork will generate pre-defined number of httpd procesesses(StartServers parameter) during startup and dispatch more child processes as the request increases. But in the case threaded worker MPM it will startup pre-defined number of httpd processes and a single process will hadle multiple connections.

Since prefork have a one process per thread structure it can provide isolation among different connections. So we can say that it is more secure at the cost of more RAM and CPU power. Worker MPM needs less RAM and CPU power but does not provide same level of request-to-request isolation as a process-based MPM does.Now let us look in to the prefork MPM tuning which is more common MPM than worker.

Prefork Directives

Example for prefork directives

StartServers 8
MinSpareServers 5
MaxSpareServers 10
MaxClients 30
MaxRequestsPerChild 500

StartServers : Number of apache child processes generated during the apache startup.

MinSpareServers: Spare servers are child processes in idle(not handling any requests). If the total idle processes are less than
MinSpareServers directive then apache parent process will create child processes up to MinSpareServers .

MaxSpareServers: If the total idle child processes is more than this directive , then parent pocess will kill additional idle processes.

MaxClients: This is the most important MPM directive for tuning apache performance.Parent process will dynamically spawn new child processes as the incoming request raises. MaxClients is the maximum child processes created for handling requests or in other words it is the max simultaneous requests apache can handle. This value should be optimal. If it is too low apache can only handle few requests and excess requests will be queued and it may get timed out.If it is too high server will begin to swap and it seriously affects entire server performance.

MaxRequestsPerChild: After handling this much requests child process will die .MaxRequestsPerChild is the requests that a child process will handle in its life time.If it is too low in a busy server, apache will utilize a good CPU power for killing and spawning new child processes which may cause more CPU burden. But at the same time it is always good to recycle it in a timely manner, otherwise it may cause common issues like memory leak , process bloat etc.

How to set MaxClients.

Before choosing a value we need to analyze the server , i.e check the RAM size and applications running other than apache like mysql , java applications etc. Then roughly calculate the memory dedicated for those applications . For example ,we might have defined innodb buffer spool size for mysql and java heap size for java applications . Substract that much memory from total RAM size. Suppose you have 2 GB RAM and 500 MB allocated for mysql(it depends on your DB size) and 250 for java and reserved some memory for system applications ,in this setup we can reserve memory up to 1 GB for apache . On next step we need to calculate avereage process memory usage for apache. For calculating it , during the peak traffic time run the following command

ps aux| awk ‘/apach[e]/{total+=$6}END{print total}’ this calculates total physical memory used by all apache process , to calculate average memory usage ,devide above value with total apache processes .
Finally we can optimize MaxClients value by deviding memory reserved for apache (1G) by process’s average memory usage. (Lets imagine its 35M here) .

MaxClients <= 1G/35 M = 30. We can reduce avg memory usage by removing unwanted apache modules and using php cache like PHP op-code cache/accelerator .If serever have good traffic, then fix the MaxRequestsPerChild deirective some higher values like 2000. Thoroughly observe server for some days after tuning , some time you need to tweak it 2 – 3 times for getting the best result. Good Luck!

VN:F [1.9.6_1107]
Rating: 6.0/10 (5 votes cast)
VN:F [1.9.6_1107]
Rating: +4 (from 4 votes)

Quick Guide for Spacewalk

April 12th, 2012

Spacewalk is an open source (GPLv2) Linux systems management solution. It is the upstream community project from which the Red Hat Network Satellite product is derived. According to spacewalk definition it provides

  • Inventory your systems (hardware and software information)
  • Install and update software on your systems
  • Collect and distribute your custom software packages into manageable groups
  • Provision (kickstart) your systems
  • Manage and deploy configuration files to your systems
  • Monitor your systems
  • Provision virtual guests
  • Start/stop/configure virtual guests
  • Distribute content across multiple geographical sites in an efficient manner

It  manages software content updates for Red Hat derived distributions such as Fedora, CentOS, and Scientific Linux, within your firewall. Limited support for Debian is also available. Spacewalk allows administrators to efficiently manage the systems on their network. Through a simple user interface, administrators can perform patch management, updates, monitoring, and maintenance. And because Spacewalk is Web-based, it can be accessed from anywhere. Spacewalk or Proxy server options provide advanced capabilities and the ability to get updates directly from Red Hat with even greater levels of security and reduced network bandwidth. As I mentioned already spacewalk is the upstream project of Redhat Network Satellite (RHN). The Changes will occur frequenty in the Spacewalk project to fulfill this mission of having the latest technology. However, if your needs require stability and support over access to the latest management technology, you may decide that a Satellite subscription is right for you.

Creating Channels

1. Create a base channel within Spacewalk.

Channels > Manage Software Channels > Create New Channel

2. Fill up all the required fields such as Channel Name, Channel Label, and Channel Summary

3. Select the Parent (its depends upon your channel)

4. Select the channel architecture from the drop down list

5. Select the Checksum type

6. Write a description about your channel

7. Fill the Contact support information, Channel access control and security GPG

8. Now click the “Create Channel” button.

The channel with the specified name has been created.

Creating activation key

Activation keys are used to register a system to spacewalk server. System registered with an activation key will inherit the characteristics defined by that key.

1. To create an activation key

Systems > Activation keys > Create new key

2. Enter the description of the activation key

3. If you have a specific key value, type it in the key textbox else leave it as blank. Spacewalk will generate a key after clicking create key button.

4. Enter a numeric value for the limited usage of the key. In case if you want to use the key unlimited times leave the usage textbox as blank.

5. Select the base channel from the drop down list box or choose “Spacewalk Default” to allow systems to register to the default Red Hat provided channel that corresponds to their installed version of Red Hat Enterprise Linux.

6. Enable the universal default check box and click “Create Activation Key”

Registering Clients

Install the client-tools in the client

For RHEL 5 / CentOS 5

# rpm -Uvh http://spacewalk.redhat.com/yum/1.7/RHEL/5/i386/spacewalk-client-repo-1.7-5.el5.noarch.rpm

For CentOS 6

# rpm -Uvh http://spacewalk.redhat.com/yum/1.7/RHEL/6/i386/spacewalk-client-repo-1.7-5.el6.noarch.rpm

To register the client host, you need to install the client registration tools. But those tools are not avail in the redhat repository. You can found those packages in EPEL repository

For RHEL 5 / CebtOS 5

# BASEARCH=$(uname -i)# rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/$BASEARCH/epel-release-5-4.noarch.rpm

For CentOS 6

# BASEARCH=$(uname -i)# rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/$BASEARCH/epel-release-6-5.noarch.rpm

Now install the client packages

# yum install rhn-client-tools rhn-check rhn-setup rhnsd m2crypto yum-rhn-plugin

Register your CentOS or Red Hat Enterprise Linux system to Spacewalk using the activation key you created earlier

# rhnreg_ks --serverUrl=http://YourSpacewalk.example.org/XMLRPC --activationkey=<key-with-rhel-custom-channel>

rhnreg_ks is used for registration of clients to Spacewalk. If you need to re-register a client to your Spacewalk server or change registration from one environment or server to another Spacewalk server then use the “–force” flag with rhnreg_ks, otherwise there is no need to use “–force”.

Adding packages to repository

There are two ways to add packages to the spacewalk server. We can either add using spacewalk-repo-sync or rhnpush command.

Spacewalk-repo-sync

The  spacewalk-repo-sync tool is used to sync packages from external or local yum repositories. All the packages within the specified repository will be added to the channel.Any url supported by yum is supported by this utility, including mirror lists.  If the url is not supplied, the tool will look to see what  repositories are associated with the specified channel and use those.

Example

spacewalk-repo-sync --channel=repo1 --url=http://example.com/yum-repo/
spacewalk-repo-sync --channel=repo2 --url=file:///var/share/localrepo/
spacewalk-repo-sync --channel=repom --url=http://example.com/mirrorlist.xml/

You can also use WebGUI and this is the easiest way to create repositories

  • Goto Channels -> Manage Software Channels -> Manage Repositories -> create new repository

After creating the repository, you need to link it to one or more Software Channels.

  • Goto: Channels -> Manage Software Channels -> Choose the channel to be linked -> Repositories -> Select the repositories to be linked to the channel -> Update Repositories.

Now you can sync the repository by clicking on the sync tab.

Click on sync now or schedule a sync.

RHNpush

The  RHN  Satellite Package Pusher (rhnpush) pushes RPMs into locally managed channels on an RHN Satellite Server. Rhnpush has three configuration files called /etc/sysconfig/rhn/rhnpushrc, ~/.rhnpushrc, and ./.rhnpushrc.

/etc/sysconfig/rhn/rhnpushrc is the system-wide default settings for rhnpush.
~/.rhnpushrc is the user-specific settings that override the system-wide settings.
./.rhnpushrc controls the directory specific settings that override the user-specific and system-specific settings.

/etc/sysconfig/rhn/rhnpushrc must be present for rhnpush to function correctly. If it is missing, rhnpush will attempt to use a series of  default  settings  stored  internally as a replacement. ~/.rhnpushrc and ./.rhnpushrc are not required to be present, but will be used if they are present. They are not created automatically by rhnpush.

Rhnpush uses a cache, stored at ~/.rhnpushcache, to temporarily hold the username and password for a user. If the cache is missing, it will be created by rhnpush.
If the cache is present and not too old, the usename-password combo will be used as a convenience for the user. The amount of time a cache lasts is configurable in any of the three configuration files. If your username/password combination gets messed up you have two options. One, you can wait until the cache expires, which takes  minutes  by  default. Two, you can use the –new_cache option to force rhnpush to let you reenter your username/password.

Using  the  –stdin  and –dir options at the same time works as follows: rhnpush will let you type in rpm names, each rpm name on a separate line. When       you have finished entering in rpm names, hit Ctrl-D. Rhnpush will then grab the files from directory you specified with –dir, put them in a  list  with       the rpms you listed through standard input, and send them to the channel that was listed on the command-line or in the configuration files.

Note : Make sure /var/satellite exists on the Spacewalk server and has owner:group apache before pushing.

[root@sathishhost ~]# chgrp apache /var/satellite/ -R

[root@sathishhost ~]# ls -l /var | grep satellite

drwxr-xr-x.  3 apache apache 4096 Mar 20 10:06 satellite

Example

rhnpush --server localhost -u <username> -p <password> --channel <channel-name> /usr/local/src/additional/*.rpm

rhnpush --server localhost -u sathish -p redhat --channel spacewalk-nightly-rhel-6-x86_64 /usr/local/src/additional/*.rpm

rhnpush -v --channel=<channel-name> --server=http://localhost/APP --dir=<package-dir>

rhnpush -v --channel=spacewalk-nightly-rhel-6-x86_64 --server=http://localhost/APP --dir=/usr/local/src/additional

VN:F [1.9.6_1107]
Rating: 8.1/10 (14 votes cast)
VN:F [1.9.6_1107]
Rating: +5 (from 5 votes)

Perl Dancer

April 10th, 2012

Ever since I learned perl, i was dreaming to write a web app of my own. I was scared by the terms sessions, cookies, content rendering, SQL integration etc. But Dancer eased my way.

Thanks to Dancer, i just deployed a Music Web App – “Spark Impulse” in our office.

What is Dancer ?

Dancer is a simple but powerful web application framework in Perl. Dancer stole the approach from Sinatra, a web framework for Ruby. Yes, The bad artists imitate, The great artists steal !!

Why Dancer ?

  • LightWeight
  • StandAlone
  • PSGI/Plack Compliant
  • Expressive Syntax
  • Few Dependencies
  • Few Configuration Steps

Installation

Using cpanminus

spark$ curl -L http://cpanmin.us | perl - --sudo Dancer

Using cpan shell

spark$ perl -MCPAN -e shell

cpan shell -- CPAN exploration and modules installation (v1.9402)
Enter 'h' for help.

cpan[1]> install Dancer

Or even by hand

spark$ wget http://search.cpan.org/CPAN/authors/id/X/XS/XSAWYERX/Dancer-1.3095.tar.gz
spark$ tar -zxf Dancer-1.3095.tar.gz
spark$ cd Dancer-1.3095
spark$ perl Makefile.PL
spark$ make
spark$ make test
spark$ make install

A Dancer script itself is a webserver. Yes, you read it correctly – run the script from command prompt and your web application will spring into existance.

spark$ ./myapp.pl
>> Dancer 1.3092 server 9194 listening on http://0.0.0.0:3000
>> Dancer::Plugin::Database (1.81)
>> Dancer::Plugin::Database::Handle (0.12)
== Entering the development dance floor ...

With the following code in your myapp.pl script you say a big hello to the world at http://:3000/

#!/usr/bin/env perl
use Dancer;
get '/' => sub {
"Hello World !"
};
dance;

Dancer app is defined with route handlers. A route handler is basically a ‘sub’ ( function ) associated to an HTTP method and a path pattern. Valid HTTP methods are GET, POST, PUT, DELETE. But usually it will either be a GET or a POST !

Path Patterns includes Named Matching, WildCards Matching, Regex Matching, Conditional Matching as shown below. A route pattern can also contain one or more tokens (a word prefixed with ‘:’).

get '/hello/:name' => sub {
"Hi" . param('name') . ", Welcome here!";
}

When you access http://localhost:3000/hello/Peter, server should respond with a page – Hi Peter, Welcome here!

To make the token optional suffix it with a “?”

get '/hello/:name?' => sub {
"Hello there " . (param('name') || "whoever you are!");
};

You may use regex patterns for defining routes. And Dancer will return the matches in an arrayref, accessible via the keyword ‘splat’.

get '/download/*.*' => sub {
my ($file, $ext) = splat;
# do something with $file.$ext here
};

get qr{/hello/([\w]+)} => sub {
my ($name) = splat;
return "Hello $name";
}

So processing a HTTP request is equal to finding a matching route handler. When a request matches with a route handler, dancer executes that route handler.

Enough to start with !

I’m planning to add more blogs under the same topic. Till then, make some simple moves and start dancing !!

VN:F [1.9.6_1107]
Rating: 4.5/10 (4 votes cast)
VN:F [1.9.6_1107]
Rating: +4 (from 4 votes)

Finding an offshore Business Partner for online Business

April 9th, 2012

It has been a while I have done blogging and today I got a perfect topic, which according to me one of the intriguing question in the mind of every online business man. My article specifically address the companies in India who provides Software development and infrastructure Support.

At the outset of 2012 India has already acclaimed as the best country to provide IT related services. There are enough brands to prove this claim, Wipro, Infosys, TCS etc. West already knows these companies can give a huge traction to their business if they engage with these companies, but what about smaller players who wants to run their online business and their budgets are limited to few thousands dollars. Its obvious that they can’t approach these big companies and its hard for them to identify trust-able small players either, who can provide quality service for their business.

Companies like SparkSupport fill this gap. So what should be the ideal checklist for a businessman who wants to engage with an offshore business partner. Its easy to get the websites of the companies providing the services of his requirement and now he should start communicating with them. From the initial conversation he should get a basic picture of the company structure.

In India a Private Limited Company will give you an authenticity that company is existing. Try to avoid Partnership or Proprietorship they will have no liabilities and they can shut down any day. Only people who are serious about their business will register as a Private Limited Company.

Always start with a pilot project. You can gauge the following qualities in the pilot project.

Trust

As the word denotes you should be filled with confidence that this company deliver what they have promised. If you have given only a part of the major project, by now you should be able to analyse how good is the team to handle the whole project.

Reporting

You would have chosen either hourly billing or dedicated staff for the project you have outsourced. Whatever be the case to know the project status you shouldn’t call them up, if the company has got a process they would intimate you with daily updates what all things completed and what all left. If the company provides this without asserting upon this point, then you can assume this company is worth.

Communication

In any projects communication is really important. Requirements are susceptible to changes and you might have identified some drastic changes which you want in the project. Its not easy for you to communicate this to your team as they will come up with lot of arguments to block your desire. But you should understand you are the business man and you know the real game of making money better than anyone else. You know when, where and how to spend your money on something and you know how to reap money out of it. But its very difficult for the developers or coders to understand and they are the least educated about running a business. These situations makes it really hard for you  though you are ready to revise your budget to make it happen. So the point here is you should have other people  who are in the management of the company with whom you can talk to and who understands you better than the coders.

Diverse Skill-set

The company you choose should have a diverse portfolio. It won’t be easier for you to run around different companies to complete a project. Moreover signing NDA , SLA with all these companies will be cumbersome. If the chosen company has diverse skill set other than coding then it will be much convenient for you in completing the project. Take the scenario that you have decided to build an online webstore. Other then coding the project requires,  a hosting space to host the site,  a team to help you with the deployment, a team to design your store , an advanced team if you decide to host it in a cloud environment etc. So always look out for companies who can provide you all this.

By the above points you can now weed out the incompetent ones and choose the best company with whom you can build a strong relationship which lasts forever.

Reach out to me if you need any assistance info[@]sparksupport.com

 

 

 

 

 

VN:F [1.9.6_1107]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.6_1107]
Rating: +3 (from 3 votes)

HYPER-V AND VIRTULIZATION IN WINDOWS

September 15th, 2011

Hyper-V

Microsoft Hyper-V, codenamed Viridian and formerly known as Windows Server Virtualization, is a hypervisor-based virtualization system for x86-64 systems. Hyper-V exists in two variants: as a stand-alone product called Microsoft Hyper-V Server 2008, and as an installable role in Windows Server 2008 R2 and Windows Server 2008 (the former containing the later release of Hyper-V).

Hyper-V on a Familiar Operating System

Unlike some other server virtualization systems that are hosted on the Linux operating system (VMware ESX) or proprietary host systems, Hyper-V runs right on a familiar Microsoft Windows Server operating system. Network administrators do not need to learn a new operating system, management system, or specialized tools. Early adopters of Hyper-V, even without documentation or training, have been able to install the Hyper-V server role, finding it just like installing any other server role (such as installing domain name service [DNS], media services, Internet Information Services [IIS] web services, and the like). The administrative tools for Hyper-V are also just like any other administrative tool in Windows. Therefore, the creation of virtual guest sessions, the monitoring of those sessions, and the administration of guest sessions is a familiar process for IT administrators. The ease of learning, using, and supporting Hyper-V has been a huge factor in organizations adopting Hyper-V for their virtual server environments.

 

Hyper-V Support More Than Just Windows Guest Sessions

With the release of Hyper-V, Microsoft made a concerted effort to ensure that Hyper-V not only supports Windows guest sessions (like Windows 2003 and Windows 2008), but also non-Windows guest sessions running Linux. By providing support for a variety of guest sessions, Microsoft is enabling organizations to consolidate both their Windows and non- Windows server systems onto fewer Hyper-V host servers.

 

NOTE

Hyper-V in Windows 2008 is supported only on x64-bit systems that have hardware assisted virtualization support. Therefore, an organization cannot load up the 32-bit version of Windows 2008 and try to set up virtual guest sessions on the 32-bit host version of Windows.


VN:F [1.9.6_1107]
Rating: 1.0/10 (1 vote cast)
VN:F [1.9.6_1107]
Rating: +2 (from 2 votes)