Personification is a figure of speech that relates human characteristics to other things while simile compares two different things with each other with an aid of words which denote comparison.
In the poem, legs are being compared with human abilities which fall under personification, while the speaker’s existence is being compared to running which makes it an example of simile.