Wednesday, February 3, 2016

Reducing IO waits on Ubuntu for MYSQL 5.6

Dear All,
I was continuously receiving IO waits high usage alerts for our MYSQL 5.6 DB servers running on Ubuntu servers and so checked lots of things to reduce IOs like optimizing queries and shifting database on SAS disks.
But not got any success so tried to split table data (partitioning) but the business logic was not supporting it so started doing RND to reduce IO waits on Ubuntu servers.
And finally got solution and all were happy J
Added below line in MY.CNF
innodb_flush_method =  O_DSYNC
Benefits got after adding the line
  • Reduced IO waits
  • Reduce memory usage of database server

Configure Website on Remote share…

To configure Websites on Web farm in traditional way we copy all websites on all web servers and configure websites and a synchronization mechanism.
This process requires disk space per server to keep website and the delay of synchronization.
So given a thought can we save the disk space and synch delay and done a RnD by following below steps to overcome all these dependencies
First tried to configure Website from remote share and got below error

After lots of efforts got sucess ..

  1. Share the Websites folder on MASTER server by giving full control to DOMAIN\appuser account
  2. Open Command Prompt ( run as administrator )
  3. Traverse c:\windows\microsoft.net\framework\v.x.xxxxx\ folder


  1. caspol -m -ag 1. -url “file://\\10.10.10.131\websites\*” FullTrust
” The Code Access Security POLicy tool enables users and administrators to modify security policy for the machine policy level, the user policy level, and the enterprise policy level. ”
On Master server

  1. now open IIS manager ( Inetmgr )
  2. Click on Website for which we want to configure remote share website
  3. From right panel click on Basic Settings and edit the path of website as
  4. Now click on connect as button and enter domain\appuser account details
  5. Then click on test settings ( ensure all is green )
  6. In website feature panel.. Authentication tab … anonymous authentication should run under domain\appuser account.
  7. Now go in Application Pool tab
  8. Ensure application pool is running under domain\appuser account
  9. Recycle the application pool / reset IIS
  10. Browse the website J
The master server is ready; now follow Step 4 to Step 14 in sequence on all remaining web servers

REPAIR Corrupted Pen Drive

One day morning when I was trying to copy some data on my pen drive of 2 GB , suddenly I got message as “You need to format the disk …” and on screen it was popup like below .


So I clicked on Format disk button I got below screen on which I clicked on OK



Still got same error , I though the disk become unusable so tried for second option of Diskpart command as below

Start cmd



Then “list disk ” to get the disk no for further process. ( its disk 2 in my case)
So followed below set commands for DISK 2 ( which is my Flash drive )



As soon as the format got completed



Thanks to DISKPART … saved my Pen drive.

403.18 Cannot execute requested URL in the current application pool

Due to heavy load on web site which is configured on webfarm in remote share environment started giving below error on all servers.

After lot of googling also I haven’t got any appropriate solution

So tried below steps and it worked 
  1. Created new app pool with same framework and credentials.
  2. Assigned the newly created pool to the website
  3. Tried by browsing and it started working.
So according to my experience we need to created new app pool to resolve the 403.18 Error.

Import all Websites and application pools by Exporting it from IIS7.5

Task:Create new server with all the pre-configured settings with IIS web server.

Scenario:-
I want to create replica server for all my website with preconfigured apppool setttings.

Actions Taken:-
  1. Taken remote of web server.
  2. Exported all Application Pools from the Server with below command
%windir%\system32\inetsrv\appcmd list apppool /config /xml > c:\apppools.xml

  1. Exported all Websites along with Applications ( Virtual Directories ) with below command
%windir%\system32\inetsrv\appcmd list site /config /xml > c:\sites.xml

  1. Copied both the files from DR webserver to newly formatted C: \
  2. Then Task is to import all application pools and Websites in IIS 7.5
  3. To do so first open INETMGR and delete all Applications and default Website from it ( as its newly formatted we don’t have any important website configured on it)
  4. First Import Application pools which can be done with below command on CMD
%windir%\system32\inetsrv\appcmd add apppool /in < c:\apppools.xml

  1. Then import all Websites along with Applications to do so use below command
%windir%\system32\inetsrv\appcmd add site /in < c:\sites.xml

  1. After all done , IISReset /stop and then IISReset /start