recomended ram, processor power ect

Hi i was recently having problems with my kodi setup after posting on here i found i had some illegal addons ect and they may have been the problem so i decided to do a fresh start and i then found my problem was when trying to watch things in hd my kodi would crash, i dont know why this is but it seams my htpc running libreelec was struggling but it used to run things in hd ok. so im thinking about seeing if i can upgrade it at low cost see if it will run better, ive fiddled with some settings and that seams to have improved it but what ram, processor power, graphics card ect is recomended to run hd smoothly? and what about 4k just to futureproof myself?
i currently have:
2.3ghz core duo
4gb ram
256mb dedicated geforce graphics card.

thankyou