DPI is a ratio, and effective DPI is the one that matters
Dots per inch counts how many samples land in each inch of physical output. Strictly, DPI describes an output device laying down dots of ink, while PPI — pixels per inch — describes the sampling density of the image itself; in everyday document work the two terms are used interchangeably, and the arithmetic is the same either way. What matters is that the number is a quotient: divide the pixel dimension by the inches it will occupy.
Inside a PDF this gives us effective DPI, which is the only resolution figure worth acting on. Effective DPI equals the image’s pixel width divided by the width in inches at which it is actually placed on the page. A 3000-pixel-wide photograph dropped into a two-inch-wide box on your page is being reproduced at 1500 effective DPI. No printer in your office resolves anything close to that, no screen comes near it, and every one of those surplus pixels is being stored, transmitted and discarded at render time. That single calculation explains most bloated documents.
The same arithmetic works in reverse and is how you should plan images. Decide the placed width first, multiply by the DPI the destination needs, and you have the pixel width to aim for. A picture that will sit six inches wide on a printed page at 300 DPI needs around 1800 pixels across. Supplying 6000 wastes bytes; supplying 600 will look soft no matter what quality setting you use, because the information is not there to begin with.