Skip to content

Archive

Tag: sun

Today was my first time ever playing paintball!! I’ve always wanted to play paintball and perked up when Carina offered me the opportunity; by asking me to join her team for the Paintball Tournament in the Monash Extreme Sports Carnival. I only had to pay a joining fee of RM24 and joined a team of 5.

So this morning I woke up nice and early (6:40 a.m), it’s been quite awhile that I woke up before the sunrise and it’s quite nice to smell the morning cold air smell. Haha!! never mind if you don’t know what I’m talking about. I met up with Carina at Sun-U Residence and we both walked to Monash together.
Jee Kit drove past me while I was waiting at Sun-U with his carload of people, and they stopped to say hi before they headed off for our W31 CG Picnic at Lake Gardens WITHOUT ME. For a moment I really wanted to ask Jee Kit to squeeze me in too!!I wish I could have joined you guys at Lake Gardens!!!!!

Anyway, Carina and I met up with our team in the Monash field. I actually met the other team members for the first time YESTERDAY. So here are my awesome team members:

All amateurs playing paintball for first time. We went to register and were given forms to sign (they basically say : “I won’t hold anyone responsible if I die during the paintball match) and were given a short briefing from a member of the Malaysian Paintball Referee Organisation (MPRO). Learned some basic stuff on rules and regulations. even infamous cheating tactics. quite informative. Then all 15 teams were told to go to the paintball battle area:-

15 teams. and majority (like 80%) were GUYS. there was absolutely NO all-girls team and our team were one of the few with more girls than guys. I amused myself looking at the team name list while waiting for our turn:-

Syok-ness. My clothes were super drenched with sweat and I could feel my whole body as if it was ‘flushed’ and hot. Paintball is good exercise!!! comes with a price though…I was warned beforehand by several people of the BRUISES I would get. well, when I got back to my room and showered, I felt my person carefully and counted my bruises. I have more than I thought I had. =.= Ahh..since I have them. I shall proudly show you one of my ’souvenirs’ from my first ever paintball tourney:-

(It looks even more ugly in real life now)

My first ever PAINTBALL tourney @ Monash Extreme Sports Carnival

n COLUMN Posted By AL OLEKSUIK Posted 21 days ago

Spring is like an emotional rollercoaster. one day brings us the promise of things to come with warm temperatures and sunny skies. Everyone is smiling and life is good. the next day is dull and gray, the temperature has plunged and there is ice on your windshield. People are grumpy and less than amused by this turn of events.

It is a lot like that advertisement where the mean banker lets a little kid play with a truck and then snatches it away. we all feel a bit like the little kid on those dark days. well, we’ve been through this before, like every year, and we’ll go through it again. I have a theory that this is one of the things that makes us Canadians such a tolerant people.

We have just passed the spring “equinox” and combined with the daylight savings change many people are a little out of balance. it can take a week or two for some of us to adjust to the time change and the longer days. the equinox is that magical time when the sun is lined up directly with the Earth’s equator. This means the hours of daylight and darkness are pretty much the same. the name “equinox” is a simple combination of two Latin words, aequus (equal) and nox (night).

In many cultures, ours included, this is considered the cosmic turning point from one season to the next. there should be a warning attached to this date though as mother nature may choose to ignore this man-made time table. it should state that, weather conditions may vary, use caution when traveling outdoors and don’t put away your mittens and ice scraper just yet.

The name “Spring” reflects the natural activities that take place at this time of the year. it is a time of rebirth, renewal and the springing forth of plants and new life.

In the southern hemisphere, spring equinox arrives in September. In centrally located areas there is no such season. during a recent visit to Costa Rica, I discovered the seasons were described by the locals in two terms. there is the rainy or wet season and there is the sunny or dry season, that’s it. Most had never seen snow and they had no interest in visiting a place that was cold and snowy. They had no problem understanding why we wanted to visit their country.

There are some fairly obvious signs that the spring season has arrived in Niagara. Those winterized boats are finding themselves out of hibernation and back in the water. there is activity at the local boat launches where some guys are making sure everything is shipshape and others are heading out for some early trout or perch fishing. New boat owners are testing their equipment and chomping at the bit to get out on the water.

