Obviously it's impossible to understand the whole stack. My rule of thumb is to understand at least two layers of abstraction above and below the thing I'm actively working on.