gobzer
Chevereto Member
I've chosen Chevereto as a primary platform for my old pic-service.
After a long and painful migration I realised that script works too slow. Even without load.
I got 6M pics, 37K albums and 1M users.
Script responds to album requests or user's pics requests about 4-8 seconds.
My hardware:
2 x Intel Quad-Core Xeon E5620
32GB RAM
SSD 120GB
All pictures stored on extrenal storage.
I've red https://chevereto.com/docs/going-big
But caching wont speed up slow requests.
Any ideas?
I'm sure MySQL is a bottleneck.
How can we speed up that requests?
After a long and painful migration I realised that script works too slow. Even without load.
I got 6M pics, 37K albums and 1M users.
Script responds to album requests or user's pics requests about 4-8 seconds.
My hardware:
2 x Intel Quad-Core Xeon E5620
32GB RAM
SSD 120GB
All pictures stored on extrenal storage.
I've red https://chevereto.com/docs/going-big
But caching wont speed up slow requests.
Any ideas?
I'm sure MySQL is a bottleneck.
How can we speed up that requests?
Code:
SELECT * FROM chv_images
LEFT JOIN chv_storages ON chv_images.image_storage_id = chv_storages.storage_id
LEFT JOIN chv_users ON chv_images.image_user_id = chv_users.user_id
LEFT JOIN chv_albums ON chv_images.image_album_id = chv_albums.album_id
LEFT JOIN chv_categories ON chv_images.image_category_id = chv_categories.category_id
WHERE image_user_id=:user_id
AND chv_images.image_nsfw = 0 AND (chv_albums.album_privacy NOT IN ('private','private_but_link','custom') OR chv_albums.album_privacy IS NULL OR chv_albums.album_user_id IS NULL) ORDER BY image_id DESC
LIMIT 2224,16
Last edited: