Skip to content

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

The first of those will be the 3-Man Beginners’ Tournament this Saturday.

“It’s an exhilarating experience, really,” says Stephen Sharpe, 21, who will compete in the event. “I’ve been in a couple of tournaments before. You have to have an objective, a game plan. You can’t just run out there and shoot at everybody. somebody has to take care of their assigned target. in a way it’s like football, take your man and eliminate it. That’s what you’re going for, the last man standing.”

The Alabama Challenge Event Series on Sunday, March 7, will not only bring teams from all around the state of Alabama but likely nearby states like Mississippi and Georgia. It’s part of a circuit event where participants compete throughout the course of the year to accumulate points, similar to the points system in a sport like NASCAR, where the person with the most points at the end wins the tournament series.

“It’s a points-based system, which basically means you’re going to have a flag at every game,” said Jonathan Sharpe, owner of West Alabama Paintball Supply and a Splat Zone partner with owner Mark Mixon. “It’s not like a capture-the-flag scenario, but you’ll have points for eliminations, points for grabbing the flag, and points for hanging the flag.”

The ACES is a three-on-three elimination tournament.

“It’s going to have the more advanced players,” said Jonathan Sharpe. “The beginners are going to be newer players with regular equipment. the ACES will have a novice level and an amateur level. it will have more experienced players and high tech gear, and it’s a bit faster-paced.

“The ACES tournaments will have more advanced teams, with sponsored headbands and all kinds of equipment. a beginners’ tournament is to peak the interest of some of the newer people, to help get them involved in some of the bigger tournaments if they want to do so.”

Among the locals competing in the ACES tournament is Tuscaloosa’s Kyle Foster, who placed first in a tournament in North Alabama earlier this month.

“I like the adrenaline rush and the competition. I just love it,” said Foster, who says he has competed in hundreds of tournaments in his eight years participating in the sport. “It’s not something just anybody can pick up. it takes strategy, it takes skill.”

The speedball field, consisting of man-made bunkers, and the airball field, with inflatable bunkers, will both be utilized. Ages of participants could range anywhere from 10 to 50. Organizers expect 10-15 teams in each event.

The tournaments will be held in Cottondale at Splat Zone and begin at 9 a.m. with a captain’s meeting where the rules and specifications will be addressed. Competition immediately follows.

There is no admission to watch. Cost of the ACES tournament is $120 per team. Cost to participate in the 3-Man Beginner’s Tournament is $90 per team, with that tournament’s proceeds donated to Global Expeditions to help fund an education-based mission trip to Australia for a local youth, Terah Mixon.

“These tournaments are a great way to introduce people to the game,” said Jonathan Sharpe, whose competitive background in the sport includes the ACES and playing on a college paintball team. “We want to let everyone know that paintball is here in this area, and it’s a big deal for the youths. We’re trying to rebuild it as a sport around here. we want to provide the youth here with an outlet and get them involved in the sport.”

Cottondale paintball field to host two tournaments

S-Thunder Limited (s-thunder.com) is pleased to announce that its product line of paintball markers, airsoft landmines, airsoft grenades and CO2 accessories are now available in the United Kingdom and United States at the following,

USA Distributor:
Evike.com inc.
136 S. San Gabriel Blvd.
San Gabriel, CA 91176
United States
email – sales@evike.com
website – evike.com

S-Thunder is proud to include Evike.com in its growing distribution network offering S-Thunder’s complete product line of airsoft grenades, landmines and paintball markers in the United States. Evike.com has a strong and increasing presence in the North American marketplace and S-Thunder is proud to associate themselves with Evike.com.

United Kingdom Distributor:
Airsoft World ltd.
Unit 3-5, Lochgelly Ind. Est.
Auchterderran Road,
Lochgelly, Fife KY5 9H2
Scotland, UK
email – info@airsoftworld.net
website – airsoftworld.net

Yu-Hon Li, Director – Business Development makes special note that “with Airsoft World’s recent awarding of the exclusive distribution rights to KWA’s line of high-end airsoft guns throughout the United Kingdom and due to the fact Airsoft World will be actively marketing themselves, the KWA line and its many other product lines to dealers in the UK and throughout Europe, S-Thunder are sure to gain a side benefit from Airsoft World’s efforts in broadening its exposure and service to new and current dealers. Furthermore, we feel S-Thunder is a complimentary ‘professional line’ to KWA’s whereby Airsoft World will offer a highly beneficial one-stop-shop of high quality airsoft guns, landmines and grenades to dealers in the United Kingdom and beyond its borders..”.

S-Thunder is in discussions with several organizations worldwide and expects to announce product availability in the coming months in markets including,

- Germany
- Austria
- Switzerland
- Spain
- Ireland
- Taiwan
- Russia

Visit s-thunder.com for more information or youtube.com/sthundertv for product demonstration videos.

COMPANY BACKGROUND
S-Thunder offers high quality & durable paintball and airsoft products. Our product line is designed, engineered and manufactured at S-Thunder’s manufacturing facility in Hong Kong and the manufacturing savings are passed to our customers.

