Where the %MEM value is stored in /proc?

Using the top command you can find out the %MEM used by the process, but where is this value stored in /proc? In /proc/uid/status I found only the value of virtual memory.

optimization: in my case of redis, why would the sum of MEM USE for all keys be less than the reported sums of INFO?

I have a script (golang) that iterates through all the keys in my redis instance that computes a sum of MEMORY USAGE for each key, but the end result is much lower than you would expect based on INFO I send.

{"count":6535412, "msg":"Final statistics", "totalGiB":1.43}

Here is the output of the INFO I send.

# Memory
used_memory:3084991464
used_memory_human:2.87G
used_memory_rss:3190091776
used_memory_rss_human:2.97G
used_memory_peak:11348202280
used_memory_peak_human:10.57G
used_memory_peak_perc:27.18%
used_memory_overhead:468319456
used_memory_startup:4987200
used_memory_dataset:2616672008
used_memory_dataset_perc:84.96%
used_memory_lua:37888
used_memory_lua_human:37.00K
maxmemory:10852761600
maxmemory_human:10.11G
maxmemory_policy:volatile-lru
mem_fragmentation_ratio:1.03
mem_allocator:jemalloc-4.0.3
active_defrag_running:0
lazyfree_pending_objects:0
. . .
# Keyspace
db0:keys=6540519,expires=2030054,avg_ttl=707634519

As you can see, the script calculated a sum of 1.43GiB for the 6.5 million keys, however the INFO the command is reporting used_memory_dataset at 2.4GiB. I'm not sure what I'm missing here.

See the relevant code below:

func getMemoryUsage(key string) int64 {
    var err error
    bytesUsed := int64(0)
    memCmd := redisClient.MemoryUsage(key, 0)
    bytesUsed, err = memCmd.Result()
    if err != nil {
        log.Error("error msg")
        return 0
    }
    return bytesUsed
}

func iterateThroughKeys() {
    keyIterator := redisClient.Scan(0, "keyPrefix/*", batchSize).Iterator()
    totalBytes := 0
    count := 0
    for keyIterator.Next() {
        totalBytes += getMemoryUsage(keyIterator.Val())
        count++
    }
    totalGiB := float64(totalBytes) / float64(1e9)
    log.Info("Final statistics", "count", count, "totalGiB", totalGiB)
}

EASTER 50% LIMITED DISCOUNT | OVZ 1GB Mem, 100GB Disk @ $ 5 / m

Jolly Works Accommodation – Your affordable web hosting, reseller hosting and VPS cloud hosting since 2009.

★★★ ★★★ ★★★ ★★★ ★★★ ★★★ ★★★ ★★★

HAPPY EASTER TO ALL!

Get 50% OFF in your first month.

Use the coupon code: APRIL2020

★★★ ★★★ ★★★ ★★★ ★★★ ★★★ ★★★ ★★★

★★★ REASONS TO CHOOSE JOLLY ★★★

1. Satisfied clients

11 YEARS Reliable, reliable and affordable service
4/5 stars at HostSearch
– 2018 Editor's Pick in the Top 10 UK website hosting
– Classified Excellent service on the advice of the host
– Tested Philippine Customer service

2. Only the best software, hardware and network

– Intel Xeon servers
– Phoenix NAP Next Generation Data Center
– 20 Gbps of servers protected against DDoS against attacks based on UDP, TCP and ICMP

3. Superior uptime, friendly and fast support

– 99.9% server uptime guaranteed. (Supervised by: UptimeRobot)
– Friendly, honest and helpful 24/7 technical support

————————————————– —————-
(NET TEST)
————————————————– —————-

Test IP: 174.138.175.114 (located in Phoenix, AZ)
100MB test file: http://174.138.175.114/100mb-file.zip
500MB test file: http://174.138.175.114/500mb-file.zip
1 GB test file: http://174.138.175.114/1gb-file.zip

————————————————– —————-
(OpenVZ VPS Package)
————————————————– —————-

BASIC

* 512 MB of dedicated memory
* 2 CPU cores
* 50 GB of storage
* 2TB of bandwidth
* 1 IPv4
INSTANT CONFIGURATION! NO CONFIGURATION FEES!

50% off in your first month! Use the coupon code: APRIL2020

Monthly: $ 5.00 USD
Quarterly: $ 12.00 USD
Annual: $ 50.00 USD

ORDER NOW

MOVE ALONG

* 1 GB of dedicated memory
* 3 CPU cores
* 100 GB of storage
* 2TB of bandwidth
* 1 IPv4
INSTANT CONFIGURATION! NO CONFIGURATION FEES!

50% off in your first month! Use the coupon code: APRIL2020

Monthly: $ 10.00 USD
Quarterly: $ 25.00 USD
Annual: $ 100.00 USD

ORDER NOW

PRO

* 2 GB of dedicated memory
* 4 CPU cores
* 200 GB of storage
* 4TB of bandwidth
* 1 IPv4
INSTANT CONFIGURATION! NO CONFIGURATION FEES!

50% off in your first month! Use the coupon code: APRIL2020

Monthly: $ 20.00

Quarterly: $ 50.00

Annual: $ 200.00

