Depending on what you are trying to accomplish here's how you could do it by using GDAL, the Geospatial Data Library which is the backend of almost any GIS application.
Assuming you want to merge 8000 individual, single band raster files, where each is in an individual GeoTiff inside a folder.
gdalbuildvrt global_raster.vrt your/raster/folder/*.tif
This will create a GDAL Virtual Format File which is basically just a metadata file containing information about your 8000 input rasters and how they belong together.
The beauty of this is, it is blazingly fast since it only creates a metadata file. This VRT however can be handled like a single, large dataset by GDAL backed software, for instance QGIS - just drag and drop it into QGIS and it will display like a single GeoTiff.
If you want to merge all raster files into one large one you can do that with:
gdal_merge.py -o large_output_raster.tif global_raster.vrt
gdal_merge.py -o large_output_raster.tif your/raster/folder/*.tif
Depending on your application
gdalbuildvrt have a lot of options for reprojection, downsampling, cropping etc.