The Toronto Sportsmen’s show, which should probably be called the Toronto Sportsperson’s show, has already taken place. If you missed it don’t despair. Local shops like, Erie Tracker Outfitters in Port Colborne, Fishin Niagara in Fort Erie and Peter’s Tackle and Bait in Port Dalhousie have everything you need for an early start. the Niagara Outdoor show is back again this year bigger and better than ever. Organizer bill Whitehead puts this event together and it offers something for everyone. there are dozens of vendors, displays and seminars at this two day show.

Held at the Optimist club on Morrison Street in Niagara Falls on April 3 and April 4, this show has fishing, archery, hunting, paintball and numerous other outdoor activities covered.

What else tells us that spring has arrived in Niagara? there are a few seasonal events unique to the Niagara Region. one is the removal of the ice-boom in Fort Erie. it is going, going and gone. While this isn’t the earliest ever, it is early. I looked at aerial photos of Lake Erie and was able to see most of the ice is already gone and the rest won’t be far behind. we won’t have two weeks of ice flowing down the Niagara River cooling things down this year.

The operators of the Maid of the Mist are well aware of this situation which is why they have already begun launching their boars for another season. That’s number two. the third event is the opening of the gates at the entrance to the Welland river (Chippawa Creek) by Ontario Power Generation. This allows boaters access to the Niagara River.

Signs of spring abound

Last July, a friend of mine called to tip me off about an upcoming water gun assassination tournament. I was swamped at work when he called, crimping duvets for a big Neiman Marcus order—but seconds later I was on the tournament’s website, reading the requirements for entry. by midnight I was in the back of a GMC Envoy, paying my entrance fee to a man in mirrored sunglasses. this was the founder of Street Wars, a large, menacing guy who apparently wanted his players to understand, from the start, that this tournament was not a children’s backyard affair.

He snatched the money out of my hand. then he asked me for my phone number, my home and work addresses, my e-mail address, and two current photos—all of which another player would use to hunt me down like a predator. I’d come prepared with this information, but the notion of giving it to a man double parked in the Meatpacking District didn’t feel right. I gazed out the truck’s tinted window, evaluating my situation while a pack of whooping frat boys disappeared into Hogs and Heifers. Relishing the slim possibility that one of them might be in the tournament, I gave him everything I had.

As it turned out, my target was a sun-kissed, twenty-four-year old Hawaiian paralegal. K lived in a five-story walk-up in the east 30’s, and worked an evening shift in the Conde Nast building in Times Square. as far as I could tell from the Polaroids, her skin was as smooth as a sea stone. in one picture she wore a sun dress with frayed spaghetti straps; in the other a faded lacrosse uniform that hung over her like a sheet. in both her eyes seemed to well with hope.

The man told me I’d have to soak her by the end of the first week in order to advance. then he said that if my assassin (whom I would not be given a photo of) nailed me, I’d have to surrender K’s information and forfeit the contest. we shook hands like old associates before I hopped out of the truck, onto a street that teemed with drunk people strutting like roosters from restaurants and bars.

For the first time since I’d moved to new York, I studied each of them.

I hadn’t done anything like this since my first attempt at college. About ten years ago, I fell for a girl in an early morning general requirement class called “The Experience of Music.” The little I knew about Barbara was that she looked like a cheetah, drank a case of Cherry Coke every week, and majored in Human Nutrition. “A fine major,” I muttered as I bent down below the kitchen sink, lugging out the White Pages to find out where she lived. Minutes later I was on the road.

I constantly assured myself that I wasn’t stalking her, even as I raced through a red light and slammed into a cab, which was stunningly more battered than my ‘90 Tempo. The cabbie poked his head of out the window as if he were an ancient mud turtle looking for food. we exchanged personal information and clattered off on our respective journeys. I eventually made it to Barbara’s house, a tiny Chicago bungalow strangled with Christmas lights, but I never left my car. A week later our music teacher said we’d be taking a closer look at the songwriting in “Muppets take Manhattan”, at which point Barbara grabbed her book bag and her soda can and walked out the door.

