Friday, January 25, 2013

What it comes down to for the Knicks this season

I have a longer post on the Knick's 2013 season I'm writing but I just want to say this (and since one New Year's resolution was to write a blog post ever day:)

Watching the way Amar'e Stoudemire moved on the court last night against the Celtics, compared to say Brandon Bass, just reinforced something a lot of Knick fans including myself might have forgotten because of all the setbacks he's had the past two years.

Amar'e Stoudemire is a All-Star calibre NBA big man. He is older and banged up but he is still explosive and almost guaranteed to score close to the rim even moreso than Tyson Chandler  There are very few players in the NBA who have the size and speed and moves and timing and footwork and finishing of Amar'e Stoudemire. Any hope the Knicks have of winning a championship this season rests on Mike Woodson figuring how to get Stoudemire and Anthony playing at their full All-Star potential together and complementing each other.

It is not an easy task but that is what it comes down to. Phil Jackson says it can't be done. Tyson Chandler is, somewhat ironically, an official All-Star this season. If Stoudemire starts and plays starter minutes the Knicks have arguably the best front-court in the league and a bunch of players who can score from the wings. This team has what it takes to win it all but it all comes down to their All-Star front-court thriving together.

Anthony has thrived offensively at the power forward slot but the Knicks get hammered defensively by bigger frontlines and rebounding has been a problem for them all season regardless of who they play. Obviously Anthony will and should play at the 4 for certain stretches of any game but Stoudemire and Anthony need to play together for the majority of the game. The team needs them on the floor together as much as Lebron and Wade or Durant and Westbrook lead their team on the floor together. The Knicks started the season very well but it's clear by now teams have figured them out and when Anthony gets smothered or their 3-pt shooting is off they will lose. The return of Shumpert should give them a huge boost on the defensive perimeter which is the only weakness on an otherwise excellent defensive team. But to me Stoudemire is the key this season and the difference between a 2nd-round exit and a NBA finals win for the Knicks.


Thursday, January 03, 2013

The saga of muticore CPUs, core parking, and game performance on Windows 7

There is a major performance issue with games (possible affecting DirectX 9 games more) and generally CPU-intensive applications on Windows 7 / Server 2008 running on modern quad-core CPU's due to an obscure power-saving feature called CPU core parking. The symptoms are a dramatic decrease in performance with unstable and jittery in-game FPS and very noticeably laggy and jittery and unresponsive gameplay despite -- and this is the key point -- a high-end graphics card and CPU more than capable of running the game at its max settings and a low server-to-client ping (~100ms) in multiplayer games. The unique performance problems caused by this issue do not resemble typical underpowered hardware issues. People have described the problems as micro-stuttering -- fractional pauses when rendering a frame that are hard to pin down precisely but are definitely noticeable and very detrimental to game enjoyment. For single-player games like RAGE what was most noticeable to me was the display lag when first rendering new scenes. RAGE uses a unique graphics system that requires constant shoveling of texture data from disk to memory to the GPU...the performance problem I had wasn't exactly a low FPS but a noticeable delay in loading texture data that caused my FPS to drop for a second or two as the camera moved through a new scene for the first time.

For multiplayer games that suffer from this issue -- in my case Team Fortress 2 and Planetside 2 -- it appears to all the world (and more importantly to the other players on your server) that you're running a very old obsolete CPU. Gameplay is laggy and jittery especially with many other players in your field-of-view, despite your very capable GPU and CPU and network connection. This issue has NOTHING to do with how well your game or app is optimized or threaded or whether or not you are utilizing all of your CPU cores when your program is running. It is a semi-common performance issue that affects all CPU-intensive programs on quadcore computers under Windows 7 and possibly Vista; even those games and apps which are not heavily multithreaded. I think I encountered this issue even on a game from 2004 -- Return to Castle Wolfenstein -- which had a constant and very noticeable drop in FPS to around 40 for no apparent reason despite running on a high-end Nvidia discrete GPU.

Most games are not multithreaded enough to take full advantage of 4 or more CPU cores and the performance gains from modern multicore CPUs come from the ability of the OS to delegate other tasks to other cores rather than the game itself efficiently distributing its workload across multiple CPU cores. However this particular CPU power-management feature -- core-parking -- is seriously bugged on recent editions of Windows and affects all games regardless of how well 'optimized' -- as gamers like to say -- the game engine is. In Team Fortress 2 the performance slowdown did seem to become noticeable right at the Halloween TF2 update in 2012. TF2 updates always seem to put more and more performance demands on your PC which isn't really a good thing, but it should not have been as pronounced as what I observed. I don't know if a recent Windows update has exacerbated the core-parking issue with games. In TF2 the symptoms are very laggy and unresponsive game play, despite a low server ping and the game itself reporting high framerates. The internal FPS counter in TF2 reported a constant 60 FPS but I suspect this counter strictly measures the ability of the GPU to put frames on the screen. I'm pretty sure my overall framerate in TF2 was nowhere near 60.

According to one explanation which makes sense to me, newer versions of Windows will power down cores to save power when it thinks the current processor workload can be handled on only one or two cores. But it takes time for cores to be moved from this low-power inactive 'parked' state to an active state for handling threads and this delay can be signficant when handling near real-time workloads like games. Unfortunately it seems that the algortihm Windows uses for this park /wake-up /distribute process isn't balanced or doesn't identify heavy realtime workloads properly, and cores may be getting parked and woken up and threads transferred to them and then parked again over and over, resulting in a serious performance degradation. In computer programming a few ms is like a lifetime as far as performance goes.

The solution is simple -- if you want to play games on Windows disable core parking on your desktop if you have a Core Quad or i5 or i7. There are multiple ways and programs that allow you to do this that are documented on the web, like this: http://forum.notebookreview.com/asus/494232-how-adjust-core-parking-inside-windows-7-a.html This way uses enables the built-in power-management interface to manage the core-parking feature and is probably the better approach than doing registry editing directly.

Programs like this one: http://www.coderbag.com/Programming-C/Disable-CPU-Core-Parking-Utility modify the registry for you. Some programs and guides take the step of actually deleting the relevant power-management keys. I would not recommend actually deleting the registry keys or values since there is no automatic way to recreate them -- renaming them is a better approach.

The end result of disabling core parking for my quad-core PC on TF2 is that on servers with < 100ms ping and 32/32 players my gameplay is smooth as butter with 60 fps most of the time, only dipping with very many players in close proximity. My average CPU usage hovers around 50% and load times for levels are also significantly decreased.

On Planetside 2 using a RenderDistance of 1500, GPUPhysics 1, Terrain and Flora 0 and shadows off with all other graphic settings maxed, I get 30-35 fps in heavy firefights with plenty air and vehicle action. This isn't great but it is playable and my fps does not drop below 30 under any circumstances. I get 35-40 in smaller fights and 45+ in most friendly-only areas with many friendlies in view; a solid 60 fpa at warpgates. It's possible that Planetside 2's notoriety for extremely low frame rates even on current-gen hardware like Nvidia 6xx GPUs and Intel i5 and i7's  may be due largely to this issue with core parking. Whatever minimal power-savings you would get from this CPU core-parking feature are not worth turning your sweet gaming-rig into a crippled laptop.



Tuesday, January 01, 2013

Undergraduphonia

This is the portfolio of poems I submitted for the first creative writing poetry class I ever did with Dr. Jennifer Rahim in UWI. Much of it is only slightly interesting, trite, embarrassing, rushed to submit at the deadline,  partially ripped off from a Black Sabbath / Ozzy Osbourne song...pretty much typical of any 1st undergraduate creative writing class. Fear of Flying was published in Dr. Rahim's compilation for the class Heart-to-Verse: Wordlines. I enjoyed the class just like I did the short story writing class with Dr. Merle Hodge, but these were the only two creative writing courses in the whole English Literature syllabus. Creative writing for whatever reason never had a priority at UWI.


Write A Poem On...
Write a poem on writing.
What, a sonnet on love?
Or a psalm to battle evil,
With a prayer for God above.

A ballad on bacchanal.
 A quaint portrait of home.
 A haiku on existence?
For those souls suffering alone.

An ode to beauty.
An epistle on war.
A sonata on moonlight...
But above all else, write.
For what we write,
Is nothing less than life.



The ‘Just Friends’ Ballad
Now when first you saw that letter
And you asked me who it’s for
I looked into your blank black eyes
And marvelled at what I saw.

You looked so cool and casual
Like Sunday afternoon
I could only jerk my head down
I felt like such a fool

I would have loved to skip this interlude
But my feelings were just a little bit too strong.

Just a little bit too strong.

Tanka
Unstoppable prose
Pause in anticipation.
Hurry laggard eye
Here impatient respite stands:
Pay grammar’s toll and run again.

Daisy and Jay 
Good morning, good morning.

The soldiers are marching
The war’s over today.

The top is down
On our silly great car
The wind blows my scarf
And we hear them say:

Good morning, good morning

The lovers are driving
Feel how the past slips away.
Ten thousand miles of longing
Ten million miles of doubting
In their car they’ve covered today.

The past no longer holds fast.
The fantasies no longer chain.

Good morning, good morning

We still believe in happy endings
Where the soldiers are
That’s where we’re going.


Six-Year-Old Sitting on the Red Steps – A Portrait
All I have are my lunch-kit and my bag.
Shoes laced up tight, a kiss and a Alright…
Eat your lunch eh, don’t throw it away,
Listen to teacher, don’t skylark whole day.

I am innocent, ignorant of good or evil,
Ugly or beautiful,
All children my equal.
A pure smile of welcome for all my chums.
A light empty heart with malice for no one.

But soon they will come,
With their daggers of judgement.
Herd us, segregate us, popularity is the currency.
Our sneaker brands, hair-cuts, eligible for mockery.

Fear of Flying
So then, nine thousand kilometres.
Twice that to go and back.
One hundred and eighty thousand tons of JET-A-1;
Light the candle at two hundred and ten degrees and we’re off.
Three kilometres of tarmac
To barrel down.
4 times the earth’s gravity
As we bend upwards.
With wheels up, flaps down, rudder centre, bank left, VSI rising...
They’ve done this hundreds of times right?
Two hundred thousand pounds of thrust
Blast us through space;
At Mach oh-point-eight – altitude forty thousand meters...
That’s a long way down...
For four hundred aunts, uncles, cousins, and comedians,
Serial killers, murderers, rapists and robbers.
5% incidence rate reported among general population
Of Agoraphobia, schizophrenia, dementia, paranoia.
Deported, divorce, laid-off, no breakfast, four hour delay, another Scotch, 
Turbofans, turbulence, fuse short-circuits.
Autopilot, radar, ILS malfunctions.
Emergency, black box, NTSB investigates.

Safer than driving right?