More than 20 people have been arrested for possessing or supplying drugs at a major all-night dance party at the Sydney Showground.

About 160 people were searched by police drug dogs at the Knockout dance party for the Midnight Mafia festival at on Saturday evening.

Nineteen were found to be carrying drugs, mostly the amphetamine MDMA that lifts excitement and can create feelings of euphoria.

Three men were arrested and charged with supplying prohibited drugs including a 22-year-old Jesmond man found with 35 tablets, a 23-year-old Peakhurst man carrying 124 tablets, and a 22-year-old Marrickville man found with 441 tablets.

A 25-year-old Allambie Heights man is alleged to have had more than $2500 cash on him and has also been charged with supplying drugs.