Skip to content

Commit

Permalink
Add link defs
Browse files Browse the repository at this point in the history
  • Loading branch information
vasudev-gm committed May 5, 2024
1 parent 4d9d194 commit e611cef
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ tags:
Hello fellow readers, the objective of the article will be to reduce high battery drain after installing Android Security patches on your android device be it smartphone or tablet. This is applicable to any vendors after enabling developer options.

> ## Background
If you've heard the phone is being re-indexing or optimizing the apps and media in the background causing worse battery drain and thermals until the process is completed. The actual problem stems from a better user experience approach introduced in Android 7 or later which makes it optional to optimize the apps to reduce the installation time and enable quick startup.
If you had lower power devices from Samsung, Redmi etc you will notice it was a welcome change to quicken the patching process and minimize the time we pray to God it won\'t get stuck at **Updating Progress Screen**. <!-- more -->
So ergo, with latest android version the optimizer logic works when one of the following conditions are met or satisfied:

1. The phone is connected to the charger,

- fully charged,
Expand All @@ -36,13 +38,15 @@ We'll make use of Android Developer options and Android Debug Bridge to fix the

---
XDA Articles:
[Enabling Developer Options in Android](https://www.xda-developers.com/android-developer-options/) <br>
[Install Android Debug Bridge on Mac, Linux or Windows](https://www.xda-developers.com/install-adb-windows-macos-linux/)
[Enabling Developer Options in Android][def]

[Install Android Debug Bridge on Mac, Linux or Windows][def2]

---

Connect the phone or tablet via USB cable(USB-A or USB-C) to your PC/Mac.
Type the following command:<br>
Type the following command:

>`adb shell`
Make sure you allow authorization for the device to connect it in development mode.
Expand All @@ -62,6 +66,13 @@ The above commands will run the background optimizer logic which are deferred to
The process should typically take 5-10 minutes. I tested it on OnePlus(Oppo), Samsung, Xiaomi and Pixel phones/tablets.
I currently use a Pixel 7(Main Phone) and Pixel 4a(Backup Phone).

> Sources:<br>
[Kelvin Craig's Script](https://github.com/KelvinCrag/Optimizer) <br>
[My YouTube Video](https://youtu.be/W7T1Gk0MtYo?si=cH8lXvOujdz8l_mr)
> Sources:
[Kelvin Craig's Script][def3]

[My YouTube Video][def4]

[def]: https://www.xda-developers.com/android-developer-options/
[def2]: https://www.xda-developers.com/install-adb-windows-macos-linux/
[def3]: https://github.com/KelvinCrag/Optimizer
[def4]: https://youtu.be/W7T1Gk0MtYo?si=cH8lXvOujdz8l_mr
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,24 @@ tags:
Hey fellow readers, if you\'re deploying your python application or containerized application through Gunicorn (Green Unicorn) there is a new vulnerability that bypasses validation when **multiple conflicting Transfer-Encoding headers** are used which are treated as chunked data regardless of final encoding leading to Request Smuggling allowing access to restricted API endpoints in your application without needed credentials/tokens.
<!-- more -->

The new update version 22.0 fixes the issue mentioned in the [commit](https://github.com/benoitc/gunicorn/commit/ac29c9b0a758d21f1e0fb3b3457239e523fa9f1d).
The new update version 22.0 fixes the issue mentioned in the [commit][def].

The PoC for the exploit can be found here at [Huntr](https://huntr.com/bounties/22158e34-cfd5-41ad-97e0-a780773d96c1).
The PoC for the exploit can be found here at [Huntr][def2].

In short, versions < 22.0 are affected. You can update it manually to the fixed version via pip or pipenv or conda. If they are unable to update the package, the best way would be to secure the endpoints via firewall and block access.

## Source(s)

- [Github Advisory](https://github.com/advisories/GHSA-w3h3-4rj7-4ph4)
- [NIST Advisory](https://nvd.nist.gov/vuln/detail/CVE-2024-1135)
- [Huntr Advisory](https://huntr.com/bounties/22158e34-cfd5-41ad-97e0-a780773d96c1)
- [Gunicorn Commit](benoitc/gunicorn@ac29c9b)
- [Gunicorn Releases](https://github.com/benoitc/gunicorn/releases/tag/22.0.0)
- [Github Advisory][def3]
- [NIST Advisory][def4]
- [Huntr Advisory][def2]
- [Gunicorn Commit][def5]
- [Gunicorn Releases][def6]


[def]: https://github.com/benoitc/gunicorn/commit/ac29c9b0a758d21f1e0fb3b3457239e523fa9f1d
[def2]: https://huntr.com/bounties/22158e34-cfd5-41ad-97e0-a780773d96c1
[def3]: https://github.com/advisories/GHSA-w3h3-4rj7-4ph4
[def4]: https://nvd.nist.gov/vuln/detail/CVE-2024-1135
[def5]: benoitc/gunicorn@ac29c9b
[def6]: https://github.com/benoitc/gunicorn/releases/tag/22.0.0
56 changes: 38 additions & 18 deletions source/_posts/Slow-Write-Speed-Fix-on-WD-SN570.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ tags:
---
Hello fellow readers, in this article I will be providing a fix for Slow Write Speed issues on WD SN570 when using Steam/Epic Downloads and media transfers.<!-- more -->

## Background <br>
## Background

The advent of Host Memory Buffer on budget NVMe drives to give better write performance instead of adding DRAM on the drive. With HMB, SSD manufacturers can save on BOM costs and make the drive more compact to focus on higher storage size. As you are aware, most NVMe SSDs are available in [M.2](https://en.wikipedia.org/wiki/M.2) format with different sizes aka lengths i.e 30mm, 42mm and 80mm. There are few sizes used in enterprise SSDs optimized for more write endurance such as 60mm and 110mm.
The advent of Host Memory Buffer on budget NVMe drives to give better write performance instead of adding DRAM on the drive. With HMB, SSD manufacturers can save on BOM costs and make the drive more compact to focus on higher storage size. As you are aware, most NVMe SSDs are available in [M.2][def8] format with different sizes aka lengths i.e 30mm, 42mm and 80mm. There are few sizes used in enterprise SSDs optimized for more write endurance such as 60mm and 110mm.

With newer PCIe generation and the current version being PCIe 5.0 with x4 lanes promising sequential reads of 12GB/s and writes of 9GB/s.
As of 2023, you will see general availability is PCIe 4 with x4 lanes with reads of 7GB/s and 5GB/s writes. In thin and light laptops you will either see M.2 30 or 40mm with 4 lanes with HMB enabled.

Theoretically if HMB and firmware is implemented properly that can properly perform garbage collection and cleanup the write cache once the data is written to the flash media. Now, you will ask me what's the point of writing this article if all's good.
Let's take a look at affected drive i.e [WD SN570](https://www.techpowerup.com/ssd-specs/western-digital-sn570-1-tb.d467) which is a budget NVMe with HMB cache size of 64MB. HMB cache is different from [pseudo-SLC cache](https://sabrent.com/blogs/storage/slc-caching) which uses part of the capacity to be used as SLC cache for faster write performance. Usually bigger sizes have bigger SLC cache in essence, 1TB will have double the SLC cache of 512GB drive of the same manufacturer.
Let's take a look at affected drive i.e [WD SN570][def7] which is a budget NVMe with HMB cache size of 64MB. HMB cache is different from [pseudo-SLC cache][def6] which uses part of the capacity to be used as SLC cache for faster write performance. Usually bigger sizes have bigger SLC cache in essence, 1TB will have double the SLC cache of 512GB drive of the same manufacturer.

## What\'s the fix? <br>
## What\'s the fix?

What I can I say, I found a fix after constantly going around review articles and finally came across reddit posts that provided a fix when there was nothing listed in WD articles about the issue.

Expand All @@ -35,27 +35,47 @@ There are 2 ways where you can change the drive settings:
---
**Let\'s discuss the First method:**

1. Open File Explorer and click on **This PC** in the left sidebar. Right Click on the Drive and Select Properties. <br><br> <span>![This PC Page](https://i.imgur.com/SBF1bnu.png)</span>
2. Click on the Hardware Tab or Section of drive properties window. Click on Properties. <br><br><span>![Drive Properties](https://i.imgur.com/WDy5Mo2.png)</span>
3. Click on Change Settings which requires Administrator Privileges <br><br><span>![Change Global Drive Settings](https://i.imgur.com/23Iu9mz.png)</span>
4. Click on Policies Tab or Section, uncheck ***Enable write caching on the drive*** <br><br><span>![Policies Tab](https://i.imgur.com/wHXGsjQ.png)</span>
1. Open File Explorer and click on **This PC** in the left sidebar. Right Click on the Drive and Select Properties.
<span>![This PC Page](https://i.imgur.com/SBF1bnu.png)</span>
2. Click on the Hardware Tab or Section of drive properties window. Click on Properties.
<span>![Drive Properties](https://i.imgur.com/WDy5Mo2.png)</span>
3. Click on Change Settings which requires Administrator Privileges
<span>![Change Global Drive Settings](https://i.imgur.com/23Iu9mz.png)</span>
4. Click on Policies Tab or Section, uncheck ***Enable write caching on the drive***
<span>![Policies Tab](https://i.imgur.com/wHXGsjQ.png)</span>
5. Click on OK button to close the window and now you can enjoy the drive without running into slow write speed issues (10-20MB/s) when the drive is heavily loaded while downloading from Steam/Epic/Hugging Face models etc..
<br>

**Let\'s discuss the Second Method:** <br>
**Let\'s discuss the Second Method:**

1. Open Device Manager as Administrator and select the Drive i.e SN570 <br><br><span>![Device Manager](https://i.imgur.com/a5ICTCu.png)</span>
2. Double Click or Right Click on the selected drive and select **Properties** <br><br><span>![Device Manager](https://i.imgur.com/qL3qkNJ.png)</span>
3. Click on Policies Tab or Section, uncheck ***Enable write caching on the drive*** <br><br><span>![Policies Tab](https://i.imgur.com/wHXGsjQ.png)</span>
1. Open Device Manager as Administrator and select the Drive i.e SN570
<span>![Device Manager](https://i.imgur.com/a5ICTCu.png)</span>
2. Double Click or Right Click on the selected drive and select **Properties**
<span>![Device Manager](https://i.imgur.com/qL3qkNJ.png)</span>
3. Click on Policies Tab or Section, uncheck ***Enable write caching on the drive***
<span>![Policies Tab](https://i.imgur.com/wHXGsjQ.png)</span>
4. Click on OK button to close the window and now you can enjoy the drive without running into slow write speed issues (10-20MB/s) when the drive is heavily loaded while downloading from Steam/Epic/Hugging Face models etc..

> **Well, that's all folks! Hope you enjoyed the article and simply brought smiles after seeing those huge improvement write speed on your SN570.**
---

> ## Source(s)
[Crazy Latency Spikes and Slow Writes on SN570](https://old.reddit.com/r/buildapc/comments/12jepzn/wd_blue_sn570_crazy_latency_spikes_and_extremely/)<br>
[Slow Writes with Steam Games on SN570](https://old.reddit.com/r/buildapc/comments/t0q6d0/steam_write_speed_to_ssd_very_slow_1020_mbs_how/)<br>
[Disable Write Caching policy on SN570](https://old.reddit.com/r/Windows10/comments/lf5sb5/should_i_enable_write_caching_policy_for_ssd_and/)<br>
[My YT Video about Slow Write Speed on SN570](https://youtu.be/W7EVpauavVc?si=j5p4eHpi8QDpdRU9)<br>
[What are HMB NVMe SSD](https://www.servethehome.com/what-are-host-memory-buffer-or-hmb-nvme-ssds/)
[Crazy Latency Spikes and Slow Writes on SN570][def]

[Slow Writes with Steam Games on SN570][def2]

[Disable Write Caching policy on SN570][def3]

[My YT Video about Slow Write Speed on SN570][def4]

[What are HMB NVMe SSD][def5]


[def]: https://old.reddit.com/r/buildapc/comments/12jepzn/wd_blue_sn570_crazy_latency_spikes_and_extremely/
[def2]: https://old.reddit.com/r/buildapc/comments/t0q6d0/steam_write_speed_to_ssd_very_slow_1020_mbs_how/
[def3]: https://old.reddit.com/r/Windows10/comments/lf5sb5/should_i_enable_write_caching_policy_for_ssd_and/
[def4]: https://youtu.be/W7EVpauavVc?si=j5p4eHpi8QDpdRU9
[def5]: https://www.servethehome.com/what-are-host-memory-buffer-or-hmb-nvme-ssds/
[def6]: https://sabrent.com/blogs/storage/slc-caching
[def7]: https://www.techpowerup.com/ssd-specs/western-digital-sn570-1-tb.d467
[def8]: https://en.wikipedia.org/wiki/M.2
15 changes: 9 additions & 6 deletions source/_posts/intel-CPU-stability-woes.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,10 @@ Intel did ask motherboard vendors such as Asus,MSI,GigaByte,ASRock etc to provid
[Ars Technica][def5]
[Intel][def2]
[NVIDIA][def]
[Hardware Unboxed](https://youtu.be/OdF5erDRO-c?si=P4tQYerS0MZJXHJx)
[Actually Hardcore Overclocking Asus Motherboard](https://youtu.be/1LluNJiJ88A?si=RDIGdnwbGLJ1MbRE)
[Actually Hardcore Overclocking GigaByte Motherboard](https://youtu.be/jNwFFJyAqQU?si=dlr4WgDM2IuKj0Bo)
[Raptor Lake CPU Wiki](https://en.wikipedia.org/wiki/Raptor_Lake)

[Hardware Unboxed][def10]
[Actually Hardcore Overclocking Asus Motherboard][def11]
[Actually Hardcore Overclocking GigaByte Motherboard][def12]
[Raptor Lake CPU Wiki][def13]

[def]: https://www.nvidia.com/en-us/geforce/forums/game-ready-drivers/13/542018/performance-issues-and-stability-problems-with-nvi/#!%2Ffollowing
[def2]: https://community.intel.com/t5/Processors/Regarding-Reports-of-13th-14th-Gen-Unlocked-Desktop-Users/td-p/1575863?profile.language=en
Expand All @@ -59,4 +58,8 @@ Intel did ask motherboard vendors such as Asus,MSI,GigaByte,ASRock etc to provid
[def6]: https://www.overclock.net/threads/official-asus-strix-maximus-z790-owners-thread.1800191/page-853#post-29323821
[def7]: https://rog.asus.com/motherboards/rog-maximus/rog-maximus-z790-formula/helpdesk_bios/
[def8]: https://www.msi.com/blog/improving-gaming-stability-for-intel-core-i9-13900k-and-core-i9-14900k
[def9]: https://www.techpowerup.com/321905/superior-stability-by-gigabyte-beta-bios-with-intel-baseline-on-z790-b760-motherboards
[def9]: https://www.techpowerup.com/321905/superior-stability-by-gigabyte-beta-bios-with-intel-baseline-on-z790-b760-motherboards
[def10]: https://youtu.be/OdF5erDRO-c?si=P4tQYerS0MZJXHJx
[def11]: https://youtu.be/1LluNJiJ88A?si=RDIGdnwbGLJ1MbRE
[def12]: https://youtu.be/jNwFFJyAqQU?si=dlr4WgDM2IuKj0Bo
[def13]: https://en.wikipedia.org/wiki/Raptor_Lake

0 comments on commit e611cef

Please sign in to comment.