S-Thunder was formed by a group of industrial designers, engineers, manufacturers and marketers who are also war game hobbyists. during their years as players, they also became skilled in modifying and enhancing the performance and accuracy of war games airsoft equipment and accessories that included paintball markers, airsoft and Airsoft Electric Guns (AEG).

S-Thunder started as an Original Equipment Manufacturer (OEM) for high end airsoft guns. after extensive experience in manufacturing airsoft guns for well known brands, S-Thunder’s engineering team came upon the realization that most war game equipment utilizes engineering and designs that are considered evolutionary years ago, but are no longer state of the art by today’s engineering standards and innovations.with this knowledge, S-Thunder developed all new designs, engineering and manufacturing methods that are now patent pending and will be applied to a new line of war game equipment. before S-Thunder’s product line launch, some products have already been purchased and rebranded by other airsoft brands and some of these products have been sold to end users such as the military and police forces. all S-Thunder products are simple in design, easy to maintain out performs most products currently available in the market.

Any questions, inquiries or requests can be addressed to the following,
- mr Ferdinand Koo, Director, Sales & Marketing, email: fkoo@s-thunder.com
- mr Yu-Hon Li. Director, Business Development, email: yhli@s-thunder.com

Thank you for your consideration.

The S-Thunder TEAM
info@s-thunder.com
s-thunder.com

S-Thunder Announces US & UK Paintball Distributorships

Posted By Dave Flaherty, Lindsay Post Reporter Posted 3 hours ago

LINDSAY – There will be a little bit of summer in the air at Farmer’s Mutual Building at the Lindsay Exhibition during March break.

Gable Bros. Shows and Superior Events Group inc. are hosting the first ever, “Lindsay Springfest” today until this Saturday, March 20.

Pauline Trent, a representative of Gable Bros. Shows said “Lindsay Springfest” will feature a number of rides, mini-putt, a mini arcade, food vendors, displays for local community groups, pony rides and a paintball trailer among other attractions. Trent said the event will be held both indoors and outdoors.

Trent added that the company has never ran an event in Lindsay and owner Robert Gable “thought the Farmer’s Mutual Building would be a wonderful venue.”

Tickets for the event can be purchased at the Lindsay Agricultural Society, Pizza Nova, DJ Building Supplies in Little Britain and the Sport’s Den in Oakwood.

Beginning today, tickets will be available for $20 at the door. Individual ride tickets will be available as well, organizers said.

The event runs from today until Saturday from 11 a.m. to 7 p.m. each day.

Trent said it is appropriate for toddlers to adults.

“Lindsay Springfest” is sponsored by Pizza Nova, CHEX TV, Crayola and Kool-Aid.

More information can be received by calling Trent at (416) 894-1850 or visiting lindsayspringfest.com.

First-ever Lindsay Springfest runs until Saturday

So i was thinking of getting a paintball sniper marker and was wondering if you knew of any good but inexpensive ones?

What is a good paintball sniper rifle?

I’m looking for a good online paintball store that ships to anywhere in canada. if you know one, answer me with a link and like all other answers.also, i’d like it to have a Tippman U.S military guns.

Any good online paintball stores that ship to canada?

Network Performance Daily: how are you doing?

WB: I’m fine, thank you. It’s up and down, just sometimes it feels good when it’s quiet, and then sometimes when I get bombarded, it feels really terrible here.

Could you explain a little bit about the project?

WB: The idea here is to move (*bang*) my living room into the gallery space and to set up a system where you have a paintball gun pointed at me 24 hours, seven days a week, for an entire month. The entire mechanism (*bang*) is hooked up by the Internet, where people can log in from anywhere and shoot.

This is the 13th day, and so far, 6,500 shots were taken at me.

Could you tell me about yourself?

WB: I was born and raised in Iraq, and I worked against Saddam Hussein’s regime in a passive resistance movement through artwork. I was arrested by his regime a few times. in 1990, I refused to go to war in his army to invade Kuwait. as a consequence, I was blacklisted and I had to flee Iraq, so in 1991, after the uprising, I had a chance to escape and ended up in (*bang*) Saudi Arabia for two years (*bang*) until I had the chance to come to the United States and study for my BFA as the University of Delphi, New Mexico, I got my MFA from the Art Institute of Chicago, and now I teach there. (*bang*)

What inspired this particular project?

WB: I think it’s a combination of things. (*bang*) One, it is understanding the culture and how people interact with each other in this digital age. But, the trigger of this project was that I was watching (*bang*) the news – in fact, ABC news, when they had an interview with an American soldier sitting in a base in Colorado, and she was firing missiles into Iraq (*bang*) after being given information by American soldiers on the ground (*bang*) in Iraq, and when asked if she had any regard of human life, she said “No, these people are bad, and I’m getting very good intelligence from people on the ground.”

