arad.vithaj :
I was thinking of buying a i3-8100, do you think its worth it?
Won't fit in your 100 series board, 8 series cpu needs 300 series motherboard.
You wont get too much better for $200, you should look at $300 cpu. I7 6700 is a sure fit
https://pcpartpicker.com/product/7V7CmG/intel-cpu-bx80662i76700
OEM tend not to update one generation to the next, but if your PC has bios support then the i7 7700 should also work
https://pcpartpicker.com/product/9mRFf7/intel-core-i7-7700-36ghz-quad-core-processor-bx80677i77700
Then you get more MHz 3.4 or 3.6 base clock, 4.0 or 4.2 turbo 4 cores 8 threads over your 2.7 base 3.3 turbo 4 core 4 thread cpu. And then you can sell the i5 6400 to get a little money back, looks like $100 to $120 working used on ebay.
I still like the I5 8400 though, 2.8 base 4.0 turbo, 6 core 6 thread cpu, But it needs at least the motherboard swapped to a 300 series. It could run with 2133 DDR4. Though if you have $200 for a cpu upgrade, I think selling the old cpu mobo and ram could buy you a newer mobo and faster ram if not more of it. Say $100 for the 6400, and $50 for the h170, buy a h370 for $80 on newegg, that leaves 70 towards a ram upgrade. A 16GB 2666 kit is $150
Selling the old cpu $100-$120, h170 $50, and 8GB 2133 ram $50, may get a combo price around $220 plus your $200 cpu upgrade for $400 budget
https://pcpartpicker.com/list/qLzKq4