The e-mail I sent K mostly conveyed a hope that one day I’d get to see her, preferably while discharging a hard, pencil-thin stream of sink water onto her chest. she responded almost instantly, confessing that I’d made her laugh in her cubicle. she sounded almost desperate in her response, concluding her email with a plea for my spray. this was not the response I was shooting for. I’d tried to rattle her cage by invoking the voice of a stalker; instead she responded like someone who’d paid ten dollars to get stalked.

I, on the other hand, was trying to avoid my assassin at all costs. to get into work I’d sneak in through my building’s rarely used freight entrance. The freight elevator had been out of service for years, owing its disrepair to a pair of brawling bootleggers who inadvertently knocked the shoddy door back and plunged four stories through the shaft. Both men died on impact with the lift car. Firefighters used saber saws to deliver the bodies from the steel.

Nights I spent at my girlfriend’s apartment. I did this because no one affiliated with the tournament had her address. But after three days without so much as a phone call or an email, I wondered whether the extreme efforts I was taking to avert my assassin were even necessary.

“Why isn’t anyone trying to stalk me?” I asked my girlfriend.

“Sweetheart,” she said, slapping a nicotine patch on her thigh, “not everyone is going to be as into this thing as your desperate Hawaiian girl.”

It isn’t easy to keep a low profile in new York while trotting with a plastic bazooka the color of rainbow sherbet. Oftentimes I had no choice. even though I tried to keep my gun wrapped in plastic in my book bag, it still leaked through the bag and soaked my books. this pretty much summarized the effect that Street Wars took on my life. I was getting up early, jogging backwards to the subway with my hand on the pump. I was dozing off at work and school after lengthy evening stakeouts. I took cabs during my lunch break to K’s Murray Hill apartment, hoping to catch her on her way to work. I even had friends from across the country call her around the clock, to warn her of impending rains. she flirted with one of them to the extent that he actually considered leaving both his wife and his Irish wolfhound to move to new York.»

The Cry of the Water Wolf–a water gun assassination tournament

Submitted by Charles Nutter on Mon, 03/01/2010 – 18:58.

JRuby has become notorious among Ruby implementations for having a slow startup time. Some of this is the JVM’s fault, since it doesn’t save JIT products and often just takes a long time to boot and get going. Some of this is JRuby’s fault, though we work very hard to eliminate startup bottlenecks once they’re reported and diagnosed. but a large number of startup time problems stem from simple configuration issues. Here’s a few tips to help you improve JRuby’s startup time.
(Note: JRuby actually does pretty well on base startup time compared to other JVM languages; but MRI, while generally not the fastest Ruby impl, starts up incredibly fast.)
Make sure you’re running the client JVM
This is by far the easiest way to improve startup. On HotSpot, the JVM behind OpenJDK and Sun’s JDK, there are two different JIT-compiling backends: “client” and “server”. the “client” backend does only superficial optimizations to JVM code as it compiles, but compiles things earlier and more quickly. the “server” backend performs larger-scale, more-global optimizations as it compiles, but takes a lot longer to get there and uses more resources when it compiles.
Up until recently, most JVM installs preferred the “client” backend, which meant JVM startup was about as fast as it could get. Unfortunately, many newer JVM releases on many operating systems are either defaulting to “server” or defaulting to a 64-bit JVM (which only has “server”). This means that without you or JRuby doing anything wrong, startup time takes a major hit.
Here’s an example session showing a typical jruby -v line for a “server” JVM and the speed of doing some RubyGems requires (which is where most time is spent booting a RubyGems-heavy application):~/projects/jruby ➔ jruby -v
jruby 1.5.0.dev (ruby 1.8.7 patchlevel 174) (2010-03-01 6857a4e) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_17) [x86_64-java]

~/projects/jruby ➔ time jruby -e “require ‘rubygems’; require ‘active_support’”

real 0m5.174s
user 0m7.643s
sys 0m0.422s

~/projects/jruby ➔ time jruby -e “require ‘rubygems’; require ‘active_support’”

real 0m5.068s
user 0m7.662s
sys 0m0.449sOuch, over 5 seconds just to boot RubyGems and load ActiveSupport. You can see in this case that the JVM is preferring the “64-Bit Server VM”, which will give you great runtime performance but pretty dismal startup time. if you see this sort of -v output, you can usually force the JVM to run in 32-bit “client” mode by specifying “-d32″ as a JVM option. Here’s an example using an environment variable:~/projects/jruby ➔ export JAVA_OPTS=”-d32″