Also, I just wanted to bring this closer to myself. I left Iraq in 1991, and I wasn’t able to see my family, and we had some losses in 2005. I lost my brother and he was killed by American soldiers in Najaf, and I lost my father two months after that. now my family is confined to their own homes, and they cannot even leave, and I ask them sometimes “What do you do?”

They said: “We are at home, and the only time we leave is when one of us risks his or her life going to the market to get food and come back.”

I wanted to put myself in the same physical way they are so that I could feel closer to them and to support them.

Can you tell me more about the technical aspects of the project?

WB: The technology is extremely simple and available to anyone. I worked with a very good crew though – Ben Chang, Dan Miller, and Dimitris Michalaros, my colleagues at the Art Institute of Chicago.

There are a couple of components to it. The hardware is a small-motor connected to a card. That’s the pan mechanism behind the movement of the gun and the camera. The trigger on the camera is connected to a solenoid. Everything is driven by software and connected on a web page (*bang*) and so when you go to the Web page, you (*bang*) press left or right, the gun will move five degrees each time, and when you shoot the gun, the signal goes from your browser to the card, then to the solenoid, which pulls the trigger, and simply fires.

How many times have you been hit?

I lost count how many times I’ve been hit, but, as I said, today the count is up to 6,500 shots. I think day 13 – today – I entered kind of a survival mode, trying to protect myself by barricading myself and navigating through the room so that I’m not in the direct line of fire. But that does not mean I don’t forget that I am facing the gun 24 hours a day, and it happens so many times I forget for a second, and get hit.

Yesterday I got two of them really close to my head, and I do not wear any head protection except goggles, just because I wanted to feel that danger from the gun that’s pointed at me.

These paintballs hurt and I think it’s obvious that paintballs hurt. There were 6,500 pulls of the trigger – I don’t think that’s all one guy doing it, so what have you learned about the human condition?

(*bang, bang*) I mean, I’m trying to (*bang*) see where these shooters are coming from, and what’s behind it, and there’s really not one thing that you can say about them. The project attracted so many different people with different points of view. it varies from guys in their office having fun, to someone bored somewhere and shooting all day and all night, to some other people trying to engage in a political dialogue.

That’s at least part of the intention of this project – to attract people who may never want to engage in a political dialogue about the war, or violence, or civilians, or lack of privacy, and it’s working in that sense.

I always said that I wanted to play with the idea of aesthetic pleasure versus aesthetic pain, to the point that it becomes an encounter, instead of a didactic art. When you encounter it, you are drawn to it because of aesthetics on the surface and the appealing quality, but then, that encounter leads you to something else entirely.

Do you think the pseudo-anonymity of the internet and the distance has a lot to do with how this project is turning out?

No doubt about it. I mean, (*bang*) it is an internet base, and it is using the latest way of communication, but by design (*bang*), I wanted to remove the viewer from any physical impact. you log on the set, and you don’t even have sound (*bang,bang*) I mean, you’re hearing it right now, because we’re on the phone, but when you’re on the site, you never hear it. That’s speaks of the virtual war that’s being conducted against Iraq and other nations as well.

Is there anything else you’d like to add?

At this point, I look forward to when this gun is silent and when all the guns are silent.

More Information:
————————–

-Recreational Network Traffic Calendar

-Recreational Network Use

One room, one paintball gun controlled via the Web, and one Iraqi-American

SITE LISTINGSBy Popularity | Alphabetical

Latest Chatter

Tags:

Halo 26inch Tornado Disc front Wheel (Halo Wheels:White)
Halo 24inch SAS DJD Single Speed Rear Wheel inc 11T Cog (Halo Wheels:White)
Halo Excite D Rear Wheel (Halo Wheels:26 Inch – QR – Black)
Halo Purple Haze SAS Pro front MTB Wheels
Halo SAS Pro Disc MTB Wheels
Halo Aerorage Track Rear Wheel
Halo 24inch MX24 Pro front Wheel (Halo Wheels:Black)
18″ Axis Halo Rims Wheels Acura Legend Rsx Tl 3.2 Tsx
Axis Halo Wheel Set 18×8.5 5×114.3 35mm White with Red Pinstripe
Halo 24inch MX24 Pro Single Speed Rear Wheel inc 11T Cog (Halo Wheels:Black – inc 11T Cog)
Paintball Hybrid Halo Suicide Loader Shell ,halo Shell
Hybrid Halo Suicide Shell White
Mesmeri Halo Chrome
Paintball Hybrid Halo Suicide Loader Shell ,halo Shell
Red Halo Protex Bandanna Skull Cap under Helmet Gear
Halo 3 Vacuform Mask

Halo Wheels, Halo Paintball Masks, Halo 3 Paintball

can anyone out there find me the cheapst tippman 98 custom pro paintball gun with a stock and tri pod thanks

tippmann paintball?!?!?!?!?!?!?

What is a cheap website to buy airsoft guns or cheap paintball guns?

SEO Powered by Platinum SEO from Techblissonline