<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>My Workday &#187; Uncategorized</title>
	<atom:link href="http://www.goworkday.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.goworkday.com</link>
	<description>Let&#039;s talk TECH</description>
	<lastBuildDate>Thu, 02 Feb 2012 18:52:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>How to look up available JVM flags</title>
		<link>http://www.goworkday.com/2012/02/02/how-to-look-up-available-jvm-flags/</link>
		<comments>http://www.goworkday.com/2012/02/02/how-to-look-up-available-jvm-flags/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 18:52:32 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.goworkday.com/?p=321</guid>
		<description><![CDATA[<br/>java -XX:+PrintFlagsFinal -version&#124; grep -i Pre intx AllocatePrefetchDistance = 192 {product} intx AllocatePrefetchInstr = 0 {product} intx AllocatePrefetchLines = 4 {product} intx AllocatePrefetchStepSize = 64 {product} intx AllocatePrefetchStyle = 1 {product} bool AlwaysPreTouch = false {product} uintx CMSAbortablePrecleanMinWorkPerIteration = 100 {product} intx CMSAbortablePrecleanWaitMillis = 100 {manageable} uintx CMSMaxAbortablePrecleanLoops = 0 {product} intx CMSMaxAbortablePrecleanTime = 5000 [...]]]></description>
			<content:encoded><![CDATA[<br/><pre></pre>
<pre>java -XX:+PrintFlagsFinal -version| grep -i Pre
     intx AllocatePrefetchDistance                  = 192             {product}
     intx AllocatePrefetchInstr                     = 0               {product}
     intx AllocatePrefetchLines                     = 4               {product}
     intx AllocatePrefetchStepSize                  = 64              {product}
     intx AllocatePrefetchStyle                     = 1               {product}
     bool AlwaysPreTouch                            = false           {product}
    uintx CMSAbortablePrecleanMinWorkPerIteration   = 100             {product}
     intx CMSAbortablePrecleanWaitMillis            = 100             {manageable}
    uintx CMSMaxAbortablePrecleanLoops              = 0               {product}
     intx CMSMaxAbortablePrecleanTime               = 5000            {product}
     bool CMSPermGenPrecleaningEnabled              = true            {product}
    uintx CMSPrecleanDenominator                    = 3               {product}
    uintx CMSPrecleanIter                           = 3               {product}
    uintx CMSPrecleanNumerator                      = 2               {product}
     bool CMSPrecleanRefLists1                      = true            {product}
     bool CMSPrecleanRefLists2                      = false           {product}
     bool CMSPrecleanSurvivors1                     = false           {product}
     bool CMSPrecleanSurvivors2                     = true            {product}
    uintx CMSPrecleanThreshold                      = 1000            {product}
     bool CMSPrecleaningEnabled                     = true            {product}
     bool CompilerThreadHintNoPreempt               = true            {product}
    uintx G1HeapRegionSize                          = 0               {product}
     intx InterpreterProfilePercentage              = 33              {product}
     intx PreBlockSpin                              = 10              {product}
     intx PreInflateSpin                            = 10              {pd product}</pre>
<pre></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.goworkday.com/2012/02/02/how-to-look-up-available-jvm-flags/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL &#8211; Poor Man&#8217;s Profiler</title>
		<link>http://www.goworkday.com/2011/05/26/mysql-poor-mans-profiler/</link>
		<comments>http://www.goworkday.com/2011/05/26/mysql-poor-mans-profiler/#comments</comments>
		<pubDate>Fri, 27 May 2011 04:50:43 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.goworkday.com/?p=313</guid>
		<description><![CDATA[<br/>Rationale Sampling tools like oprofile or dtrace&#8217;s profile provider don&#8217;t really provide methods to see what [multithreaded] programs are blocking on &#8211; only where they spend CPU time. Though there exist advanced techniques (such as systemtap and dtrace call level probes), it is overkill to build upon that. Poor man doesn&#8217;t have time. Poor man [...]]]></description>
			<content:encoded><![CDATA[<br/><h1><span style="font-size: 20px;">Rationale</span></h1>
<p>Sampling tools like oprofile or dtrace&#8217;s profile provider don&#8217;t really provide methods to see what [multithreaded] programs are blocking on &#8211; only where they spend CPU time. Though there exist advanced techniques (such as systemtap and dtrace call level probes), it is overkill to build upon that. Poor man doesn&#8217;t have time. Poor man needs food.</p>
<h2>Method</h2>
<p>For a poor developer to understand what a program is doing, he needs to see stacks. Once upon a time (back in Linux 2.4) there was a &#8216;pstack&#8217; tool for that, Solaris has it too.</p>
<p>Modern Linux systems though do not have such facilities, and one needs to improvise, like.. use debuggers &#8211; they can walk threads and provide stacks.</p>
<h2>Technology</h2>
<p>Getting stacks:</p>
<pre>gdb -ex "set pagination 0" -ex "thread apply all bt" \
  --batch -p $(pidof mysqld)</pre>
<p>Or for version-impaired (gdb 6.3 and older):</p>
<pre>(echo "set pagination 0";
 echo "thread apply all bt";
 echo "quit"; cat /dev/zero ) | gdb -p $(pidof mysqld)</pre>
<p>Collapsing traces (awk!):</p>
<pre>BEGIN { s = ""; }
/Thread/ { print s; s = ""; }
/^\#/ { if (s != "" ) { s = s "," $4} else { s = $4 } }
END { print s }</pre>
<p>Full technology demonstration:</p>
<pre>#!/bin/bash
nsamples=1
sleeptime=0
pid=$(pidof mysqld)

for x in $(seq 1 $nsamples)
  do
    gdb -ex "set pagination 0" -ex "thread apply all bt" -batch -p $pid
    sleep $sleeptime
  done | \
awk '
  BEGIN { s = ""; }
  /Thread/ { print s; s = ""; }
  /^\#/ { if (s != "" ) { s = s "," $4} else { s = $4 } }
  END { print s }' | \
sort | uniq -c | sort -r -n -k 1,1</pre>
<p>&nbsp;</p>
<h2>Output</h2>
<pre>291 pthread_cond_wait@@GLIBC_2.3.2,one_thread_per_connection_end,handle_one_connection
 57 read,my_real_read,my_net_read,do_command,handle_one_connection,start_thread
 26 pthread_cond_wait@@GLIBC_2.3.2,os_event_wait_low,os_aio_simulated_handle,fil_aio_wait,io_handler_thread,start_thread
  3 pthread_cond_wait@@GLIBC_2.3.2,os_event_wait_low,srv_purge_worker_thread
  1 select,os_thread_sleep,srv_purge_thread
  1 select,os_thread_sleep,srv_master_thread
  1 select,os_thread_sleep,srv_lock_timeout_and_monitor_thread
  1 select,os_thread_sleep,srv_error_monitor_thread
  1 select,handle_connections_sockets,main,select
  1 read,vio_read_buff,my_real_read,my_net_read,cli_safe_read,handle_slave_io
  1 pthread_cond_wait@@GLIBC_2.3.2,os_event_wait_low,sync_array_wait_event,rw_lock_s_lock_spin,buf_page_get_gen,btr_cur_search_to_nth_level,row_search_for_mysql,ha_innodb::index_read,handler::index_read_idx_map,join_read_const,join_read_const_table,make_join_statistics,JOIN::optimize,mysql_select,handle_select,execute_sqlcom_select,mysql_execute_command,mysql_parse,dispatch_command,do_command,handle_one_connection
  1 pread64,os_file_pread,os_file_read,fil_io,buf_read_page_low,buf_read_page,buf_page_get_gen,btr_cur_search_to_nth_level,row_search_index_entry,row_upd_step,row_update_for_mysql,ha_innodb::delete_row,handler::ha_delete_row,mysql_delete,mysql_execute_command,mysql_parse,Query_log_event::do_apply_event,apply_event_and_update_pos,handle_slave_sql
  1 pread64,os_file_pread,os_file_read,fil_io,buf_read_page_low,buf_read_page,buf_page_get_gen,btr_cur_search_to_nth_level,row_search_for_mysql,ha_innodb::index_read,handler::index_read_idx_map,join_read_const,join_read_const_table,make_join_statistics,JOIN::optimize,mysql_select,handle_select,execute_sqlcom_select,mysql_execute_command,mysql_parse,dispatch_command,do_command,handle_one_connection
  1 do_sigwait,sigwait,signal_hand</pre>
<h2>Success stories and references</h2>
<p>We hear this technology has been used by performance engineers at Google, Facebook, Wikipedia, Intel, Sun Microsystems and other places.</p>
<ul>
<li><a href="http://www.xaprb.com/blog/2009/08/30/a-script-snippet-for-aggregating-gdb-backtraces/">Baron Schwartz</a></li>
<li><a href="http://mikaelronstrom.blogspot.com/2009/11/gdb-stack-trace-analysis-of-sysbench.html">Mikael Ronstrom</a></li>
<li><a href="http://bugs.mysql.com/bug.php?id=49463">Mark Callaghan</a></li>
</ul>
<p>&nbsp;</p>
<h2>Credits</h2>
<div>
<div><a href="http://www.facebook.com/pages/PoorMansProfiler/337907684404">PoorMansProfiler</a> on Facebook</div>
</div>
<p>Originally this technology was released as a collaborative effort by Mark Callaghan and Domas Mituzas at <a href="http://mituzas.lt/2009/02/15/poor-mans-contention-profiling/">this blog post</a>.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.goworkday.com/2011/05/26/mysql-poor-mans-profiler/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extract RPM package without installing it</title>
		<link>http://www.goworkday.com/2011/05/12/extract-rpm-package-without-installing-it/</link>
		<comments>http://www.goworkday.com/2011/05/12/extract-rpm-package-without-installing-it/#comments</comments>
		<pubDate>Thu, 12 May 2011 18:23:29 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.goworkday.com/?p=310</guid>
		<description><![CDATA[<br/>Extract RPM file using rpm2cpio and cpio command: $ rpm2cpio any_rpm_package.x86_64.rpm &#124; cpio -idmv]]></description>
			<content:encoded><![CDATA[<br/><p>Extract RPM file using rpm2cpio and cpio command:<br />
<code><br />
$ rpm2cpio any_rpm_package.x86_64.rpm | cpio -idmv<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.goworkday.com/2011/05/12/extract-rpm-package-without-installing-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title></title>
		<link>http://www.goworkday.com/2010/10/05/java-process-debugging/</link>
		<comments>http://www.goworkday.com/2010/10/05/java-process-debugging/#comments</comments>
		<pubDate>Tue, 05 Oct 2010 07:26:04 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.goworkday.com/?p=292</guid>
		<description><![CDATA[<br/>﻿ Hung, Deadlocked, or Looping Process Print thread stack for all Java threads: Control-\ kill -QUIT pid jstack pid (or jstack -F pid if jstack pid does not respond) Detect deadlocks: Request deadlock detection: JConsole tool, Threads tab Print information on deadlocked threads: Control-\ Print list of concurrent locks owned by each thread: -XX:+PrintConcurrentLocks set, then Control-\ Print lock [...]]]></description>
			<content:encoded><![CDATA[<br/><p>﻿<br />
<h3>Hung, Deadlocked, or Looping Process</h3>
<p></br></p>
<ul>
<li>Print thread stack for all Java threads:
<ul>
<li>Control-\</li>
<li>kill -QUIT <em>pid</em></li>
<li>jstack <em>pid</em> (or jstack -F <em>pid</em> if jstack <em>pid</em> does not respond)</li>
</ul>
</li>
<li>Detect deadlocks:
<ul>
<li>Request deadlock detection: JConsole tool, Threads tab</li>
<li>Print information on deadlocked threads: Control-\</li>
<li>Print list of concurrent locks owned by each thread: -XX:+PrintConcurrentLocks set, then Control-\</li>
<li>Print lock information for a process: jstack -l <em>pid</em></li>
</ul>
</li>
<li>Get a heap histogram for a process:
<ul>
<li>Start Java process with -XX:+PrintClassHistogram, then Control-\</li>
<li>jmap -histo <em>pid</em> (with -F option if <em>pid</em> does not respond)</li>
</ul>
</li>
<li>Dump Java heap for a process in binary format to file:
<ul>
<li>jmap -dump:format=b,file=<em>filename pid</em> (with -F option if <em>pid</em> does not respond)</li>
</ul>
</li>
<li>Print shared object mappings for a process:
<ul>
<li>jmap <em>pid</em></li>
</ul>
</li>
<li>Print heap summary for a process:
<ul>
<li>Control-\</li>
<li>jmap -heap <em>pid</em></li>
</ul>
</li>
<li>Print finalization information for a process:
<ul>
<li>jmap -finalizerinfo <em>pid</em></li>
</ul>
</li>
<li>Attach the command-line debugger to a process:
<ul>
<li>jdb -connect sun.jvm.hotspot.jdi.SAPIDAttachingConnector:pid=<em>pid</em></li>
</ul>
</li>
</ul>
<h3>Post-mortem Diagnostics, Memory Leaks</h3>
<p></br></p>
<ul>
<li>Examine the fatal error log file. Default file name is hs_err_pid<em>pid</em>.log in the working-directory.</li>
<li>Create a heap dump:
<ul>
<li>Start the application with HPROF enabled: java -agentlib:hprof=file=<em>file</em>,format=b<em>application</em>; then Control-\</li>
<li>Start the application with HPROF enabled: java -agentlib:hprof=heap=dump <em>application</em></li>
<li>JConsole tool, MBeans tab</li>
<li>Start VM with -XX:+HeapDumpOnOutOfMemoryError; if OutOfMemoryError is thrown, VM generates a heap dump.</li>
</ul>
</li>
<li>Browse Java heap dump:
<ul>
<li>jhat <em>heap-dump-file</em></li>
</ul>
</li>
<li>Dump Java heap from core file in binary format to a file:
<ul>
<li>jmap -dump:format=b,file=<em>filename corefile</em></li>
</ul>
</li>
<li>Get a heap histogram for a process:
<ul>
<li>Start Java process with -XX:+PrintClassHistogram, then Control-\</li>
<li>jmap -histo <em>pid</em> (with -F option if <em>pid</em> does not respond)</li>
</ul>
</li>
<li>Get a heap histogram from a core file:
<ul>
<li>jmap -histo <em>corefile</em></li>
</ul>
</li>
<li>Print shared object mappings from a core file:
<ul>
<li>jmap <em>corefile</em></li>
</ul>
</li>
<li>Print heap summary from a core file:
<ul>
<li>jmap -heap <em>corefile</em></li>
</ul>
</li>
<li>Print finalization information from a core file:
<ul>
<li>jmap -finalizerinfo <em>corefile</em></li>
</ul>
</li>
<li>Print Java configuration information from a core file:
<ul>
<li>jinfo <em>corefile</em></li>
</ul>
</li>
<li>Print thread trace from a core file:
<ul>
<li>jstack <em>corefile</em></li>
</ul>
</li>
<li>Print lock information from a core file:
<ul>
<li>jstack -l <em>corefile</em></li>
</ul>
</li>
<li>Attach the command-line debugger to a core file on the same machine:
<ul>
<li>jdb -connect sun.jvm.hotspot.jdi.SACoreAttachingConnector:javaExecutable=<em>path</em>,core=<em>corefile</em></li>
</ul>
</li>
<li>Attach the command-line debugger to a core file on a different machine:
<ul>
<li>On the machine with the core file: jsadebugd <em>path corefile</em><br />
and on the machine with the debugger: jdb -connect sun.jvm.hotspot.jdi.SADebugServerAttachingConnector:debugServerName=<em>machine</em></li>
</ul>
</li>
<li>libumem can be used to debug memory leaks.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.goworkday.com/2010/10/05/java-process-debugging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How do you find out what’s classes are being stored in PermGen? Trace class loading/unloading</title>
		<link>http://www.goworkday.com/2010/09/20/how-do-you-find-out-what%e2%80%99s-classes-are-being-stored-in-permgen-trace-class-loadingunloading/</link>
		<comments>http://www.goworkday.com/2010/09/20/how-do-you-find-out-what%e2%80%99s-classes-are-being-stored-in-permgen-trace-class-loadingunloading/#comments</comments>
		<pubDate>Mon, 20 Sep 2010 17:24:54 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.goworkday.com/?p=282</guid>
		<description><![CDATA[<br/>PermGen holds the metadata about classes that have been loaded/created. This information is garbage collected like the other parts of the heap, however there are rough edges that can prevent this from happening, class loaders in particular. Generally, the amount of PermGen space needed is small in relation to the rest of the heap. How [...]]]></description>
			<content:encoded><![CDATA[<br/><p>PermGen holds the metadata about classes that have been loaded/created. This information is garbage collected like the other parts of the heap, however there are rough edges that can prevent this from happening, class loaders in particular. Generally, the amount of PermGen space needed is small in relation to the rest of the heap.</p>
<p>How do I know what classes are being loaded or unloaded? Use the command line options </p>
<p>-XX:+TraceClassLoading and -XX:+TraceClassUnloading .</p>
<p>If you suspect that that classloader isn&#8217;t the issue, use <strong>-verbose:class</strong> to investigate classes which have been loaded.  This, as it suggests, will be very verbose.</p>
<p><strong>How do you increase PermGen space?</strong></p>
<p>Increase using the -XX:MaxPermSize option.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.goworkday.com/2010/09/20/how-do-you-find-out-what%e2%80%99s-classes-are-being-stored-in-permgen-trace-class-loadingunloading/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java: Bin/Dec/Hex Conversion and Primitive Data Types</title>
		<link>http://www.goworkday.com/2010/03/19/java-primitive-data-types/</link>
		<comments>http://www.goworkday.com/2010/03/19/java-primitive-data-types/#comments</comments>
		<pubDate>Fri, 19 Mar 2010 15:59:32 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.goworkday.com/?p=236</guid>
		<description><![CDATA[<br/>﻿Conversion Table HEX DECIMAL BINARY 0 0 = 0+0+0+0 0000 1 1 = 0+0+0+1 0001 2 2 = 0+0+2+0 0010 3 3 = 0+0+2+1 0011 4 4 = 0+2+0+0&#160; 0100 5 5 = 0+4+0+1 0101 6 6 = 0+4+2+0 0110 7 7 = 0+4+2+1 0111 8 8 = 8+0+0+0 1000 9 9 = 8+0+0+1 1001 [...]]]></description>
			<content:encoded><![CDATA[<br/><p style="text-align: center;">﻿<span style="color: #990000;"><strong>Conversion Table</strong></span></p>
<table border="1" cellpadding="2" cellspacing="0" bordercolor="#000000" width="483">
<tr>
<td bgcolor="#CCCCCC" width="6"><b>HEX</b></td>
<td bgcolor="#CCCCCC" width="121"><b>DECIMAL</b></td>
<td bgcolor="#CCCCCC" width="197"><b>BINARY</b></td>
</tr>
<tr>
<td width="6">0</td>
<td width="121">0 = 0+0+0+0</td>
<td width="197">0000</td>
</tr>
<tr>
<td width="6">1</td>
<td width="121">1 = 0+0+0+1</td>
<td width="197">0001</td>
</tr>
<tr>
<td width="6">2</td>
<td width="121">2 = 0+0+2+0</td>
<td width="197">0010</td>
</tr>
<tr>
<td width="6">3</td>
<td width="121">3 = 0+0+2+1</td>
<td width="197">0011</td>
</tr>
<tr>
<td width="6">4</td>
<td width="121">4 = 0+2+0+0&nbsp;</td>
<td width="197">0100</td>
</tr>
<tr>
<td width="6">5</td>
<td width="121">5 = 0+4+0+1</td>
<td width="197">0101</td>
</tr>
<tr>
<td width="6">6</td>
<td width="121">6 = 0+4+2+0</td>
<td width="197">0110</td>
</tr>
<tr>
<td width="6">7</td>
<td width="121">7 = 0+4+2+1</td>
<td width="197">0111</td>
</tr>
<tr>
<td width="6">8</td>
<td width="121">8 = 8+0+0+0</td>
<td width="197">1000</td>
</tr>
<tr>
<td width="6">9</td>
<td width="121">9 = 8+0+0+1</td>
<td width="197">1001</td>
</tr>
<tr>
<td width="6">A</td>
<td width="121">10 = 8+0+2+0</td>
<td width="197">1010</td>
</tr>
<tr>
<td width="6">B</td>
<td width="121">11 = 8+0+0+1</td>
<td width="197">1011</td>
</tr>
<tr>
<td width="6">C</td>
<td width="121">12 = 8+4+0+0</td>
<td width="197">1100</td>
</tr>
<tr>
<td width="6">D</td>
<td width="121">13 = 8+4+0+1</td>
<td width="197">1101</td>
</tr>
<tr>
<td width="6">E</td>
<td width="121">14 = 8+4+2+0</td>
<td width="197">1110</td>
</tr>
<tr>
<td width="6">F</td>
<td width="121">15 = 8+4+2+1&nbsp;</td>
<td width="197">1111</td>
</tr>
</table>
<p style="text-align: center;">﻿<span style="color: #990000;"><strong>Data Types and Data Structures</strong></span></p>
<table cellspacing="1" bgcolor="#c0c0c0">
<tbody>
<tr>
<td style="text-align: center;"><span style="color: #000099;"><strong>Primitive Type</strong></span></td>
<td><span style="color: #000099;"><strong>Size</strong></span></td>
<td><span style="color: #000099;"><strong>Minimum Value</strong></span></td>
<td><span style="color: #000099;"><strong>Maximum Value</strong></span></td>
</tr>
<tr bgcolor="#e0e0e0">
<td><strong>char</strong></td>
<td>16-bit</td>
<td>Unicode 0</td>
<td>Unicode 2<sup>16</sup>-1</td>
</tr>
<tr bgcolor="#e0e0e0">
<td><strong>byte</strong></td>
<td>8-bit</td>
<td>-128</td>
<td>+127</td>
</tr>
<tr bgcolor="#e0e0e0">
<td><strong>short</strong></td>
<td>16-bit</td>
<td>-2<sup>15</sup><br />
<em>(-32,768)</em></td>
<td>+2<sup>15</sup>-1<br />
<em>(32,767)</em></td>
</tr>
<tr bgcolor="#e0e0e0">
<td><strong>int</strong></td>
<td>32-bit</td>
<td>-2<sup>31</sup><br />
<em>(-2,147,483,648)</em></td>
<td>+2<sup>31</sup>-1<br />
<em>(2,147,483,647)</em></td>
</tr>
<tr bgcolor="#e0e0e0">
<td><strong>long</strong></td>
<td>64-bit</td>
<td>-2<sup>63</sup><br />
<em>(-9,223,372,036,854,775,808)</em></td>
<td>+2<sup>63</sup>-1<br />
<em>(9,223,372,036,854,775,807)</em></td>
</tr>
<tr bgcolor="#e0e0e0">
<td><strong>float</strong></td>
<td>32-bit</td>
<td colspan="2">32-bit IEEE 754 floating-point numbers</td>
</tr>
<tr bgcolor="#e0e0e0">
<td><strong>double</strong></td>
<td>64-bit</td>
<td colspan="2">64-bit IEEE 754 floating-point numbers</td>
</tr>
<tr bgcolor="#e0e0e0">
<td><strong>boolean</strong></td>
<td>1-bit</td>
<td colspan="2"><tt>true</tt> or <tt>false</tt></td>
</tr>
<tr bgcolor="#e0e0e0">
<td><strong>void</strong></td>
<td>&#8212;&#8211;</td>
<td>&#8212;&#8211;</td>
<td>Void</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.goworkday.com/2010/03/19/java-primitive-data-types/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL 5.5 and Semisynchronous Replication Available</title>
		<link>http://www.goworkday.com/2009/12/15/mysql-5-5-and-semi-sync-replication-available/</link>
		<comments>http://www.goworkday.com/2009/12/15/mysql-5-5-and-semi-sync-replication-available/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 22:04:37 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.goworkday.com/?p=205</guid>
		<description><![CDATA[<br/>The new 5.5 is now available with &#8220;Semisynchronous Replication&#8221;. This comes as an addition to the built-in asynchronous replication. MySQL replication is asynchronous by default. Events written to the binary logs on the Master server being retrieved by the slave server(s). Unfortunately, the Master server has no knowledge of when the slave has retrieved or [...]]]></description>
			<content:encoded><![CDATA[<br/><p>The new 5.5 is now available with &#8220;Semisynchronous Replication&#8221;.  This comes as an addition to the built-in asynchronous replication.   MySQL replication is asynchronous by default. Events written to the binary logs on the Master server being retrieved by the slave server(s). Unfortunately, the Master server has no knowledge of when the slave has retrieved or processed these events.   As a result, when Master crashes, transactions committed on Master, might have not have been committed on the slave server(s). In other words, there is no guarantee that any event will ever reach any slave.</p>
<p>In case of  &#8220;Semisynchronous Replication&#8221;, the Master server blockes the transaction commit until at least one of the slave servers acknowledges the it has received all the events for that transaction.  Obviously, this is great for consistency, however it brings up questions about replication over the WWW which isn&#8217;t an uncommon practice.  In case of hitting the timeout limit (in case of no response from any of the slave servers), the Master server reverts back to asynchronous replication.</p>
<p>From MySQL support:</p>
<blockquote><p>
 To understand what the “semi” in “semisynchronous replication” means, compare it with asynchronous and fully synchronous replication:</p>
<p>    * With asynchronous replication, the master writes events to its binary log and slaves request them when they are ready. There is no guarantee that any event will ever reach any slave.<br />
    * With fully synchronous replication, when a master commits a transaction, all slaves also will have committed the transaction before the master returns to the session that performed the transaction. The drawback of this is that there might be a lot of delay to complete a transaction.<br />
    * Semisynchronous replication falls between asynchronous and fully synchronous replication. The master waits after commit only until at least one slave has received and logged the events. It does not wait for all slaves to acknowledge receipt, and it requires only receipt, not that the events have been fully executed and committed on the slave side.
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.goworkday.com/2009/12/15/mysql-5-5-and-semi-sync-replication-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

