I think the pagesize set in the pagination object of your dataprovider will override the setting you do here. So either set the pagesize in the search() method of your model or try this in your view file:
$provider=$model->search();
$provider->pagination->pageSize=20;
// use $provider as 'dataProvider' in your gridview