It's complicated.
If we talk about, e.g., an average German "knowing", one has to ask - how would they know?
Some (a small minority) communicated with those in the know (incl. the murderers themselves, e.g. Einsatzgruppen and Order police members).
More common was the situation when people heard persistent rumors about the murder of Jews.
It is doubtful, however, that this qualifies as actually "knowing" (and some of the rumors, e.g. about soap from bodies) were also false. Hence one could conclude (and here one can only offer informed speculation, see below) that most didn't know about the Holocaust, albeit many have at least heard about some aspects of it.
How many?
Johnson's and Reuband's What We Knew. Terror, Mass Murder, and Everyday Life in Nazi Germany (2005), gives somewhat of a stats-based answer. Some methodological gripes aside (e.g. arguably the surveys were conducted too late, which is important since memory is so malleable), they also mix "heard about it" and "knew about it" together; even then their average result for this is around 28% (p. 369). Which indicates a low level of "knowledge" overall among the German population.
Certainly, the Nazi leadership was very concerned about such knowledge and tried to prevent it as much as possible. The camouflage measures are well documented (cf. http://holocaustcontroversies.blogspot.com/2018/12/whats-there-to-hide-camouflage-and.html ) spreading of such rumors was criminalized under the Heimtückegesetz, and most of the murders (shootings and gassings) took place far away in the East (hence the idea of centralized extermination centers away from the "old" Reich, where Jews could be deported).