A compressor (10, 210), comprising: a casing, at a bottom of which an oil retention space being formed; an electric motor accommodated in the casing; a driveshaft (60, 260) extending vertically and connected to the electric motor; a compression mechanism, accommodated in the casing, and having a movable part that is connected to the driveshaft and is driven by the electric motor, and an upper housing that forms a crank chamber internally accommodating a connecting portion that connects an eccentric part of the driveshaft and the movable part and that has an upper bearing that pivotally supports the driveshaft below the crank chamber; an oil supply passage leading oil in the oil retention space to the crank chamber, the oil supply passage being formed in the driveshaft; an oil discharge passage (90, 290) that includes a main oil discharge passage that extends in an axial direction in the driveshaft, and a first inflow passage (67, 120) communicating between the main oil discharge passage and the crank chamber; and an oil supply pump configured to supply oil in the oil retention space to the oil supply passage; an oil discharge pump configured to discharge oil in the crank chamber to the oil retention space via the oil discharge passage, characterized by an oil-recovery space being formed in a lower part of the upper housing below the crank chamber, the oil discharge passage further including a second inflow passage communicating between the main oil discharge passage and the oil-recovery space, and the discharge rate of the oil discharge pump being larger than the discharge rate of the oil supply pump. a casing, at a bottom of which an oil retention space being formed; an electric motor accommodated in the casing; a driveshaft (60, 260) extending vertically and connected to the electric motor; a compression mechanism, accommodated in the casing, and having a movable part that is connected to the driveshaft and is driven by the electric motor, and an upper housing that forms a crank chamber internally accommodating a connecting portion that connects an eccentric part of the driveshaft and the movable part and that has an upper bearing that pivotally supports the driveshaft below the crank chamber; an oil supply passage leading oil in the oil retention space to the crank chamber, the oil supply passage being formed in the driveshaft; an oil discharge passage (90, 290) that includes a main oil discharge passage that extends in an axial direction in the driveshaft, and a first inflow passage (67, 120) communicating between the main oil discharge passage and the crank chamber; and an oil supply pump configured to supply oil in the oil retention space to the oil supply passage; an oil discharge pump configured to discharge oil in the crank chamber to the oil retention space via the oil discharge passage, characterized by an oil-recovery space being formed in a lower part of the upper housing below the crank chamber, the oil discharge passage further including a second inflow passage communicating between the main oil discharge passage and the oil-recovery space, and the discharge rate of the oil discharge pump being larger than the discharge rate of the oil supply pump.