Do what you can do, but don't push so hard you can't recover. My first rides were three to five miles, the first time I did eight I was ready to take the bike back and start stamp collecting. Year and a half later, hundred milers are not easy, but I do them with some regularity. Fifty and sixty are common. Average speed is from seven or eight, now to over fifteen. Two miles between stops, now fifteen to twenty. It takes time, just keep ridding every chance you get. BTW, loosing eighty pounds made it a lot easier as well. If your knees are bothering you, you may be trying to ride in too high a gear. You should be pedaling around eighty rpm. Cadence. Adjust your gear to keep pedaling about the same rate all the time.