Optimal amount of fiber?

A side question to the title is does that answer differ in regards to something like ibs or is it more of a certain fiber type should be focused on depending on the ibs type you have?