The present invention discloses a frequency variable compressor, including a shell defining an airtight space, an accumulator temporarily storing refrigerant before introducing the refrigerant into the shell, a first compression mechanism unit positioned in the shell, including a rolling piston, a cylinder, a refrigerant suction hole, a refrigerant discharge hole and a vane, and compressing refrigerant, a second compression mechanism unit positioned in the shell, including a rolling piston, a cylinder, a refrigerant suction hole, a refrigerant discharge hole and a vane, and compressing refrigerant, a frequency variable motor positioned in the shell and transferring power to the rolling pistons of the first and second compression mechanism units through a rotating shaft, and a valve controlling the flow of the refrigerant such that the first and second compression mechanism units compress the refrigerant by a twin rotary compressor type or a 2-stage rotary compressor type.