~/projects/jruby ➔ time jruby -e “require ‘rubygems’; require ‘active_support’”

real 0m2.320s
user 0m2.583s
sys 0m0.207s

~/projects/jruby ➔ time jruby -e “require ‘rubygems’; require ‘active_support’”

real 0m2.275s
user 0m2.580s
sys 0m0.207sOn my system, a MacBook Pro running OS X 10.6, switching to the “client” VM improves this scenario by well over 50%. You may also want to try the “-client” option alone or in combination with -d32, since some 32-bit systems will still default to “server”. Play around with it and see what works for you, and then let us know your platform, -v string, and how much improvement you see.
Regenerate the JVM’s shared archive
Starting with Java 5, the HotSpot JVM has included a feature known as Class Data Sharing (CDS). Originally created by Apple for their OS X version of HotSpot, this feature loads all the common JDK classes as a single archive into a shared memory location. Subsequent JVM startups then simply reuse this read-only shared memory rather than reloading the same data again. It’s a large reason why startup times on Windows and OS X have been so much better in recent years, and users of those systems may be able to ignore this tip.
On Linux, however, the shared archive is often *never* generated, since installers mostly just unpack the JVM into its final location and never run it. in order to force your system to generate the shared archive, run some equivalent of this command line:headius@headius-desktop:~/jruby$ sudo java -Xshare:dump
Loading classes to share … done.
Rewriting and unlinking classes … done.
Calculating hash values for String objects .. done.
Calculating fingerprints … done.
Removing unshareable information … done.
Moving pre-ordered read-only objects to shared space at 0×94030000 … done.
Moving read-only objects to shared space at 0×9444bef8 … done.
Moving common symbols to shared space at 0×9444d870 … done.
Moving remaining symbols to shared space at 0×945154e0 … done.
Moving string char arrays to shared space at 0×94516118 … done.
Moving additional symbols to shared space at 0×945ac5b0 … done.
Read-only space ends at 0×94612560, 6169952 bytes.
Moving pre-ordered read-write objects to shared space at 0×94830000 … done.
Moving read-write objects to shared space at 0×94ea64a0 … done.
Moving String objects to shared space at 0×94ee3708 … done.
Read-write space ends at 0×94f27448, 7304264 bytes.
Updating references to shared objects … done. for many users, this can make a tremendous difference in startup time, since all that extra class data remains available in memory. You may need to specify the -d32 or -client options along with the -Xshare option. Play with those and the other -Xshare modes to see if it helps your situation.
Delay or disable JRuby’s JIT
An interesting side effect of JRuby’s JIT is that it sometimes actually slows execution for really short runs. the compiler isn’t free, obviously, nor is the cost of loading, verifying, and linking the resulting JVM bytecode. if you have a very short command that touches a lot of code, you might want to try disabling or delaying the JIT.
Disabling is easy: pass the -X-C flag or set the jruby.compile.mode property to “OFF”:~/projects/jruby ➔ time jruby -S gem install rake
Successfully installed rake-0.8.7
1 gem installed
Installing ri documentation for rake-0.8.7…
Installing RDoc documentation for rake-0.8.7…

real 0m13.188s
user 0m12.342s
sys 0m0.685s

~/projects/jruby ➔ time jruby -X-C -S gem install rake
Successfully installed rake-0.8.7
1 gem installed
Installing ri documentation for rake-0.8.7…
Installing RDoc documentation for rake-0.8.7…

