Forwarded from Dataacademy.ir
چه مفاهیمی را نمی توان داده کاوی نامید! چه چیزهایی داده کاوی نیست!!! https://goo.gl/QoFJcA
Forwarded from Tech C**P (Alireza Hos.)
Make your
Django deliberately doesn’t serve media for you, and it’s designed that way to save you from yourself. If you try to serve media from the same Apache instance that’s serving Django, you’re going to absolutely kill performance. Apache reuses processes between each request, so once a process caches all the code and libraries for Django, those stick around in memory. If you aren’t using that process to service a Django request, all the memory overhead is wasted.
So, set up all your media to be served by a different web server entirely. Ideally, this is a physically separate machine running a high- performance web server like lighttpd or tux. If you can’t afford the separate machine, at least have the media server be a separate process on the same machine.
For more information on how to separate static folder:
- https://docs.djangoproject.com/en/dev/howto/static-files/#howto-static-files
If you can afford it, stick your database server on a separate machine, too. All too often Apache and PostgreSQL (or MySQL or whatever) compete for system resources in a bad way. A separate DB server — ideally one with lots of RAM and fast (10k or better) drives — will seriously improve the number of hits you can dish out.
I don’t totally understand how KeepAlive works, but turning it off on our Django servers increased performance by something like 50%. Of course, don’t do this if the same server is also serving media… but you’re not doing that, right?
Although Django has support for a number of cache backends, none of them perform even half as well as memcached does. If you find yourself needing the cache, do yourself a favor and don’t even play around with the other backends; go straight for memcached.
#python #django #memcached
Django application blazing fast by doing some tips:1- Use a separate media server:Django deliberately doesn’t serve media for you, and it’s designed that way to save you from yourself. If you try to serve media from the same Apache instance that’s serving Django, you’re going to absolutely kill performance. Apache reuses processes between each request, so once a process caches all the code and libraries for Django, those stick around in memory. If you aren’t using that process to service a Django request, all the memory overhead is wasted.
So, set up all your media to be served by a different web server entirely. Ideally, this is a physically separate machine running a high- performance web server like lighttpd or tux. If you can’t afford the separate machine, at least have the media server be a separate process on the same machine.
For more information on how to separate static folder:
- https://docs.djangoproject.com/en/dev/howto/static-files/#howto-static-files
2- Use a separate database server:If you can afford it, stick your database server on a separate machine, too. All too often Apache and PostgreSQL (or MySQL or whatever) compete for system resources in a bad way. A separate DB server — ideally one with lots of RAM and fast (10k or better) drives — will seriously improve the number of hits you can dish out.
3- Turn off KeepAlive:I don’t totally understand how KeepAlive works, but turning it off on our Django servers increased performance by something like 50%. Of course, don’t do this if the same server is also serving media… but you’re not doing that, right?
4- Use memcached:Although Django has support for a number of cache backends, none of them perform even half as well as memcached does. If you find yourself needing the cache, do yourself a favor and don’t even play around with the other backends; go straight for memcached.
#python #django #memcached
Tech C**P
Make your Django application blazing fast by doing some tips: 1- Use a separate media server: Django deliberately doesn’t serve media for you, and it’s designed that way to save you from yourself. If you try to serve media from the same Apache instance…
Somehow BS
1-Use nginx
Use uwsgi
3- that’s because you are using modpython
Use uwsgi
4-cache backend has a little effect compared to cache method
Redis works pretty good
1-Use nginx
Use uwsgi
3- that’s because you are using modpython
Use uwsgi
4-cache backend has a little effect compared to cache method
Redis works pretty good
LinkPlace
https://roocket.ir/series/electron-tutorial/episode/28
آقا جدا از این کارا میخواین بکنین با الکترون نکنین
Forwarded from Radiom - Level Up Your Skills
دوستان جان، جلسه اول امشب ۲۳ بهمن ساعت ۲۲ به وقت ایران برگزار خواهد شد.
امشب در مورد زبان جاوااسکریپت و یه معرفی از کلیت، فلسفه و بقیه مواردی که برای شروع لازم هست رو میگیم.
این جلسه به صورت لایو از طریق یوتیوب از طریق کانال:
https://www.youtube.com/channel/UCs50hkpCfmHGvKxTY_gP4uA
پخش خواهد شد.
امشب در مورد زبان جاوااسکریپت و یه معرفی از کلیت، فلسفه و بقیه مواردی که برای شروع لازم هست رو میگیم.
این جلسه به صورت لایو از طریق یوتیوب از طریق کانال:
https://www.youtube.com/channel/UCs50hkpCfmHGvKxTY_gP4uA
پخش خواهد شد.
YouTube
Touhid Arastu
Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube.
codingHUB | Programming challenges in February, 2018 on HackerEarth
https://www.hackerearth.com/challenge/college/codinghub2K18/
https://www.hackerearth.com/challenge/college/codinghub2K18/
HackerEarth
codingHUB
It's time for all the coders out there to feel the excitement. codingHUB, a coding competition is a delightful playground for the exploration of intelligence of the programmers by analyzing real-life problems and using those skills to solve them. It is designed…