ORDER NOW

ELITE

* 4 GB of dedicated memory
* 4 CPU cores
* 400 GB of storage
* 8TB bandwidth
* 1 IPv4
INSTANT CONFIGURATION! NO CONFIGURATION FEES!

50% off in your first month! Use the coupon code: APRIL2020

Monthly: $ 30.00 USD
Quarterly: $ 80.00 USD
Annual: $ 300.00 USD

ORDER NOW

————————————————– —————-
(OpenVZ Tiny VPS Package)
————————————————– —————-

Note: You are not eligible for our 50% discount promotion

Little

* *128MB Dedicated memory, 256MB burst
* *15 GB RAID-1 hard disk space
* *500GB Broadband
* *100Mbps port included!
* *1 IP Speak to
* *INSTANT CONFIGURATION!

1 year price: $ 15.00 NO CONFIGURATION FEES!ORDER NOW!

Small two

* *192MB Dedicated memory, 256MB burst
* *20GB RAID-1 hard disk space
* *500GB Broadband
* *100Mbps port included!
* *1 IP Speak to
* *INSTANT CONFIGURATION!

1 year price: $ 23.00 NO CONFIGURATION FEES!ORDER NOW!

————————————————– —————-
(Updates available)
————————————————– —————-

1 GB of additional RAM> $ 3.00
Additional 25 GB disk space> $ 3.00
Additional 100 GB bandwidth> $ 3.00
Additional IP address> $ 2.00

————————————————– —————-
(Questions?)
————————————————– —————-

Still undecided?
Do you need a personalized plan?
Do you have questions?

Talk to one of our sales representatives today!

You can cheep, Facebook messageor E-mail U.S!

bitcoin core – Solve BTC long mem pool (many unconfirmed tx)

I started with the Bitcoin exchange service, creating a raw transaction and transmitting it. The problem I have to face is the long chain of mempool (more than 25 unconfirmed transactions).

Example:
64: mempool chain too long

Using limitancestorcount Y limitdescendantcount Only resolve on the local node, these late tx (transaction after the first 25) must wait for a long period of time to retransmit in this way:
Transaction not found in Blockchain

Here is my Testnet address has many unconfirmed text messages and still pending, if I look in another browser, I cannot see 45 unconfirmed text messages, the same for getrawtransaction in the node, the answer is No such mempool or blockchain transaction:

https://live.blockcypher.com/btc-testnet/address/mxHqrQBWuCndNaubTYUbcEVzeNPsT34TP6/

So how can I avoid this problem? I only think of some ways, such as: dividing the main address into some sub-addresses that divide the main UTXO into few UTXOs, create a many-to-many transaction (currently it is 1-2, 1 objective and 1 changeAddress back), using UTXO of High confirmation first, … What options can provide better results and performance over a long period of expansion? Any advice is really appreciated. And the last question, is there any way to dial 1 UTXO that is used 25 times (example, I use UTXO X first, then Y is returned, use Y is returned Z, total using X = 2, I don't have any related information to calculate it because the node returns UTXO contains only txId).

[UK/FR/CA] Web hosting, 1GB MEM, 1 CPU, 10 MBPS DISK IO, SSD PURE SSD + FREE at £ 10 / year! – Websites and domains

It is almost the favorite time of the year of Prewebhost; Black Friday and cyber Monday! It's the time of year when we promote the lowest prices of the year for our high-speed, high-quality hosting solutions! So … Are you ready for another round of crazy Web, VPS, Dedicated and reseller discounts by 2018? Yes, this Black Friday PREWEBHOST is offering a great discount with web hosting, VPS Hosting, dedicated hosting and hosting plans for resellers, so be prepared for this discount.

——
60% discount with Linux shared hosting, Linux shared SSD and Linux reseller hosting

Promo code: PREWEB2018OT
——
40% discount for life with Linux Shared Hosting, Linux Shared SSD and Linux Reseller Hosting.

Promo code: PREWEB2018LT
——
50% Lifetime Discount with Windows Shared Hosting

Promo code: PREWEBWINOT18
——
30% recurring discount on all dedicated hosting plans and VPS with annual billing cycle

Promo code: PREWEBVDR18

——

Features offered by Prewebhost Affordable hosting solutions with shared and reseller hosting:

– Unlimited web space
– Unlimited bandwidth
– 30 day money back guarantee
– Instant activation
– Free configuration
– No hidden charges
– Easy billing cycles
– Email alerts
– Softacolous Auto Installer Library
– Unlimited email accounts
– Unlimited FTP accounts
– 24x7x365 live chat support
– Free migration service.
– Free SEO tools
– Free Auto SSL
– Cheap accessories

You can also leave an email at [email protected] If you are looking for a personalized accommodation plan where you will be charged a reasonable price. This offer begins on November 20, 2018 and will be valid until January 10, 2019, so take advantage of this offer and let us give you the opportunity to serve you.

Order now >> https://www.prewebhost.com/

Notes:

1. The billing cycle must be annual or more with respect to the discount.
2. Be sure to copy and use the coupon code required at the time of billing with our billing cycle

Thanking you.

——————

Regards,
Sales team
https://prewebhost.com

.