real 0m12.590s
user 0m12.342s
sys 0m0.583sThis doesn’t generally give you a huge boost, but it can be enough to keep you from going mad.
Avoid spawning “sub-rubies”
It’s a fairly common idiom for Rubyists to spawn a Ruby subprocess using Kernel#system, Kernel#exec, or backquotes. for example, you may want to prepare a clean environment for a test run. that sort of scenario is perfectly understandable, but spawning many sub-rubies can take a tremendous toll on overall runtime.
When JRuby sees a #system, #exec, or backquote starting with “ruby”, we will attempt to run it in the same JVM using a new JRuby instance. Because we have always supported “multi-VM” execution (where multiple isolated Ruby environments share a single process), this can make spawning sub-Rubies considerably faster. This is, in fact, how JRuby’s Nailgun support (more on that later) keeps a single JVM “clean” for multiple JRuby command executions. but even though this can improve performance, there’s still a cost for starting up those JRuby instances, since they need to have fresh, clean core classes and a clean runtime.
The worst-case scenario is when we detect that we can’t spin up a JRuby instance in the same process, such as if you have shell redirection characters in the command line (e.g. system ‘ruby -e blah > /dev/null’). in those cases, we have no choice but to launch an entirely new JRuby process, complete with a new JVM, and you’ll be paying the full zero-to-running cost.
If you’re able, try to limit how often you spawn “sub-rubies” or use tools like Nailgun or spec-server to reuse a given process for multiple hits.
Do less at startup
This is a difficult tip to follow, since often it’s not your code doing so much at startup (and usually it’s RubyGems itself). One of the sad truths of JRuby is that because we’re based on the JVM, and the JVM takes a while to warm up, code executed early in a process runs a lot slower than code executed later. Add to this the fact that JRuby doesn’t JIT Ruby code into JVM bytecode until it’s been executed a few times, and you can see why cold performance is not one of JRuby’s strong areas.
It may seem like delaying the inevitable, but doing less at startup can have surprisingly good results for your application. if you are able to eliminate most of the heavy processing until an application window starts up or a server starts listening, you may avoid (or spread out) the cold performance hit. Smart use of on-disk caches and better boot-time algorithms can help a lot, like saving a cache of mostly-read-only data rather than reloading and reprocessing it on every boot.
Try using Nailgun
In JRuby 1.3, we officially shipped support for Nailgun. Nailgun is a small library and client-side tool that reuses a single JVM for multiple invocations. with Nailgun, small JRuby command-line invocations can be orders of magnitude faster. Have a look at my article on Nailgun in JRuby 1.3.0 for details.
Nailgun seems like a magic bullet, but unfortunately it does little to help certain common cases like booting RubyGems or starting up Rails (such as when running tests). It also can’t help cases where you are causing lots of sub-rubies to be launched. your best bet is to give it a try and let us know if it helps.
Play around with JVM flags
There’s scads of JVM flags that can improve (or degrade) startup time. for a good list of flags you can play with, see my article on my favorite JVM flags, paying special attention to the heap-sizing and GC flags. if you find combinations that really help your application start up faster, let us know!
Help us find bottlenecks
The biggest advances in startup-time performance have come from users like you investigating the load process to see where all that time is going. if you do a little poking around and find that particular libraries take unreasonably long to start (or just do too much at startup) or if you find that startup time seems to be limited by something other than CPU (like if your hard drive starts thrashing madly or your memory bus is being saturated) there may be improvements possible in JRuby or in the libraries and code you’re loading. Dig a little…you may be surprised what you find.
Here’s a few JRuby flags that might help you investigate:

  • –sample turns on the JVM’s sampling profiler. It’s not super accurate, but if there’s some egregious bottleneck it should rise to the top.
  • -J-Xrunhprof:cpu=times turns on the JVM’s instrumented profiler, saving profile results to java.hprof.txt. This slows down execution tremendously, but can give you more accurate low-level timings for JRuby and JDK code.
  • -J-Djruby.debug.loadService.timing=true turns on timing of all requires, showing fairly accurately where boot-time load costs are heaviest.
  • On Windows, where you may not have a “time” command, pass -b to JRuby (as in ‘jruby -b …’) to print out a timing of your command’s runtime execution (excluding JVM boot time).

Let us help you!
Sometimes, there’s an obvious misconfiguration or bug in JRuby that causes an application to start up unreasonably slowly. if startup time seems drastically different than what you’ve seen here, there’s a good chance something’s wrong with your setup. Post your situation to the JRuby mailing list or find us on IRC, and we (along with other JRuby users) will do our best to help you.

JRuby Startup Time Tips

StatPress TopPosts

SEO Powered by Platinum SEO from Techblissonline