I remember the Mishna Berurah (I think it was in the shaar hatziun or the ber halacha) writing that in order to determine how much a person should work for their livelihood they should do a thought experiment. Specifically, they should imagine that they are required to support somebody else and determine how much work would be necessary. Whatever conclusion you come up with as to what is necessary for the other person's livelihood, that should be how much you work for yourself. Does anybody know where he writes about this?
It's in Sha'ar Hatziyun 156:3:
וכדי שלא ירמה אותו היצר יתבונן אלו הוא היה מתחייב לזון את חבירו ולהלבישו לפי ערכו מה היה אומר אז איזה דבר הוא הכרח
In order that his yetzer not deceive him, he should contemplate [the following]: Were he to be obligated to feed and clothe his fellow according to his status, which items would he define as necessary?