<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1752200815996387623</id><updated>2011-04-21T20:48:33.799-07:00</updated><category term='operations'/><category term='design'/><category term='open source'/><category term='flex'/><category term='development'/><title type='text'>ls.comp</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://lscomp.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1752200815996387623/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://lscomp.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Lally</name><uri>http://www.blogger.com/profile/07538563521585080521</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1752200815996387623.post-323423519594053908</id><published>2008-06-02T18:52:00.003-07:00</published><updated>2008-06-02T18:52:58.294-07:00</updated><title type='text'>Torque CPU performance.</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;This could *significantly* reduce my CPU usage:&lt;br/&gt;&lt;br/&gt;From http://www.garagegames.com/blogs/3182/12447:&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Torque and CPU usage&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;Of all of the performance /&lt;br /&gt;scalability considerations of stock TGE 1.5, this was my first concern.&lt;br /&gt;A single dedicated server running on a very nice Linux box (Dual CPU /&lt;br /&gt;Dual Core 64 bit AMD Opteron with 2gb RAM) consumed over 50% of the&lt;br /&gt;CPU... and that was an empty server!&lt;br/&gt;&lt;br/&gt;The problem is that&lt;br /&gt;although on the surface the engine appears event driven, it's actually&lt;br /&gt;polling the event queue instead of waiting on the event queue and it&lt;br /&gt;has a sleep() that essentially makes it poll once per tick (1/32 of a&lt;br /&gt;second). The problem is the stock sleep implementation turned into a&lt;br /&gt;sleep(0), which essentially did nothing except give up the current time&lt;br /&gt;slice and made the game engine run in a fairly tight loop.... this is&lt;br /&gt;ok if you're running a single zone server per CPU, but if you're&lt;br /&gt;wanting to run 10 zones on a dual CPU box then... well... it's not&lt;br /&gt;going to happen.&lt;br/&gt;&lt;br/&gt;The quick fix is to re-implement sleep() so&lt;br /&gt;that it sleeps for the appropriate amount of time. An empty server&lt;br /&gt;takes negligible CPU, and a decently loaded server only takes about 5%&lt;br /&gt;of the CPU... awesome!&lt;br/&gt;&lt;br/&gt;Long-term fix is to eliminate the polling&lt;br /&gt;and make everything event driven, although at the moment it doesn't&lt;br /&gt;appear that this solution is required. You'll end up running out of&lt;br /&gt;memory before you run out of CPU cycles (10 zones on a single box&lt;br /&gt;pretty much chews up all 2gb of RAM).&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1752200815996387623-323423519594053908?l=lscomp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lscomp.blogspot.com/feeds/323423519594053908/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1752200815996387623&amp;postID=323423519594053908' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1752200815996387623/posts/default/323423519594053908'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1752200815996387623/posts/default/323423519594053908'/><link rel='alternate' type='text/html' href='http://lscomp.blogspot.com/2008/06/torque-cpu-performance.html' title='Torque CPU performance.'/><author><name>Lally</name><uri>http://www.blogger.com/profile/07538563521585080521</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1752200815996387623.post-3029348429511282598</id><published>2007-10-19T07:57:00.000-07:00</published><updated>2007-10-19T07:58:34.034-07:00</updated><title type='text'>Torque on OpenSolaris</title><content type='html'>&lt;p&gt;Just got it running.  SXDE 9/07, Sun Ultra 40 M2.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;What I needed:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;  &lt;li&gt; Solaris 10, Developer Edition (This is called SXDE for short)&lt;/li&gt;&lt;br /&gt;  &lt;li&gt; The Torque game engine&lt;/li&gt;&lt;br /&gt;  &lt;li&gt; pkg-get &lt;/li&gt;&lt;br /&gt;  &lt;li&gt; patience &lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;The main gotchas:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt; You'll need a new SDL.  &lt;tt&gt;pkg-get -i libsdl&lt;/tt&gt;&lt;/li&gt;&lt;br /&gt; &lt;li&gt; You'll need OpenAL. &lt;tt&gt;pkg-get -i openal&lt;/tt&gt;&lt;/li&gt;&lt;br /&gt; &lt;li&gt; &lt;tt&gt;cpp -dM&lt;/tt&gt; will show you that 'sun' is defined by the preprocesser.  You'll have to modify the code to &lt;tt&gt;#ifdef sun/#undef sun/#endif&lt;/tt&gt; in a few places.  Just let the error messages guide you.&lt;/li&gt;&lt;br /&gt; &lt;li&gt; The Makefile's pretty close to the standard &lt;tt&gt;conf.UNIX.mk&lt;/tt&gt;&lt;/li&gt;&lt;br /&gt; &lt;li&gt; &lt;tt&gt;nasm&lt;/tt&gt; (you'll have to make &amp;#38; install that, but it's literally configure ; make &amp;#38;&amp;#38; make install) will need &lt;tt&gt;-f elf -dLINUX&lt;/tt&gt; to do what you want correctly.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1752200815996387623-3029348429511282598?l=lscomp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lscomp.blogspot.com/feeds/3029348429511282598/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1752200815996387623&amp;postID=3029348429511282598' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1752200815996387623/posts/default/3029348429511282598'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1752200815996387623/posts/default/3029348429511282598'/><link rel='alternate' type='text/html' href='http://lscomp.blogspot.com/2007/10/torque-on-opensolaris.html' title='Torque on OpenSolaris'/><author><name>Lally</name><uri>http://www.blogger.com/profile/07538563521585080521</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1752200815996387623.post-6636010391077418605</id><published>2007-10-07T22:40:00.000-07:00</published><updated>2007-10-07T22:43:45.647-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='open source'/><category scheme='http://www.blogger.com/atom/ns#' term='operations'/><title type='text'>OpenSolaris: A better model for open-source support</title><content type='html'>&lt;p&gt;One real problem with many support vendors for open source software is that they're not the original authors.  The obvious problem is that they may not know what they're really doing, and may end up hacking up a solution that hurts other aspects of the system.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The less-obvious problem is that the changes may not get pushed upstream.  If the author of the software doesn't care about your problem domain (e.g. Linux for anything &lt;i&gt;but&lt;/i&gt; big iron), your changes may very well be ignored on the further release.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The real problem is power: you don't really have any.  There aren't any strings to pull.  The common phrase is "nobody to sue," but the real truth is "no accounts to cancel."  Without hitting someone's wallet, they don't need to care about you.  No matter how much you need this system to work, there's not much you can do to make it fit your needs better than prayer.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;There are third-party vendors who will offer you support.  They'll take a version of the open source product you need and they'll make sure it works with your stuff.  But, you'll have to pay for the work to be redone every time the system changes.  They're the wrong people.  It's like complaining to your mistress about your wife &amp;mdash; you feel better about it, but it doesn't do anything about your problems.  &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="footnote"&gt;&lt;br /&gt;&lt;p&gt;Something lots of open-source kids don't get: &lt;i&gt;it's ok to pay for software&lt;/i&gt;.  Because some software's free makes it bad for other stuff to cost money.  They shove the word &lt;i&gt;proprietary&lt;/i&gt; on there, to make that point.  &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Of course, these kids are idiots.  Throwing money in the picture doesn't automatically make software less good.&lt;/p&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Paying money gets you something.  It's a string on the vendor.  They like your money, they want it again.  Hell they've probably promised their investors 300% returns based on the assumption that you'll pay them more later.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Which is why I like the OpenSolaris model.  Pay Sun to get OpenSolaris to do what you want, and the next version of OpenSolaris will do what you want.  You attach that green paper string to the right place.  That string will take pulls as long as you've made it thick enough.   When you're doing $5 million a year in operations, a couple thousand is really, really cheap insurance.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;A &lt;i&gt;lot&lt;/i&gt; better than paying IBM to fix Linux &lt;i&gt;again&lt;/i&gt; for you.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;!-- technorati tags start --&gt;&lt;p style="text-align:right;font-size:10px;"&gt;Technorati Tags: &lt;a href="http://www.technorati.com/tag/operations" rel="tag"&gt;operations&lt;/a&gt;, &lt;a href="http://www.technorati.com/tag/open source" rel="tag"&gt;open source&lt;/a&gt;&lt;/p&gt;&lt;!-- technorati tags end --&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1752200815996387623-6636010391077418605?l=lscomp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lscomp.blogspot.com/feeds/6636010391077418605/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1752200815996387623&amp;postID=6636010391077418605' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1752200815996387623/posts/default/6636010391077418605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1752200815996387623/posts/default/6636010391077418605'/><link rel='alternate' type='text/html' href='http://lscomp.blogspot.com/2007/10/opensolaris-better-model-for-open.html' title='OpenSolaris: A better model for open-source support'/><author><name>Lally</name><uri>http://www.blogger.com/profile/07538563521585080521</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1752200815996387623.post-868251317823515871</id><published>2007-03-02T20:15:00.000-08:00</published><updated>2007-03-02T20:55:28.661-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='flex'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='design'/><title type='text'>Flex</title><content type='html'>Designing good software's hard for many reasons.  The essence of a good design is a good mix of &lt;span style="font-style:italic;"&gt;flex&lt;/span&gt; and &lt;span style="font-style:italic;"&gt;constraints&lt;/span&gt;.  &lt;br /&gt;&lt;br /&gt;Think of them as muscle and bone tissue.  The constraints are hardpoints that give you leverage, while the muscles move those hardpoints into different configurations.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Using Flex During Development&lt;/span&gt;&lt;br /&gt;Early in a system's development, you have all the speed you want, with very little existing code to pull around.  This is a great time to intentionally overflex.  Specifically, design interfaces and data structures to be excessively simple and flexible, with the understanding that you'll have to tie them down more later.&lt;br /&gt;&lt;br /&gt;For example, lots of my early designs are little more than elaborate combinations of Hashtables and simple structures like this:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;public class Entry {&lt;br /&gt;&amp;nbsp;&amp;nbsp;String name;&lt;br /&gt;&amp;nbsp;&amp;nbsp;Hashtable&amp;lt;java.lang.Class, Object&amp;gt; attributes;&lt;br /&gt;&amp;nbsp;&amp;nbsp;Hashtable&amp;lt;String,Entry&amp;gt; children;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I don't know what stuff I'm shoving into &lt;tt&gt;Entry&lt;/tt&gt; yet, so I just key it by its type, which will be some interface the object implements.&lt;br /&gt;&lt;br /&gt;Later on, I'll look at what interface classes I've implemented that end up in &lt;tt&gt;attributes&lt;/tt&gt; and start adding specific members for them as needed.  When I'm pretty sure it's going well, I'll try commenting out &lt;tt&gt;attributes&lt;/tt&gt; and seeing what still complains.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="footnote"&gt;&lt;br /&gt;Reflection and even plain C++ RTTI can come in really useful for this sort of stuff.&lt;br /&gt;&lt;br /&gt;The &lt;tt&gt;Entry&lt;/tt&gt; nicely builds a hierarchy.  How about we try and serialize this into XML?  Put out an &lt;tt&gt;&amp;lt;entry&amp;gt;&lt;/tt&gt; tag with a &lt;tt&gt;name&lt;/tt&gt; attribute, and then normalize the &lt;tt&gt;Class&lt;/tt&gt; names and use them as attribute names, with the &lt;tt&gt;Object.toString()&lt;/tt&gt; method as the value.  Shove the children inside and you've got something you can manipulate.&lt;br /&gt;&lt;br /&gt;Or, replace &lt;tt&gt;Entry&lt;/tt&gt; with a normal DOM node and play with XPath, XQuery, and XSLT to do your work for you.  Compiling an XSLT into a class and then running it against your data structure's not a bad way to go.  Frankly I'd stick with the DOM approach until I was sure I couldn't get away with it.  A few minutes playing with ways to hack the design around this decision can make a go/no-go decision for me.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The big point behind this is not to commit to any design before I know what's going on.  Software development's an exploratory process, so there's no point in getting overcommitted early when I'm sure I'll have to change it later.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1752200815996387623-868251317823515871?l=lscomp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lscomp.blogspot.com/feeds/868251317823515871/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1752200815996387623&amp;postID=868251317823515871' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1752200815996387623/posts/default/868251317823515871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1752200815996387623/posts/default/868251317823515871'/><link rel='alternate' type='text/html' href='http://lscomp.blogspot.com/2007/03/flex.html' title='Flex'/><author><name>Lally</name><uri>http://www.blogger.com/profile/07538563521585080521</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
