The commissioner may transfer any inmate of any of the institutions or facilities of the department to any other such institution or facility, irrespective of the institution to which the inmate was originally committed or the length of his sentence, when it appears to the commissioner that the best interests of the inmate or the other inmates will be served by such action.